diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index d19db04f38774cfa81dbd9fef7fde77ce58d5ee9..5565d7fd1de529575e9251573e65df537a78abd1 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -7,11 +7,9 @@ #include <dune/common/nullptr.hh> #include <dune/common/parametertree.hh> -// Just for debugging -#include "dune/solvers/computeenergy.hh" - #include <dune/fufem/arithmetic.hh> #include <dune/solvers/common/interval.hh> +#include <dune/solvers/computeenergy.hh> #include <dune/tnnmg/problem-classes/bisection.hh> #include "globalnonlinearity.hh" @@ -19,13 +17,6 @@ #include "mydirectionalconvexfunction.hh" #include "ellipticenergy.hh" -/* Just for debugging */ -template <class Matrix, class Vector> -double computeEnergy(Matrix const &A, Vector const &x, Vector const &b, - GlobalNonlinearity<Matrix, Vector> const &phi) { - return computeEnergy(A, x, b) + phi(x); -} - /** \brief Base class for problems where each block can be solved with a * modified gradient method */ template <class ConvexProblem> class MyBlockProblem { @@ -73,6 +64,11 @@ template <class ConvexProblem> class MyBlockProblem { return s; } + double computeEnergy(const VectorType &v) const { + return 0.0; // FIXME + // return ::computeEnergy(problem_.A, v, problem_.f) + problem_.phi(v); + } + void projectCoarseCorrection(VectorType const &u, typename Linearization::VectorType const &v, VectorType &projected_v,