1 #ifndef DUNE_PDELAB_LOCALOPERATOR_DGPARAMETER_HH 2 #define DUNE_PDELAB_LOCALOPERATOR_DGPARAMETER_HH 4 #include <dune/common/parametertreeparser.hh> 19 template <
typename RF>
31 std::string
s = method;
32 std::transform(s.begin(), s.end(), s.begin(), tolower);
35 if (s.find(
"nipg") != std::string::npos)
38 if (sscanf(s.c_str(),
"nipg %lg", &sigma) != 1)
43 if (s.find(
"sipg") != std::string::npos)
46 if (sscanf(s.c_str(),
"sipg %lg", &sigma) != 1)
60 if (3 == sscanf(s.c_str(),
"%d %lg %lg", &epsilon, &sigma, &beta))
63 DUNE_THROW(Dune::Exception,
"Unknown DG type " << method);
69 beta = config.get<
double>(
"beta");
70 sigma = config.get<
double>(
"ip_sigma");
76 return mu * sigma / std::pow(ig.geometry().volume(),beta);
const IG & ig
Definition: constraints.hh:148
Definition: adaptivity.hh:27
DefaultInteriorPenalty(const std::string method, const RF mu_)
Definition: dgparameter.hh:28
RF getFaceIP(const I &ig) const
Definition: dgparameter.hh:74
This is the default implementation for the interior penalty factor.
Definition: dgparameter.hh:20
const std::string s
Definition: function.hh:1102
DefaultInteriorPenalty(const Dune::ParameterTree &config, const RF mu_)
Definition: dgparameter.hh:66