1#ifndef __DUNE_ACFEM_MODELS_MODULES_DEFORMATIONTENSORMODEL_HH__
2#define __DUNE_ACFEM_MODELS_MODULES_DEFORMATIONTENSORMODEL_HH__
4#include "../operatorparts/modeladapter.hh"
51 template<
class FunctionSpace>
53 :
public OperatorPartsExpression<DeformationTensorOperatorParts<FunctionSpace> >
60 typedef FunctionSpace FunctionSpaceType;
62 typedef typename FunctionSpaceType::DomainType DomainType;
63 typedef typename FunctionSpaceType::RangeType RangeType;
64 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
65 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
68 dimDomain = FunctionSpaceType::dimDomain,
69 dimRange = FunctionSpaceType::dimRange,
70 dimWorld = FunctionSpaceType::dimDomain
73 static_assert(dimDomain == dimRange && dimDomain == dimWorld,
74 "This is meant for dimensionworld vector-fields, "
75 "like fluids, deformations etc.");
77 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
78 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
83 : name_(name ==
"" ?
"(D_iU_j+ D_jU_i)" : name)
86 std::string name()
const
92 template<
class Entity,
class Po
int>
94 const JacobianRangeType& DuBar,
97 const RangeType& value,
98 const JacobianRangeType& jacobian,
99 JacobianRangeType&
flux)
const
102 for (
int i = 0; i < dimWorld; ++i) {
103 flux[i][i] = 2.*jacobian[i][i];
104 for (
int j = i+1; j < dimWorld; ++j) {
105 flux[i][j] =
flux[j][i] = jacobian[i][j] + jacobian[j][i];
111 template<
class Entity,
class Po
int>
114 const RangeType& value,
115 const JacobianRangeType& jacobian,
116 const HessianRangeType& hessian,
117 RangeType& result)
const
120 for (
int alpha = 0; alpha < dimWorld; ++alpha) {
122 for (
int i = 0; i < dimWorld; ++i) {
124 result[alpha] -= hessian[alpha][i][i] + hessian[i][alpha][i];
130 const std::string name_;
133 template<
class FunctionSpace>
134 struct OperatorPartsTraits<DeformationTensorOperatorParts<FunctionSpace> >
135 :
public DefaultOperatorPartsTraits<FunctionSpace>
142 isSemiDefinite =
true
149 hasRobinFlux =
false,
163 template<
class Object>
165 DeformationTensorOperatorParts<typename Object::FunctionSpaceType>
169 return OperatorPartsType(name);
176 template<
class Object>
178 OperatorPartsAdapterModel<DeformationTensorOperatorParts<typename Object::FunctionSpaceType>,
179 typename Object::GridPartType>
183 typedef typename Object::GridPartType GridPartType;
184 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
Interface class for second order elliptic models.
Definition: operatorparts.hh:92
ConstituentFlags
Provide information about the constituents of the model.
Definition: deformationtensormodel.hh:146
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: deformationtensormodel.hh:112
static DeformationTensorOperatorParts< typename Object::FunctionSpaceType > deformationTensorOperatorParts(const Object &object, const std::string &name="")
Generate a deformation tensor model fitting the specified object.
Definition: deformationtensormodel.hh:166
StructureFlags
Static flags for the overall structure of the operator.
Definition: deformationtensormodel.hh:139
static OperatorPartsAdapterModel< DeformationTensorOperatorParts< typename Object::FunctionSpaceType >, typename Object::GridPartType > deformationTensorModel(const Object &object, const std::string &name="")
Generate a deformation tensor model fitting the specified object.
Definition: deformationtensormodel.hh:180
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: deformationtensormodel.hh:93
Traits-template which has to be specialized for each individual model.
Definition: operatorparts.hh:36