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

[Cleanup] Use Arithmetic

parent d96d93a8
No related branches found
No related tags found
No related merge requests found
......@@ -55,9 +55,9 @@ template <class NonlinearityType> class MyDirectionalConvexFunction {
double linearPart() const { return b; }
void subDiff(double x, Interval<double> &D) const {
VectorType tmp = u;
tmp.axpy(x, v);
phi.directionalSubDiff(tmp, v, D);
VectorType uxv = u;
Arithmetic::addProduct(uxv, x, v);
phi.directionalSubDiff(uxv, v, D);
D[0] += A * x - b;
D[1] += A * x - b;
}
......
......@@ -447,7 +447,7 @@ int main(int argc, char *argv[]) {
dampingWriter << "N ";
} else { // alpha is still the old time step here
alpha *= damping;
alpha.axpy(1.0 - damping, computed_state);
Arithmetic::addProduct(alpha, 1.0 - damping, computed_state);
dampingWriter << "Y ";
}
lastCorrection = correction;
......
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