diff --git a/src/test-circle.cc b/src/test-circle.cc index 9489723c3f5e9f01e23a43d4539024abfbc31985..e0b8080d9fb57cfccaf0ad0ba4b5fd8f9d6fd8d4 100644 --- a/src/test-circle.cc +++ b/src/test-circle.cc @@ -26,12 +26,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 4, 1.5 }, { 1.5, 3 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 4, 1.5 }, { 1.5, 3 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); Bisection const bisection(0.0, 1.0, 1e-12, false, 0); diff --git a/src/test-gradient-horrible-logarithmic.cc b/src/test-gradient-horrible-logarithmic.cc index 950a776c43c0620de83a5c27f4d52dbc54dbfd04..f1a8bcd7fe68507b1d10902f4edeb277e1e1263e 100644 --- a/src/test-gradient-horrible-logarithmic.cc +++ b/src/test-gradient-horrible-logarithmic.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::HorribleFunctionLogarithmic const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-horrible.cc b/src/test-gradient-horrible.cc index 14de1df5a5d7b258e65bc2f66ff55e926a1b0677..da5e45ffe159f36e9582ab6295da315703378055 100644 --- a/src/test-gradient-horrible.cc +++ b/src/test-gradient-horrible.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::HorribleFunction const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-identity.cc b/src/test-gradient-identity.cc index a9ba32e86af536cde20cd10dff164c75d9762afe..7010f8a6be09e2f0d298821ab7336c4322897141 100644 --- a/src/test-gradient-identity.cc +++ b/src/test-gradient-identity.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::LinearFunction const>(1); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-parabola.cc b/src/test-gradient-parabola.cc index a1d3d802564bb5ab65f93f2ce9bace1d34246c1d..7226d93b18d6cc8fb407334f818883fd978b6357 100644 --- a/src/test-gradient-parabola.cc +++ b/src/test-gradient-parabola.cc @@ -21,15 +21,15 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; // |x|^2 as the nonlinearity is the same as having no nonlinearity // but twice the identity matrix added to A. In other words, we're // solving A + 2*id = b auto const f = Dune::make_shared<Dune::Parabola const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); SmallVector solution = { 4.0 / 37.0, 34.0 / 111.0 }; // Analytic solution SmallMatrix M = A; diff --git a/src/test-gradient-sample-3d.cc b/src/test-gradient-sample-3d.cc index e57d2b845b5dbeb7dd2eda6fdabe4f0a96d0d6fb..52e4a95933519547fe73c010659c95eafe013b31 100644 --- a/src/test-gradient-sample-3d.cc +++ b/src/test-gradient-sample-3d.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5, 0 }, { 1.5, 4, 1.5 }, { 0, 1.5, 5 } }; - SmallVector b = { 1, 2, 3 }; + SmallMatrix const A = { { 3, 1.5, 0 }, { 1.5, 4, 1.5 }, { 0, 1.5, 5 } }; + SmallVector const b = { 1, 2, 3 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-sample-nonsmooth.cc b/src/test-gradient-sample-nonsmooth.cc index e684f204e7cf8d947fca66b65d98486853e0d81c..9f13697872febbb6f5c183cd36b5e2996b5c8fed 100644 --- a/src/test-gradient-sample-nonsmooth.cc +++ b/src/test-gradient-sample-nonsmooth.cc @@ -20,12 +20,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); SmallVector start; /* diff --git a/src/test-gradient-sample-steep.cc b/src/test-gradient-sample-steep.cc index 3bc51befe6ccb8e89f744de9a50d664c7dd631a8..6b39276f77755b3b20a7e6ece750dd97167e435f 100644 --- a/src/test-gradient-sample-steep.cc +++ b/src/test-gradient-sample-steep.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 1, 0 }, { 0, 1 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 1, 0 }, { 0, 1 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-sample-steep2.cc b/src/test-gradient-sample-steep2.cc index f77c3788fb84488eb290fe8c605353bca8525a46..6f27d54ded9fbd25d804f50577332bbe055d1899 100644 --- a/src/test-gradient-sample-steep2.cc +++ b/src/test-gradient-sample-steep2.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 1, 0 }, { 0, 1 } }; - SmallVector b = { 1, 2.5 }; + SmallMatrix const A = { { 1, 0 }, { 0, 1 } }; + SmallVector const b = { 1, 2.5 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-sample-verysteep.cc b/src/test-gradient-sample-verysteep.cc index 372787ae07bd85a5631e31d2761bd22bf270f8d9..78e1ec89632f00c75fcd9caad7aca59bc26e20f9 100644 --- a/src/test-gradient-sample-verysteep.cc +++ b/src/test-gradient-sample-verysteep.cc @@ -19,12 +19,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 1, 0 }, { 0, 1 } }; - SmallVector b = { 1, 2.5 }; + SmallMatrix const A = { { 1, 0 }, { 0, 1 } }; + SmallVector const b = { 1, 2.5 }; auto const f = Dune::make_shared<Dune::SampleFunction<100> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-sample.cc b/src/test-gradient-sample.cc index 479273779081daa5c24438b33b1c3370e32c9592..742bbf091df83e858c47413cff109b70049d6a87 100644 --- a/src/test-gradient-sample.cc +++ b/src/test-gradient-sample.cc @@ -21,12 +21,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); /* j(x) diff --git a/src/test-gradient-sample2.cc b/src/test-gradient-sample2.cc index ff80966d27a2196dcff385f896a20724e17865fa..a8009a073f9951afed6c7047fec46b6a5c536853 100644 --- a/src/test-gradient-sample2.cc +++ b/src/test-gradient-sample2.cc @@ -21,12 +21,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 1, 0 }, { 0, 1 } }; - SmallVector b = { 1, 1 }; + SmallMatrix const A = { { 1, 0 }, { 0, 1 } }; + SmallVector const b = { 1, 1 }; auto const f = Dune::make_shared<Dune::SampleFunction<2> const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); double ret1; { diff --git a/src/test-gradient-trivial.cc b/src/test-gradient-trivial.cc index 6368580f0c933172ef1277d5181db35b170761c2..28fecb6056ab75dfa0d238abeee04f0759a21c98 100644 --- a/src/test-gradient-trivial.cc +++ b/src/test-gradient-trivial.cc @@ -20,12 +20,12 @@ int main() { typedef Functional::SmallMatrix SmallMatrix; typedef Functional::SmallVector SmallVector; - SmallMatrix A = { { 3, 1.5 }, { 1.5, 4 } }; - SmallVector b = { 1, 2 }; + SmallMatrix const A = { { 3, 1.5 }, { 1.5, 4 } }; + SmallVector const b = { 1, 2 }; auto const f = Dune::make_shared<Dune::TrivialFunction const>(); auto const phi = Dune::make_shared<Functional::NonlinearityType const>(f); - Functional J(A, b, phi); + Functional const J(A, b, phi); SmallVector solution = { 4.0 / 39.0, 6.0 / 13.0 }; // Analytic solution