Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
facelocalfiniteelement.hh
Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set ts=8 sw=4 et sts=4:
3
4// SPDX-FileCopyrightText: Copyright © DUNE-FUFEM Project contributors, see file AUTHORS.md
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
6
7#ifndef FACE_LOCAL_FINITE_ELEMENT_HH
8#define FACE_LOCAL_FINITE_ELEMENT_HH
9
10#warning This header is deprecated and will be removed after 2.11.
11
21#include <vector>
22
25#include <dune/geometry/type.hh>
26
30template <class Traits>
31struct
32[[deprecated("This class is deprecated and will be removed after 2.11.")]]
34{
36 typedef typename Traits::DomainFieldType DomainFieldType;
37
39 enum {
41 dimDomain = Traits::dimDomain-1
42 };
43
46
48 typedef typename Traits::RangeFieldType RangeFieldType;
49
51 enum {
53 dimRange = Traits::dimRange
54 };
55
57 typedef typename Traits::RangeType RangeType;
58
60 typedef typename Traits::JacobianType JacobianType;
61
63 enum {
65 diffOrder= Traits::diffOrder
66 };
67};
68
69
70
71
75template <class LocalBasis,class LocalGeometry>
76class
77[[deprecated("This class is deprecated and will be removed after 2.11.")]]
79{
80public:
82
83 [[deprecated("This class is deprecated and will be removed after 2.11.")]]
84 FaceLocalBasis(const LocalBasis& localBasis, const LocalGeometry& geometryInInside) :
85 localBasis_(localBasis),
86 geometryInInside_(geometryInInside)
87 {}
88
90 unsigned int size () const
91 {
92 return localBasis_.size() ;
93 }
94
96 inline void evaluateFunction (const typename Traits::DomainType& in,
98 {
99 out.resize(size());
100
101 // transform the coordinates to the inside of the intersection
102 typename LocalBasis::Traits::DomainType inInside = geometryInInside_.global(in);
103
104 // then evaluate the basis of that element
105 localBasis_.evaluateFunction(inInside, out);
106 }
107
109 inline void evaluateJacobian (
110 const typename Traits::DomainType& in, // position
111 std::vector<typename Traits::JacobianType>& out) const // return value
112 {
113 out.resize(size());
114
115 // transform the coordinates to the inside of the intersection
116 typename LocalBasis::Traits::DomainType inInside = geometryInInside_.global(in);
117
118 // then evaluate the basis of that element
119 localBasis_.evaluateJacobian(inInside, out);
120 }
121
123 unsigned int order () const
124 {
125 return localBasis_.order();
126 }
127
128private:
129 const LocalBasis& localBasis_;
130 const LocalGeometry& geometryInInside_;
131};
132
133
134
139template <class LocalFiniteElement, class LocalGeometry>
140class
141[[deprecated("This class is deprecated and will be removed after 2.11.")]]
143{
144public:
145
147
148 typedef Dune::LocalFiniteElementTraits< LocalBasis, typename LocalFiniteElement::Traits::LocalCoefficientsType,
149 typename LocalFiniteElement::Traits::LocalInterPolationType> Traits;
150
151 FaceLocalFiniteElement(const LocalFiniteElement& lFE, const LocalGeometry& geometryInInside) :
152 lFE_(lFE),
153 geometryInInside_(geometryInInside),
154 localBasis_(lFE_.localBasis(),geometryInInside)
155 {}
156
158 const typename Traits::LocalBasisType& localBasis() const
159 {
160 return localBasis_;
161 }
162
165 {
166 return lFE_.localCoefficients();
167 }
168
171 {
172 return lFE_.localInterpolation();
173 }
174
176 // What type is it the for the intersection or the inside type?
178 {
179 return geometryInInside_.type();
180 }
181
182private:
183 const LocalFiniteElement& lFE_;
184 const LocalGeometry& geometryInInside_;
185 const LocalBasis& localBasis_;
186
187};
188
189
190
191#endif
192
int size() const
Definition facelocalfiniteelement.hh:34
Traits::RangeType RangeType
range type
Definition facelocalfiniteelement.hh:57
Traits::JacobianType JacobianType
type of the jacobian
Definition facelocalfiniteelement.hh:60
Dune::FieldVector< DomainFieldType, dimDomain > DomainType
domain type, this might not be correct for non-standard bases!
Definition facelocalfiniteelement.hh:45
Traits::DomainFieldType DomainFieldType
Export type for domain field.
Definition facelocalfiniteelement.hh:36
Traits::RangeFieldType RangeFieldType
Export type for range field.
Definition facelocalfiniteelement.hh:48
Definition facelocalfiniteelement.hh:79
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions at local coordinates of the intersection.
Definition facelocalfiniteelement.hh:96
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions at local coordinates of the intersection.
Definition facelocalfiniteelement.hh:109
unsigned int size() const
number of shape functions
Definition facelocalfiniteelement.hh:90
FaceTraits< typename LocalBasis::Traits > Traits
Definition facelocalfiniteelement.hh:81
FaceLocalBasis(const LocalBasis &localBasis, const LocalGeometry &geometryInInside)
Definition facelocalfiniteelement.hh:84
unsigned int order() const
Polynomial order of the shape functions.
Definition facelocalfiniteelement.hh:123
A wrapper class that wraps a LocalFiniteElement of an entity to a basis that lives on an intersection...
Definition facelocalfiniteelement.hh:143
const Traits::LocalBasisType & localBasis() const
Get the local basis.
Definition facelocalfiniteelement.hh:158
Dune::LocalFiniteElementTraits< LocalBasis, typename LocalFiniteElement::Traits::LocalCoefficientsType, typename LocalFiniteElement::Traits::LocalInterPolationType > Traits
Definition facelocalfiniteelement.hh:149
FaceLocalBasis< typename LocalFiniteElement::Traits::LocalBasisType, LocalGeometry > LocalBasis
Definition facelocalfiniteelement.hh:146
FaceLocalFiniteElement(const LocalFiniteElement &lFE, const LocalGeometry &geometryInInside)
Definition facelocalfiniteelement.hh:151
Dune::GeometryType type() const
Get the geometry type the basis is for.
Definition facelocalfiniteelement.hh:177
const Traits::LocalInterpolationType & localInterpolation() const
Get the local interpolation.
Definition facelocalfiniteelement.hh:170
const Traits::LocalCoefficientsType & localCoefficients() const
Get the local coefficients.
Definition facelocalfiniteelement.hh:164
T resize(T... args)