From 41e7fbc3d7aed7747ce4c94bba383f6cf4a85134 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Tue, 8 May 2012 15:10:32 +0200 Subject: [PATCH] Reading from the parameter set is expensive! --- dune/tectonic/myblockproblem.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 1910eade..56b06798 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -264,7 +264,9 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { */ IterateObject(Dune::ParameterTree const &parset, Bisection const &bisection, MyConvexProblemType const &problem) - : parset(parset), problem(problem), bisection(bisection) {} + : problem(problem), + bisection(bisection), + localsteps(parset.get<size_t>("localsolver.steps")) {} public: /** \brief Set the current iterate */ @@ -323,14 +325,11 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { ignore_component); LocalVectorType correction; - Dune::minimise(localJ, ui, parset.get<size_t>("localsolver.steps"), - bisection); + Dune::minimise(localJ, ui, localsteps, bisection); } } private: - Dune::ParameterTree const &parset; - // problem data MyConvexProblemType const &problem; @@ -340,6 +339,8 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { // state data for smoothing procedure used by: // setIterate, updateIterate, solveLocalProblem VectorType u; + + size_t const localsteps; }; #endif -- GitLab