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

Constness

parent 2dc45c46
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ class GlobalNonlinearity {
void addHessian(VectorType const &v, MatrixType &hessian) const {
// TODO: is this correct?
for (size_t i = 0; i < v.size(); ++i) {
auto res = restriction(i);
auto const res = restriction(i);
res->addHessian(v[i], hessian[i][i]);
}
}
......@@ -51,7 +51,7 @@ class GlobalNonlinearity {
subdifferential[0] = subdifferential[1] = 0;
for (size_t i = 0; i < u.size(); ++i) {
Interval<double> D;
auto res = restriction(i);
auto const res = restriction(i);
// TODO: is the coordinate system the right one here?
res->directionalSubDiff(u[i], v[i], D);
subdifferential[0] += D[0];
......@@ -66,13 +66,13 @@ class GlobalNonlinearity {
void addGradient(VectorType const &v, VectorType &gradient) const {
for (size_t i = 0; i < v.size(); ++i) {
auto res = restriction(i);
auto const res = restriction(i);
res->addGradient(v[i], gradient[i]);
}
}
double regularity(int i, typename VectorType::block_type const &x) const {
auto res = restriction(i);
auto const res = restriction(i);
return res->regularity(x);
}
};
......
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