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

Catch nonsensical corrections for now

Bisection will run for ages otherwise
parent d0262a04
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,12 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
MyDirectionalConvexFunction<Dune::GlobalNonlinearity<block_size>> const psi(
localA, localb, problem.phi, u, v);
Interval<double> D;
psi.subDiff(0, D);
// FIXME: this should never happen to begin with
if (D[1] >= 0)
return 0.0;
int bisectionsteps = 0;
Bisection bisection(0.0, 1.0, 1e-12, true, 0); // TODO
return bisection.minimize(psi, vnorm, 0.0, bisectionsteps) / vnorm; // TODO
......
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