1#ifndef __DUNE_ACFEM_MODELS_MODULES_LAPLACIANMODEL_HH__
2#define __DUNE_ACFEM_MODELS_MODULES_LAPLACIANMODEL_HH__
4#include "../operatorparts/modeladapter.hh"
29 template<
class FunctionSpace>
31 :
public OperatorPartsExpression<LaplacianOperatorParts<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;
55 : name_(name ==
"" ?
"Laplace" : name)
58 std::string name()
const
64 template<
class Entity,
class Po
int>
66 const JacobianRangeType& DuBar,
69 const RangeType& value,
70 const JacobianRangeType& jacobian,
71 JacobianRangeType&
flux)
const
77 template<
class Entity,
class Po
int>
80 const RangeType& value,
81 const JacobianRangeType& jacobian,
82 const HessianRangeType& hessian,
83 RangeType& result)
const
86 for (
int i = 0; i < dimRange; ++i) {
88 for (
int j = 0; j < dimDomain; ++j) {
89 result[i] -= hessian[i][j][j];
95 const std::string name_;
98 template<
class FunctionSpace>
99 struct OperatorPartsTraits<LaplacianOperatorParts<FunctionSpace> >
100 :
public DefaultOperatorPartsTraits<FunctionSpace>
107 isSemiDefinite =
true
114 hasRobinFlux =
false,
130 template<
class Object>
132 LaplacianOperatorParts<typename Object::FunctionSpaceType>
136 return OperatorPartsType(name);
143 template<
class Object>
145 OperatorPartsAdapterModel<LaplacianOperatorParts<typename Object::FunctionSpaceType>,
146 typename Object::GridPartType>
150 typedef typename Object::GridPartType GridPartType;
151 return OperatorPartsAdapterModel<OperatorPartsType, GridPartType>(OperatorPartsType(name));
Default model implementation.
Definition: operatorparts.hh:387
void flux(const Entity &entity, const Point &x, const RangeType &value, const JacobianRangeType &jacobian, JacobianRangeType &flux) const
Definition: operatorparts.hh:450
Define a simple Laplacian-model, given function-space and grid-part.
Definition: laplacianmodel.hh:32
Interface class for second order elliptic models.
Definition: operatorparts.hh:92
void fluxDivergence(const Entity &entity, const Point &x, const RangeType &value, const JacobianRangeType &jacobian, const HessianRangeType &hessian, RangeType &result) const
Compute the point-wise value of the flux-part of the operator, meaning the part of the differential o...
Definition: laplacianmodel.hh:78
static OperatorPartsAdapterModel< LaplacianOperatorParts< typename Object::FunctionSpaceType >, typename Object::GridPartType > laplacianModel(const Object &object, const std::string &name="")
Generate a Laplacian-model fitting the specified object.
Definition: laplacianmodel.hh:147
StructureFlags
Definition: laplacianmodel.hh:104
ConstituentFlags
Definition: laplacianmodel.hh:111
void linearizedFlux(const RangeType &uBar, const JacobianRangeType &DuBar, const Entity &entity, const Point &x, const RangeType &value, const JacobianRangeType &jacobian, JacobianRangeType &flux) const
Evaluate the linearized flux in local coordinates.
Definition: laplacianmodel.hh:65
static LaplacianOperatorParts< typename Object::FunctionSpaceType > laplacianOperatorParts(const Object &object, const std::string &name="")
Generate OperatorParts for a (weak, of course) Laplacian.
Definition: laplacianmodel.hh:133
Traits-template which has to be specialized for each individual model.
Definition: operatorparts.hh:36