Commit 5519cb39 authored by Elias Pipping's avatar Elias Pipping
Browse files

Use Arithmetic helpers

(After recent changes to dune-istl) BCRSMatrix::usmv() now takes three
template arguments rather than two. Since the two lines in question had
to be changed anyway, might as well make them more readable this way,
parent a6b79c17
......@@ -14,6 +14,7 @@
#include <dune/solvers/operators/sumoperator.hh>
#include <dune/solvers/operators/nulloperator.hh>
#include <dune/solvers/common/arithmetic.hh>
#include <dune/solvers/common/staticmatrixtools.hh>
#include "nonlinearity.hh"
......@@ -303,7 +304,7 @@ class BlockNonlinearTNNMGProblem
// compute quadratic part of gradient
linearization.b = 0.0;
problem_.A.template usmv<VectorType, VectorType>(problem_.a, u, linearization.b);
Arithmetic::addProduct(linearization.b, problem_.a, problem_.A, u);
// compute linear part
// the factor -1 will be removed by later multiplication with -1
......@@ -479,7 +480,7 @@ class BlockNonlinearTNNMGProblem
// compute linear part <f-a*Au,v>
temp = problem_.f;
problem_.A.template usmv<VectorType, VectorType>(-problem_.a, u, temp);
Arithmetic::subtractProduct(temp, problem_.a, problem_.A, u);
resv = temp*v;
// only touch the lowRankFactor if its coefficient is not zero; it might not be initialized otherwise
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment