Skip to content
Snippets Groups Projects
Commit 26d0f85e authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Use computeEnergy()

parent 175f0db6
No related branches found
No related tags found
No related merge requests found
...@@ -23,10 +23,7 @@ template <size_t dim> class EllipticEnergy { ...@@ -23,10 +23,7 @@ template <size_t dim> class EllipticEnergy {
: A(A), b(b), phi(phi), ignore(ignore) {} : A(A), b(b), phi(phi), ignore(ignore) {}
double operator()(SmallVector const &v) const { double operator()(SmallVector const &v) const {
SmallVector y(0); return computeEnergy(A, v, b) + (*phi)(v);
Arithmetic::addProduct(y, 0.5, A, v);
y -= b;
return y * v + (*phi)(v);
} }
SmallMatrix const &A; SmallMatrix const &A;
......
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