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

Use computeEnergy

parent e391a7b2
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
#include <dune/common/stdstreams.hh>
#include <dune/fufem/interval.hh>
#include <dune/solvers/computeenergy.hh>
#include <dune/tnnmg/problem-classes/bisection.hh>
#include "mydirectionalconvexfunction.hh"
......@@ -31,11 +32,8 @@ void descentMinimisation(Functional const &J,
J.A.mmv(x, tmp); // b-Au
double const JRestb = tmp * v; // <b-Au,v>
J.A.mv(v, tmp); // Av
double const JRestA = tmp * v; // <Av,v>
MyDirectionalConvexFunction<LocalNonlinearityType> const JRest(JRestA, JRestb,
*J.phi, x, v);
MyDirectionalConvexFunction<LocalNonlinearityType> const JRest(
2.0 * computeEnergy(J.A, v), JRestb, *J.phi, x, v);
// }}}
{ // Debug
......
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