dune-fem  2.4.1-rc
shapefunctionset/proxy.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_SHAPEFUNCTIONSET_PROXY_HH
2 #define DUNE_FEM_SHAPEFUNCTIONSET_PROXY_HH
3 
4 // C++ includes
5 #include <cassert>
6 #include <cstddef>
7 
8 // dune-common includes
9 #include <dune/common/nullptr.hh>
10 
18 namespace Dune
19 {
20 
21  namespace Fem
22  {
23 
24  // ShapeFunctionSetProxy
25  // ---------------------
26 
27  /*
28  * \brief A proxy object converting a pointer to a shape function set to a object
29  *
30  * \tparam ShapeFunctionSet An implementation of Dune::Fem::ShapeFunctionSet
31  *
32  * \note This class has an implicit constructor from a pointer to a shape function set.
33  */
34  template< class ShapeFunctionSet >
36  {
38 
39  public:
41 
43 
48 
49  const ImplementationType &impl () const
50  {
51  assert( shapeFunctionSet_ );
52  return *shapeFunctionSet_;
53  }
54 
56  : shapeFunctionSet_( nullptr )
57  {}
58 
59  ShapeFunctionSetProxy ( const ShapeFunctionSet *shapeFunctionSet )
60  : shapeFunctionSet_( shapeFunctionSet )
61  {}
62 
63  int order () const { return impl().order(); }
64 
65  std::size_t size () const { return impl().size(); }
66 
67  template< class Point, class Functor >
68  void evaluateEach ( const Point &x, Functor functor ) const
69  {
70  impl().evaluateEach( x, functor );
71  }
72 
73  template< class Point, class Functor >
74  void jacobianEach ( const Point &x, Functor functor ) const
75  {
76  impl().jacobianEach( x, functor );
77  }
78 
79  template< class Point, class Functor >
80  void hessianEach ( const Point &x, Functor functor ) const
81  {
82  impl().hessianEach( x, functor );
83  }
84 
85  private:
86  const ShapeFunctionSet *shapeFunctionSet_;
87  };
88 
89  } // namespace Fem
90 
91 } // namespace Dune
92 
93 #endif // #ifndef DUNE_FEM_SHAPEFUNCTIONSET_PROXY_HH
int order() const
return order of shape functions
std::size_t size() const
return number of shape functions
void hessianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/proxy.hh:80
FunctionSpaceType::RangeType RangeType
Definition: shapefunctionset/proxy.hh:45
const ImplementationType & impl() const
Definition: shapefunctionset/proxy.hh:49
A vector valued function space.
Definition: functionspace.hh:16
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:74
ShapeFunctionSetProxy()
Definition: shapefunctionset/proxy.hh:55
FieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:78
Definition: shapefunctionset/shapefunctionset.hh:33
void evaluateEach(const Point &x, Functor functor) const
evalute each shape function
FunctionSpaceType::DomainType DomainType
Definition: shapefunctionset/proxy.hh:44
FunctionSpaceType::HessianRangeType HessianRangeType
Definition: shapefunctionset/proxy.hh:47
ShapeFunctionSet ImplementationType
Definition: shapefunctionset/proxy.hh:40
Definition: shapefunctionset/proxy.hh:35
Definition: coordinate.hh:4
ImplementationType::FunctionSpaceType FunctionSpaceType
Definition: shapefunctionset/proxy.hh:42
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:66
void evaluateEach(const Point &x, Functor functor) const
Definition: shapefunctionset/proxy.hh:68
ShapeFunctionSetProxy(const ShapeFunctionSet *shapeFunctionSet)
Definition: shapefunctionset/proxy.hh:59
void hessianEach(const Point &x, Functor functor) const
evalute hessian of each shape function
std::size_t size() const
Definition: shapefunctionset/proxy.hh:65
void jacobianEach(const Point &x, Functor functor) const
evalute jacobian of each shape function
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: shapefunctionset/proxy.hh:46
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:70
void jacobianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/proxy.hh:74
int order() const
Definition: shapefunctionset/proxy.hh:63