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

Reading from the parameter set is expensive!

parent 3793cea1
No related branches found
No related tags found
No related merge requests found
...@@ -264,7 +264,9 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { ...@@ -264,7 +264,9 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
*/ */
IterateObject(Dune::ParameterTree const &parset, Bisection const &bisection, IterateObject(Dune::ParameterTree const &parset, Bisection const &bisection,
MyConvexProblemType const &problem) MyConvexProblemType const &problem)
: parset(parset), problem(problem), bisection(bisection) {} : problem(problem),
bisection(bisection),
localsteps(parset.get<size_t>("localsolver.steps")) {}
public: public:
/** \brief Set the current iterate */ /** \brief Set the current iterate */
...@@ -323,14 +325,11 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { ...@@ -323,14 +325,11 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
ignore_component); ignore_component);
LocalVectorType correction; LocalVectorType correction;
Dune::minimise(localJ, ui, parset.get<size_t>("localsolver.steps"), Dune::minimise(localJ, ui, localsteps, bisection);
bisection);
} }
} }
private: private:
Dune::ParameterTree const &parset;
// problem data // problem data
MyConvexProblemType const &problem; MyConvexProblemType const &problem;
...@@ -340,6 +339,8 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { ...@@ -340,6 +339,8 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
// state data for smoothing procedure used by: // state data for smoothing procedure used by:
// setIterate, updateIterate, solveLocalProblem // setIterate, updateIterate, solveLocalProblem
VectorType u; VectorType u;
size_t const localsteps;
}; };
#endif #endif
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