diff --git a/dune/tectonic/ellipticenergy.hh b/dune/tectonic/ellipticenergy.hh index af295f83b63f852360e2c8b83a83ecad113c1185..d423025c054b82e33e69974b365d7aae472719fa 100644 --- a/dune/tectonic/ellipticenergy.hh +++ b/dune/tectonic/ellipticenergy.hh @@ -23,10 +23,7 @@ template <size_t dim> class EllipticEnergy { : A(A), b(b), phi(phi), ignore(ignore) {} double operator()(SmallVector const &v) const { - SmallVector y(0); - Arithmetic::addProduct(y, 0.5, A, v); - y -= b; - return y * v + (*phi)(v); + return computeEnergy(A, v, b) + (*phi)(v); } SmallMatrix const &A;