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

[Cleanup] Avoid recomputation

parent 0145e006
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,9 @@ template <class Nonlinearity> class MyDirectionalConvexFunction {
Vector uxv = u;
Arithmetic::addProduct(uxv, x, v);
phi.directionalSubDiff(uxv, v, D);
D[0] += A * x - b;
D[1] += A * x - b;
auto const Axmb = A * x - b;
D[0] += Axmb;
D[1] += Axmb;
}
void domain(Dune::Solvers::Interval<double> &domain) const {
......
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