DUNE-ACFEM (2.5.1)

incompressibleselftransportmodel.hh
1#ifndef __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
2#define __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
3
4#include "../operatorparts/modeladapter.hh"
5
6namespace Dune {
7
8 namespace ACFem {
9
45 template<class FunctionSpace>
47 : public OperatorPartsExpression<IncompressibleSelfTransportOperatorParts<FunctionSpace> >
48 {
53 public:
54 typedef FunctionSpace FunctionSpaceType;
55
56 typedef typename FunctionSpaceType::DomainType DomainType;
57 typedef typename FunctionSpaceType::RangeType RangeType;
58 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
59 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
60
61 enum {
62 dimDomain = FunctionSpaceType::dimDomain,
63 dimRange = FunctionSpaceType::dimRange,
64 dimWorld = dimDomain
65 };
66
67 static_assert(dimDomain == dimRange && dimDomain == dimWorld,
68 "This is meant for dimensionworld vector-fields, "
69 "like fluids, deformations etc.");
70
71 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
72 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
73
74 // Interface methods that need to be reimplemented
75
76 IncompressibleSelfTransportOperatorParts(const std::string& name = "")
77 : name_(name == "" ? "U_iD_iU_j" : name)
78 {}
79
80 std::string name() const
81 {
82 return name_;
83 }
84
86 template<class Entity, class Point>
87 void source(const Entity& entity,
88 const Point &x,
89 const RangeType& value,
90 const JacobianRangeType& jacobian,
91 RangeType& result) const
92 {
93 jacobian.mv(value, result);
94 }
95
97 template<class Entity, class Point>
98 void linearizedSource(const RangeType& uBar,
99 const JacobianRangeType& DuBar,
100 const Entity& entity,
101 const Point &x,
102 const RangeType& value,
103 const JacobianRangeType& jacobian,
104 RangeType& result) const
105 {
106 DuBar.mv(value, result);
107 jacobian.umv(uBar, result);
108 }
109
110 protected:
111 const std::string name_;
112 };
113
114 template<class FunctionSpace>
115 struct OperatorPartsTraits<IncompressibleSelfTransportOperatorParts<FunctionSpace> >
116 : public DefaultOperatorPartsTraits<FunctionSpace>
117 {
120 {
121 isLinear = false,
122 isSymmetric = false,
123 isSemiDefinite = false,
124 };
125
128 hasFlux = false,
129 hasSources = true,
130 hasRobinFlux = false,
131 };
132 };
133
135
148 template<class Object>
149 static inline
150 IncompressibleSelfTransportOperatorParts<typename Object::FunctionSpaceType>
151 incompressibleSelfTransportOpertorParts(const Object& object, const std::string& name = "")
152 {
154 }
155
164 template<class Object>
165 static inline
166 OperatorPartsAdapterModel<IncompressibleSelfTransportOperatorParts<typename Object::FunctionSpaceType>, typename Object::GridPartType>
167 incompressibleSelfTransportModel(const Object& object, const std::string& name = "")
168 {
170 typedef typename Object::GridPartType GridPartType;
171 return OperatorPartsAdapterModel<OperatorPartsType, GridPartType>(OperatorPartsType(name));
172 }
173
175
177
179
180 } // namespace ACFem
181
182} //Namespace Dune
183
184
185#endif // __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
Default model implementation.
Definition: operatorparts.hh:387
Define a model for the "Navier-Stokes" non-lineariry.
Definition: incompressibleselftransportmodel.hh:48
Interface class for second order elliptic models.
Definition: operatorparts.hh:92
ConstituentFlags
Provide information about the constituents of the model.
Definition: incompressibleselftransportmodel.hh:127
static IncompressibleSelfTransportOperatorParts< typename Object::FunctionSpaceType > incompressibleSelfTransportOpertorParts(const Object &object, const std::string &name="")
Generate a Navier-Stokes non-linearity fitting the given object.
Definition: incompressibleselftransportmodel.hh:151
static OperatorPartsAdapterModel< IncompressibleSelfTransportOperatorParts< typename Object::FunctionSpaceType >, typename Object::GridPartType > incompressibleSelfTransportModel(const Object &object, const std::string &name="")
Generate a Navier-Stokes non-linearity fitting the given object.
Definition: incompressibleselftransportmodel.hh:167
StructureFlags
Static flags for the overall structure of the operator.
Definition: incompressibleselftransportmodel.hh:120
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: incompressibleselftransportmodel.hh:98
void source(const Entity &entity, const Point &x, const RangeType &value, const JacobianRangeType &jacobian, RangeType &result) const
The zero-order term as function of local coordinates.
Definition: incompressibleselftransportmodel.hh:87
Traits-template which has to be specialized for each individual model.
Definition: operatorparts.hh:36
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Aug 13, 22:30, 2024)