diff --git a/dune/tectonic/mydirectionalconvexfunction.hh b/dune/tectonic/mydirectionalconvexfunction.hh index 389eb4104b2b76ed07b996560dccc42919af5775..ec870c3ac0e0e2e6e117a23296197f19cc71288e 100644 --- a/dune/tectonic/mydirectionalconvexfunction.hh +++ b/dune/tectonic/mydirectionalconvexfunction.hh @@ -4,6 +4,7 @@ #ifndef MY_DIRECTIONAL_CONVEX_FUNCTION_HH #define MY_DIRECTIONAL_CONVEX_FUNCTION_HH +#include <dune/fufem/arithmetic.hh> #include <dune/fufem/interval.hh> /* @@ -16,9 +17,7 @@ template <class MatrixType, class VectorType> double computeDirectionalA(MatrixType const &A, VectorType const &v) { - VectorType tmp(v.size()); - A.mv(v, tmp); - return tmp * v; + return Arithmetic::Axy(A, v, v); } template <class MatrixType, class VectorType>