Skip to content
Snippets Groups Projects
Commit ab4aec9e authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

H(|.|) can be regular at zero

parent 764506db
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ template <int dimension> class LocalNonlinearity {
}
double regularity(VectorType const &x) const {
if (x.two_norm() < 1e-8) // TODO
if (!func_->smoothesNorm() && x.two_norm() < 1e-12) // TODO
return std::numeric_limits<double>::infinity();
return func_->regularity(x.two_norm());
......
......@@ -23,6 +23,9 @@ class NiceFunction : public VirtualFunction<double, double> {
double virtual regularity(double s) const {
DUNE_THROW(NotImplemented, "regularity not implemented");
}
// Whether H(|.|) is smooth at zero
bool virtual smoothesNorm() const { return false; }
};
class RuinaFunction : public NiceFunction {
......@@ -164,6 +167,8 @@ class TrivialFunction : public NiceFunction {
double virtual second_deriv(double) const { return 0; }
double virtual regularity(double) const { return 0; }
bool virtual smoothesNorm() const { return true; }
};
// slope in [n-1,n] is n
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment