1#ifndef __DUNE_ACFEM_MODELS_MODULES_MASSMODEL_HH__
2#define __DUNE_ACFEM_MODELS_MODULES_MASSMODEL_HH__
4#include "../operatorparts/modeladapter.hh"
29 template<
class FunctionSpace>
31 :
public OperatorPartsExpression<MassOperatorParts<FunctionSpace> >
38 typedef FunctionSpace FunctionSpaceType;
40 typedef typename FunctionSpaceType::DomainType DomainType;
41 typedef typename FunctionSpaceType::RangeType RangeType;
42 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
43 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
46 dimDomain = FunctionSpaceType::dimDomain,
47 dimRange = FunctionSpaceType::dimRange
50 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
51 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
54 : name_(name ==
"" ?
"Mass" : name)
57 std::string name()
const
63 template<
class Entity,
class Po
int>
65 const JacobianRangeType& DuBar,
68 const RangeType& value,
69 const JacobianRangeType& jacobian,
70 RangeType& result)
const
76 const std::string name_;
79 template<
class FunctionSpace>
80 struct OperatorPartsTraits<MassOperatorParts<FunctionSpace> >
81 :
public DefaultOperatorPartsTraits<FunctionSpace>
111 template<
class Object>
113 MassOperatorParts<typename Object::FunctionSpaceType>
117 return OperatorPartsType(name);
145 template<
class Object>
147 OperatorPartsAdapterModel<MassOperatorParts<typename Object::FunctionSpaceType>,
148 typename Object::GridPartType>
149 massModel(
const Object&
object,
const std::string& name =
"")
152 typedef typename Object::GridPartType GridPartType;
153 return OperatorPartsAdapterModel<OperatorPartsType, GridPartType>(OperatorPartsType(name));
Default model implementation.
Definition: operatorparts.hh:387
Define a simple mass-model, given function-space and grid-part.
Definition: massmodel.hh:32
Interface class for second order elliptic models.
Definition: operatorparts.hh:92
static MassOperatorParts< typename Object::FunctionSpaceType > massOperatorParts(const Object &object, const std::string &name="")
Generate OperatorParts for a (weak, of course) Mass.
Definition: massmodel.hh:114
ConstituentFlags
Provide information about the constituents of the model.
Definition: massmodel.hh:92
void linearizedSource(const RangeType &uBar, const JacobianRangeType &DuBar, const Entity &entity, const Point &x, const RangeType &value, const JacobianRangeType &jacobian, RangeType &result) const
The linearized source term as function of local coordinates.
Definition: massmodel.hh:64
static OperatorPartsAdapterModel< MassOperatorParts< typename Object::FunctionSpaceType >, typename Object::GridPartType > massModel(const Object &object, const std::string &name="")
Generate a mass model fitting the specified object.
Definition: massmodel.hh:149
StructureFlags
Static flags for the overall structure of the operator.
Definition: massmodel.hh:85
Traits-template which has to be specialized for each individual model.
Definition: operatorparts.hh:36