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

Use Arithmetic

parent 9f14a1e9
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/stdstreams.hh> #include <dune/common/stdstreams.hh>
#include <dune/fufem/arithmetic.hh>
#include <dune/fufem/interval.hh> #include <dune/fufem/interval.hh>
#include <dune/solvers/computeenergy.hh> #include <dune/solvers/computeenergy.hh>
#include <dune/tnnmg/problem-classes/bisection.hh> #include <dune/tnnmg/problem-classes/bisection.hh>
...@@ -28,9 +29,9 @@ void descentMinimisation(Functional const &J, ...@@ -28,9 +29,9 @@ void descentMinimisation(Functional const &J,
since A is symmetric. since A is symmetric.
*/ */
SmallVector tmp = J.b; // b SmallVector tmp = J.b;
J.A.mmv(x, tmp); // b-Au Arithmetic::addProduct(tmp, -1.0, J.A, x);
double const JRestb = tmp * v; // <b-Au,v> double const JRestb = tmp * v;
MyDirectionalConvexFunction<LocalNonlinearityType> const JRest( MyDirectionalConvexFunction<LocalNonlinearityType> const JRest(
2.0 * computeEnergy(J.A, v), JRestb, *J.phi, x, v); 2.0 * computeEnergy(J.A, v), JRestb, *J.phi, x, v);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment