4 #ifndef DUNE_PDELAB_LOCALOPERATOR_DGNAVIERSTOKESPARAMETER_HH 5 #define DUNE_PDELAB_LOCALOPERATOR_DGNAVIERSTOKESPARAMETER_HH 7 #include <dune/common/parametertreeparser.hh> 32 template<
typename GV,
typename RF,
typename F,
typename B,
typename V,
typename J,
33 bool navier =
false,
bool full_tensor =
false,
typename IP = DefaultInteriorPenalty<typename V::Traits::RangeFieldType> >
41 void initFromString(
const std::string & method)
43 std::string
s = method;
44 std::transform(s.begin(), s.end(), s.begin(), tolower);
47 if (s.find(
"nipg") != std::string::npos)
53 if (s.find(
"sipg") != std::string::npos)
67 if (3 == sscanf(s.c_str(),
"%d %lg %lg", &_epsilon, &sigma, &beta))
70 DUNE_THROW(Dune::Exception,
"Unknown DG type " << method);
79 DUNE_DEPRECATED_MSG(
"This constructor is deprecated. Use the parameter tree version instead!")
81 F&
f, B& b, V& v, J&
j, IP& ip) :
82 Base(mu,rho,f,b,v,j) ,
85 initFromString(method);
109 F&
f, B& b, V& v, J&
j)
110 : Base(configuration,f,b,v,j)
111 , _ip(configuration.sub(
"dg"))
112 , _epsilon(configuration.sub(
"dg").get<int>(
"epsilon"))
126 template<
typename GEO,
typename IGEO,
typename OGEO>
128 getFaceIP(
const GEO& geo,
const IGEO& igeo,
const OGEO& ogeo)
130 return _ip.getFaceIP(geo,igeo,ogeo);
135 template<
typename GEO,
typename IGEO>
139 return _ip.getFaceIP(geo,igeo);
157 namespace NavierStokesDGImp{
174 template<
typename PRM,
typename Dummy =
void>
177 template<
typename IntersectionGeometry>
178 static typename PRM::Traits::RangeField
182 const typename PRM::Traits::IntersectionDomain& )
189 template<
typename PRM>
191 <PRM,typename
Dune::enable_if<PRM::enable_variable_slip>::type>
193 template<
typename IntersectionGeometry>
194 static typename PRM::Traits::RangeField
198 const typename PRM::Traits::IntersectionDomain& x)
200 return prm.boundarySlip(ig,x);
209 #endif // DUNE_PDELAB_LOCALOPERATOR_DGNAVIERSTOKESPARAMETER_HH const IG & ig
Definition: constraints.hh:148
Wrap intersection.
Definition: geometrywrapper.hh:56
Traits::RangeField mu(const EG &e, const typename Traits::Domain &x) const
Dynamic viscosity value from local cell coordinate.
Definition: stokesparameter.hh:205
Definition: stokesparameter.hh:45
const std::string s
Definition: function.hh:1101
Base::Traits Traits
Traits class.
Definition: dgnavierstokesparameter.hh:76
Compile-time switch for the boundary slip factor.
Definition: dgnavierstokesparameter.hh:175
int epsilonIPSymmetryFactor()
Definition: dgnavierstokesparameter.hh:145
Parameter class for local operator DGNavierStokes.
Definition: dgnavierstokesparameter.hh:34
RF RangeField
Export type for range field.
Definition: stokesparameter.hh:66
Traits::RangeField rho(const EG &eg, const typename Traits::Domain &x) const
Density value from local cell coordinate.
Definition: stokesparameter.hh:221
Traits::RangeField getFaceIP(const GEO &geo, const IGEO &igeo)
Get interior penalty parameter from boundary face.
Definition: dgnavierstokesparameter.hh:137
Traits::VelocityRange f(const EG &e, const typename Traits::Domain &x) const
source term
Definition: stokesparameter.hh:185
Traits::VelocityRange j(const IG &ig, const typename Traits::IntersectionDomain &x, const typename Traits::Domain &normal) const
Neumann boundary condition (stress)
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
Definition: stokesparameter.hh:143
DGNavierStokesParameters(const Dune::ParameterTree &configuration, F &f, B &b, V &v, J &j)
Constructor that parses values from parameter tree.
Definition: dgnavierstokesparameter.hh:108
Traits::RangeField getFaceIP(const GEO &geo, const IGEO &igeo, const OGEO &ogeo)
Get interior penalty parameter from skeleton face.
Definition: dgnavierstokesparameter.hh:128
Traits::RangeField incompressibilityScaling(typename Traits::RangeField dt) const
Rescaling factor for the incompressibility equation.
Definition: dgnavierstokesparameter.hh:118