DUNE-ACFEM (unstable)

incompressibleselftransportmodel.hh
1#ifndef __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
2#define __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
3
4#include "../../expressions/terminal.hh"
5
6#include "../modelbase.hh"
7
8namespace Dune {
9
10 namespace ACFem::PDEModel {
11
47 template<class FunctionSpace>
49 : public ModelBase<FunctionSpace>
50 , public Expressions::SelfExpression<IncompressibleSelfTransportModel<FunctionSpace> >
52 {
55 public:
56 using typename BaseType::RangeType;
57 using typename BaseType::JacobianRangeType;
60
61 static constexpr int dimWorld = dimDomain;
62
63 static_assert(dimDomain == dimRange && dimDomain == dimWorld,
64 "This is meant for dimensionworld vector-fields, "
65 "like fluids, deformations etc.");
66
67 // Interface methods that need to be reimplemented
68
69 IncompressibleSelfTransportModel(const std::string& name = "")
70 : name_(name == "" ? "U_iD_iU_j" : name)
71 {}
72
73 std::string name() const
74 {
75 return name_;
76 }
77
79 auto source(const RangeType& value,
80 const JacobianRangeType& jacobian) const
81 {
82 RangeType result;
83 jacobian.mv(value, result);
84 return result;
85 }
86
88 auto linearizedSource(const RangeType& uBar,
89 const JacobianRangeType& DuBar,
90 const RangeType& value,
91 const JacobianRangeType& jacobian) const
92 {
93 RangeType result;
94 DuBar.mv(value, result);
95 jacobian.umv(uBar, result);
96 return result;
97 }
98
99 protected:
100 std::string name_;
101 };
102
104
117 template<class Object>
118 static inline auto
119 incompressibleSelfTransportModel(const Object& object, const std::string& name = "")
120 {
122 }
123
125
127
129
130 } // namespace ACFem::PDEModel
131
132 namespace ACFem {
133
135
136 }
137
138} //Namespace Dune
139
140
141#endif // __DUNE_ACFEM_MODELS_MODULES_INCOMPRESSIBLESELFTRANSPORTMODEL_HH__
Define a model for the "Navier-Stokes" non-lineariry.
Definition: incompressibleselftransportmodel.hh:52
constexpr decltype(auto) expressionClosure(T &&t)
Do-nothing default implementation for pathologic cases.
Definition: interface.hh:93
static auto incompressibleSelfTransportModel(const Object &object, const std::string &name="")
Generate a Navier-Stokes non-linearity fitting the given object.
Definition: incompressibleselftransportmodel.hh:119
auto linearizedSource(const RangeType &uBar, const JacobianRangeType &DuBar, const RangeType &value, const JacobianRangeType &jacobian) const
The linearized source term as function of local coordinates.
Definition: incompressibleselftransportmodel.hh:88
auto source(const RangeType &value, const JacobianRangeType &jacobian) const
The zero-order term as function of local coordinates.
Definition: incompressibleselftransportmodel.hh:79
Terminals may derive from this class to express that they are expressions.
Definition: terminal.hh:25
A structure defining some basic default types and methods.
Definition: modelbase.hh:41
typename FunctionSpaceType::JacobianRangeType JacobianRangeType
The type returned by classifyBoundary().
Definition: modelbase.hh:63
typename FunctionSpaceType::RangeType RangeType
The type returned by classifyBoundary().
Definition: modelbase.hh:62
static constexpr int dimRange
The type returned by classifyBoundary().
Definition: modelbase.hh:86
static constexpr int dimDomain
The type returned by classifyBoundary().
Definition: modelbase.hh:85
A tag structure signalling that this expression carries its value in its type.
Definition: tags.hh:100
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)