1 #ifndef DUNE_FEM_INTEGRATOR_HH
2 #define DUNE_FEM_INTEGRATOR_HH
26 template<
class Quadrature >
34 typedef typename QuadratureType :: EntityType
EntityType;
66 template<
class Function >
73 typedef typename Dune::FieldTraits< RangeFieldType >::real_type RealType;
76 for(
const auto& qp : quadrature )
80 function.evaluate( qp, phi );
83 const RealType weight = entity.geometry().integrationElement( qp.position() ) * qp.weight();
85 ret.axpy( weight, phi );
105 template<
class Function >
Definition: bindguard.hh:11
Abstract class representing a function.
Definition: common/function.hh:50
FunctionSpaceType ::RangeType RangeType
range type
Definition: common/function.hh:68
FunctionSpaceType ::RangeFieldType RangeFieldType
field type of range
Definition: common/function.hh:64
integrator for arbitrary functions providing evaluate
Definition: integrator.hh:28
const int order_
Definition: integrator.hh:37
Quadrature QuadratureType
type of quadrature to use
Definition: integrator.hh:31
Integrator(unsigned int order)
constructor
Definition: integrator.hh:45
void integrate(const EntityType &entity, const Function &function, typename Function ::RangeType &ret) const
integrate a function over an entity
Definition: integrator.hh:106
QuadratureType ::EntityType EntityType
type of the entity
Definition: integrator.hh:34
void integrateAdd(const EntityType &entity, const Function &function, typename Function ::RangeType &ret) const
add the integral over an entity to a variable
Definition: integrator.hh:67
actual interface class for quadratures
Definition: quadrature.hh:405