diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 6e43c2b12d4392e7e7a670148fb49faf064619d4..06b05444fbef529ecfc92307ce77f6f2c3842f98 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -74,7 +74,11 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { double computeDampingParameter(VectorType const &u, VectorType const &projected_v) const { - VectorType const v = projected_v; + VectorType v = projected_v; + + double const vnorm = v.two_norm(); + + v /= vnorm; // Rescale for numerical stability VectorType tmp = problem.f; problem.A.mmv(u, tmp); @@ -94,8 +98,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { localA, localb, problem.phi, u, v); int bisectionsteps = 0; - Bisection bisection(0.0, 1.0, 1e-12, true, 0); // TODO - return bisection.minimize(psi, 1.0, 0.0, bisectionsteps); // TODO + Bisection bisection(0.0, 1.0, 1e-12, true, 0); // TODO + return bisection.minimize(psi, vnorm, 0.0, bisectionsteps) / vnorm; // TODO } void assembleTruncate(VectorType const &u, Linearization &linearization, diff --git a/src/TODO.org b/src/TODO.org index 5e66a10c35dcc8e5617db7885bd3c16af2a0a631..60d0487bf28d112736443a676a2a0b165c8bb9f0 100644 --- a/src/TODO.org +++ b/src/TODO.org @@ -1,3 +1,2 @@ -* check if v should be normalised by default * use nested iteration to obtain better iteration to start with * fix up octave bindings (low-pri)