dune-fem  2.8-git
localfunctionset.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSET_HH
2 #define DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSET_HH
3 
4 #include <cassert>
5 #include <cstddef>
6 
8 
9 namespace Dune
10 {
11 
12  namespace Fem
13  {
14 
15  // LocalFunctionSet
16  // ----------------
17 
26  template< class Entity, class Range >
28  {
30  typedef Entity EntityType;
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 
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
Definition: bindguard.hh:11
Definition: explicitfieldvector.hh:75
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
Proxy for a LocalBasisFunctionSet.
Definition: localfunctionset.hh:125
LocalFunctionSet ImplementationType
Definition: localfunctionset.hh:127
LocalFunctionSet::JacobianRangeType JacobianRangeType
Definition: localfunctionset.hh:139
const EntityType & entity() const
Definition: localfunctionset.hh:150
void jacobianEach(const Point &x, Functor functor) const
Definition: localfunctionset.hh:161
int order() const
Definition: localfunctionset.hh:148
LocalFunctionSet::EntityType EntityType
Definition: localfunctionset.hh:134
LocalFunctionSet::DomainType DomainType
Definition: localfunctionset.hh:137
LocalFunctionSetProxy()
Definition: localfunctionset.hh:142
LocalFunctionSetProxy(const LocalFunctionSet *localFunctionSet)
Definition: localfunctionset.hh:144
const ImplementationType & impl() const
Definition: localfunctionset.hh:128
std::size_t size() const
Definition: localfunctionset.hh:152
void evaluateEach(const Point &x, Functor functor) const
Definition: localfunctionset.hh:155
void hessianEach(const Point &x, Functor functor) const
Definition: localfunctionset.hh:167
LocalFunctionSet::HessianRangeType HessianRangeType
Definition: localfunctionset.hh:140
LocalFunctionSet::RangeType RangeType
Definition: localfunctionset.hh:138
LocalFunctionSet::FunctionSpaceType FunctionSpaceType
Definition: localfunctionset.hh:135
A vector valued function space.
Definition: functionspace.hh:60
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