Commit 8755dd4e authored by Oliver Sander's avatar Oliver Sander
Browse files

Add a safety \epsilon to the convexity test

The first non-trivial functional that I tested outside of dune-tnnmg needed
such an epsilon.  The value I used (1e-10) has no particular meaning.
I have no idea what an ideal value is.
parent 180fa37e
......@@ -46,7 +46,7 @@ void testConvexity(const Functional& functional,
p[k][l] = (1-t)*p0[k][l] + t*p1[k][l];
// Test for convexity
if (functional(p) > ((1-t)*v0 + t*v1))
if (functional(p) > ((1-t)*v0 + t*v1) + 1e-10)
DUNE_THROW(Exception, "Functional is not convex!");
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment