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

Use usmv

parent 507da084
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,8 @@ template <int dim> class SampleFunctional {
: A(A), b(b), phi(phi), ignore(ignore) {}
double operator()(SmallVector const &v) const {
SmallVector y;
A.mv(v, y); // Av
y /= 2; // 1/2 Av
SmallVector y(0);
A.usmv(0.5, v, y); // 1/2 Av
y -= b; // 1/2 Av - b
return y * v + (*phi)(v); // <1/2 Av - b,v> + H(|v|)
}
......
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