1 #ifndef DUNE_FEM_SHAPEFUNCTIONSET_SIMPLE_HH 2 #define DUNE_FEM_SHAPEFUNCTIONSET_SIMPLE_HH 19 template<
class FunctionSpace >
34 virtual void evaluate (
const DomainType &x, RangeType &value )
const = 0;
36 virtual void jacobian (
const DomainType &x, JacobianRangeType &
jacobian )
const = 0;
38 virtual void hessian (
const DomainType &x, HessianRangeType &
hessian )
const = 0;
40 const ThisType *
clone ()
const = 0;
48 template<
class ShapeFunction >
62 template<
class Factory >
67 const ThisType &operator= (
const ThisType &other );
71 int order ()
const {
return order_; }
74 std::size_t
size ()
const {
return shapeFunctions_.size(); }
76 template<
class Po
int,
class Functor >
77 void evaluateEach (
const Point &x, Functor functor )
const;
79 template<
class Po
int,
class Functor >
80 void jacobianEach (
const Point &x, Functor functor )
const;
82 template<
class Po
int,
class Functor >
83 void hessianEach (
const Point &x, Functor functor )
const;
95 template<
class ShapeFunction >
96 template<
class Factory >
100 const std::size_t numShapeFunctions = factory.numShapeFunctions();
101 shapeFunctions_.resize( numShapeFunctions );
102 for( std::size_t i = 0; i < numShapeFunctions; ++i )
103 shapeFunctions_[ i ] = factory.createShapeFunction( i );
104 order_ = factory.order();
107 template<
class ShapeFunction >
114 template<
class ShapeFunction >
121 for( std::size_t i = 0; i < size(); ++i )
122 delete shapeFunctions_[ i ];
124 const std::size_t numShapeFunctions = other.
size();
125 shapeFunctions_.resize( numShapeFunctions );
126 for( std::size_t i = 0; i < numShapeFunctions; ++i )
134 template<
class ShapeFunction >
137 for( std::size_t i = 0; i < size(); ++i )
138 delete shapeFunctions_[ i ];
142 template<
class ShapeFunction >
143 template<
class Po
int,
class Functor >
147 for( std::size_t i = 0; i < size(); ++i )
150 shapeFunctions_[ i ]->evaluate(
coordinate( x ), value );
156 template<
class ShapeFunction >
157 template<
class Po
int,
class Functor >
161 for( std::size_t i = 0; i < size(); ++i )
164 shapeFunctions_[ i ]->jacobian(
coordinate( x ), jacobian );
165 functor( i, jacobian );
170 template<
class ShapeFunction >
171 template<
class Po
int,
class Functor >
175 for( std::size_t i = 0; i < size(); ++i )
178 shapeFunctions_[ i ]->hessian(
coordinate( x ), hessian );
179 functor( i, hessian );
187 #endif // #ifndef DUNE_FEM_SHAPEFUNCTIONSET_SIMPLE_HH std::size_t size() const
Definition: shapefunctionset/simple.hh:74
FunctionSpaceType::RangeType RangeType
Definition: shapefunctionset/simple.hh:58
Definition: shapefunctionset/simple.hh:20
void evaluateEach(const Point &x, Functor functor) const
Definition: shapefunctionset/simple.hh:145
A vector valued function space.
Definition: functionspace.hh:16
void hessianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/simple.hh:173
virtual void jacobian(const DomainType &x, JacobianRangeType &jacobian) const =0
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:74
FieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:78
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: shapefunctionset/simple.hh:59
std::vector< const ShapeFunctionType * > shapeFunctions_
Definition: shapefunctionset/simple.hh:86
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: shapefunctionset/simple.hh:29
virtual void hessian(const DomainType &x, HessianRangeType &hessian) const =0
Definition: shapefunctionset/simple.hh:49
FunctionSpaceType::HessianRangeType HessianRangeType
Definition: shapefunctionset/simple.hh:60
FunctionSpaceType::DomainType DomainType
Definition: shapefunctionset/simple.hh:57
const ThisType * clone() const =0
Definition: coordinate.hh:4
void jacobianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/simple.hh:159
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
FunctionSpaceType::HessianRangeType HessianRangeType
Definition: shapefunctionset/simple.hh:30
~SimpleShapeFunctionSet()
Definition: shapefunctionset/simple.hh:135
ShapeFunction ShapeFunctionType
Definition: shapefunctionset/simple.hh:54
FunctionSpace FunctionSpaceType
Definition: shapefunctionset/simple.hh:25
FunctionSpaceType::RangeType RangeType
Definition: shapefunctionset/simple.hh:28
virtual ~AbstractShapeFunction()
Definition: shapefunctionset/simple.hh:32
int order_
Definition: shapefunctionset/simple.hh:87
int order() const
Definition: shapefunctionset/simple.hh:71
SimpleShapeFunctionSet(const Factory &factory)
Definition: shapefunctionset/simple.hh:98
virtual void evaluate(const DomainType &x, RangeType &value) const =0
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
FunctionSpaceType::DomainType DomainType
Definition: shapefunctionset/simple.hh:27
ShapeFunction::FunctionSpaceType FunctionSpaceType
Definition: shapefunctionset/simple.hh:56
static const Point & coordinate(const Point &x)
Definition: coordinate.hh:11
const ThisType & operator=(const ThisType &other)
Definition: shapefunctionset/simple.hh:116