From 97bf3865fbf90611d335f978a230b47a1a487a8a Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 15 Dec 2011 15:07:58 +0100 Subject: [PATCH] Constness --- dune/tectonic/globalnonlinearity.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dune/tectonic/globalnonlinearity.hh b/dune/tectonic/globalnonlinearity.hh index b8c62492..4ae49881 100644 --- a/dune/tectonic/globalnonlinearity.hh +++ b/dune/tectonic/globalnonlinearity.hh @@ -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); } }; -- GitLab