1 #ifndef DUNE_PDELAB_LOCALOPERATOR_DGPARAMETER_HH 2 #define DUNE_PDELAB_LOCALOPERATOR_DGPARAMETER_HH 4 #warning This file is deprecated and will be removed. Use dune/pdelab/localoperator/dginteriorpenaltyparameter.hh instead! 6 #include <dune/common/parametertreeparser.hh> 21 template <
typename RF>
22 class DUNE_DEPRECATED_MSG("DefaultInteriorPenalty is deprecated. Please use the implementation from dune/pdelab/localoperator/dginteriorpenaltyparameter.hh instead!") DefaultInteriorPenalty
33 std::string
s = method;
34 std::transform(s.begin(), s.end(), s.begin(), tolower);
37 if (s.find(
"nipg") != std::string::npos)
40 if (sscanf(s.c_str(),
"nipg %lg", &sigma) != 1)
45 if (s.find(
"sipg") != std::string::npos)
48 if (sscanf(s.c_str(),
"sipg %lg", &sigma) != 1)
62 if (3 == sscanf(s.c_str(),
"%d %lg %lg", &epsilon, &sigma, &beta))
65 DUNE_THROW(Dune::Exception,
"Unknown DG type " << method);
71 beta = config.get<
double>(
"beta");
72 sigma = config.get<
double>(
"ip_sigma");
78 return mu * sigma / std::pow(ig.geometry().volume(),beta);
85 #endif // DUNE_PDELAB_LOCALOPERATOR_DGPARAMETER_HH const IG & ig
Definition: constraints.hh:148
const std::string s
Definition: function.hh:1101
RF getFaceIP(const I &ig) const
Definition: dgparameter.hh:76
DefaultInteriorPenalty(const std::string method, const RF mu_)
Definition: dgparameter.hh:30
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
DefaultInteriorPenalty(const Dune::ParameterTree &config, const RF mu_)
Definition: dgparameter.hh:68