DUNE-FEM (unstable)

localfunctionset.hh
1#ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSET_HH
2#define DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSET_HH
3
4#include <cassert>
5#include <cstddef>
6
7#include <dune/fem/space/common/functionspace.hh>
8
9namespace Dune
10{
11
12 namespace Fem
13 {
14
15 // LocalFunctionSet
16 // ----------------
17
26 template< class Entity, class Range >
28 {
31
33 typedef FunctionSpace< typename Entity::Geometry::ctype, typename Range::value_type,
34 Entity::Geometry::coorddimension, Range::dimension > FunctionSpaceType;
35
44
46 int order () const;
47
49 const EntityType &entity () const;
50
52 std::size_t size () const;
53
70 template< class Point, class Functor >
71 void evaluateEach ( const Point &x, Functor functor ) const;
72
89 template< class Point, class Functor >
90 void jacobianEach ( const Point &x, Functor functor ) const;
91
108 template< class Point, class Functor >
109 void hessianEach ( const Point &x, Functor functor ) const;
110 };
111
112
113
114 // LocalFunctionSetProxy
115 // ---------------------
116
123 template< class LocalFunctionSet >
125 {
126 public:
128 const ImplementationType &impl () const
129 {
130 assert( localFunctionSet_ );
131 return *localFunctionSet_;
132 }
133
136
137 typedef typename LocalFunctionSet::DomainType DomainType;
138 typedef typename LocalFunctionSet::RangeType RangeType;
139 typedef typename LocalFunctionSet::JacobianRangeType JacobianRangeType;
141
142 LocalFunctionSetProxy () : localFunctionSet_( nullptr ) {}
143
144 LocalFunctionSetProxy ( const LocalFunctionSet *localFunctionSet )
145 : localFunctionSet_( localFunctionSet )
146 {}
147
148 int order () const { return impl().order(); }
149
150 const EntityType &entity () const { return impl().entity(); }
151
152 std::size_t size () const { return impl().size(); }
153
154 template< class Point, class Functor >
155 void evaluateEach ( const Point &x, Functor functor ) const
156 {
157 impl().evaluateEach( x, functor );
158 }
159
160 template< class Point, class Functor >
161 void jacobianEach ( const Point &x, Functor functor ) const
162 {
163 impl().jacobianEach( x, functor );
164 }
165
166 template< class Point, class Functor >
167 void hessianEach ( const Point &x, Functor functor ) const
168 {
169 impl().hessianEach( x, functor );
170 }
171
172 private:
173 const LocalFunctionSet *localFunctionSet_;
174 };
175
176 } // namespace Fem
177
178} // namespace Dune
179
180#endif // #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSET_HH
Wrapper class for entities.
Definition: entity.hh:66
Definition: explicitfieldvector.hh:75
FunctionSpaceTraits::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:71
FunctionSpaceTraits::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:75
FunctionSpaceTraits::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:67
A vector valued function space.
Definition: functionspace.hh:60
Proxy for a LocalBasisFunctionSet.
Definition: localfunctionset.hh:125
Dune namespace.
Definition: alignedallocator.hh:13
Local basis functions.
Definition: localfunctionset.hh:28
FunctionSpaceType::HessianRangeType HessianRangeType
hessian range type
Definition: localfunctionset.hh:43
Entity EntityType
entity type
Definition: localfunctionset.hh:30
FunctionSpace< typename Entity::Geometry::ctype, typename Range::value_type, Entity::Geometry::coorddimension, Range::dimension > FunctionSpaceType
function space type
Definition: localfunctionset.hh:34
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian range type
Definition: localfunctionset.hh:41
FunctionSpaceType::RangeType RangeType
range type
Definition: localfunctionset.hh:39
const EntityType & entity() const
return entity
void jacobianEach(const Point &x, Functor functor) const
void evaluateEach(const Point &x, Functor functor) const
void hessianEach(const Point &x, Functor functor) const
FunctionSpaceType::DomainType DomainType
domain type
Definition: localfunctionset.hh:37
int order() const
return order of basis functions
std::size_t size() const
return number of basis functions
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)