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 >
69 typename Function :: RangeType &ret )
const
71 typedef typename Function :: RangeType RangeType;
72 typedef typename Function :: RangeFieldType RangeFieldType;
73 typedef typename Dune::FieldTraits< RangeFieldType >::real_type RealType;
76 for(
const auto& qp : quadrature )
83 const RealType weight = entity.geometry().integrationElement( qp.position() ) * qp.weight();
85 ret.axpy( weight, phi );
105 template<
class Function >
108 typename Function :: RangeType &ret )
const
Definition: bindguard.hh:11
Abstract class representing a function.
Definition: common/function.hh:50
void evaluate(const DomainType &x, RangeType &value) const
evaluate the function
Definition: common/function.hh:107
integrator for arbitrary functions providing evaluate
Definition: integrator.hh:28
QuadratureType::EntityType EntityType
type of the entity
Definition: integrator.hh:34
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
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