diff --git a/dune/tectonic/myconvexproblem.hh b/dune/tectonic/myconvexproblem.hh index c2eb3445fc29da16aa2eb3daf19dfee96abb1648..76542cd4b1f2875d06ab7de2796271827f8cf25c 100644 --- a/dune/tectonic/myconvexproblem.hh +++ b/dune/tectonic/myconvexproblem.hh @@ -27,6 +27,14 @@ class MyConvexProblem { VectorType const &f) : A(A), phi(phi), f(f) {}; + /* Just for debugging */ + double operator()(VectorType const &x) const { + double ret = phi(x) - (f * x); + VectorType tmp(x.size()); + A.mv(x, tmp); + return ret + 0.5 * (tmp * x); + } + MatrixType const &A; Dune::GlobalNonlinearity<MatrixType, VectorType> const φ