From 6b67bf418f8a93b08a64481cf42896e522306b27 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 16 Aug 2012 09:18:39 +0200 Subject: [PATCH] MyConvexProblem::operator() --- dune/tectonic/myconvexproblem.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dune/tectonic/myconvexproblem.hh b/dune/tectonic/myconvexproblem.hh index c2eb3445..76542cd4 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 φ -- GitLab