diff --git a/Solver/function.cpp b/Solver/function.cpp index 0efc3a365a46a81c08b84a74b71c3cf0c26ce8a0..1cb6c51bfb7a81681740c7f0f74848e060d6e79a 100644 --- a/Solver/function.cpp +++ b/Solver/function.cpp @@ -343,6 +343,9 @@ void dataCacheMap::setNbEvaluationPoints(int nbEvaluationPoints) for(std::list<dataCacheMap*>::iterator it = _children.begin(); it != _children.end(); it++) { (*it)->setNbEvaluationPoints(nbEvaluationPoints); } + for(std::vector<dataCacheMap*>::iterator it = _secondaryCaches.begin(); it != _secondaryCaches.end(); it++) { + (*it)->setNbEvaluationPoints(nbEvaluationPoints); + } if (_nbEvaluationPoints == nbEvaluationPoints) { for(std::set<dataCacheDouble*>::iterator it = _allDataCaches.begin(); it != _allDataCaches.end(); it++) (*it)->_valid = false; diff --git a/Solver/function.h b/Solver/function.h index 85b05bae7d986d3248760c6bf7b473d61925749a..400076189c8ad183b9c4cfa10fd527e448dc3710 100644 --- a/Solver/function.h +++ b/Solver/function.h @@ -204,7 +204,6 @@ class dataCacheDouble { class dataCacheMap { const function *_functionSolution, *_functionSolutionGradient, *_functionCoordinates, *_containerSolution, *_containerSolutionGradient; //handle function solution and funciton solution gradient - //we should get rid of them const function * _translate (const function *) const; public: dataCacheMap *_parent; @@ -269,6 +268,9 @@ class dataCacheMap { inline void setSolutionFunction(const function *functionSolution, const function *functionSolutionGradient) { _functionSolution = functionSolution; _functionSolutionGradient = functionSolutionGradient; + for(std::vector<dataCacheMap*>::iterator it = _secondaryCaches.begin(); it != _secondaryCaches.end(); it++) { + (*it)->setSolutionFunction(functionSolution, functionSolutionGradient); + } } inline void setReferenceSolutionFunction(const function *functionSolution, const function *functionSolutionGradient) { _containerSolution = functionSolution; @@ -276,6 +278,9 @@ class dataCacheMap { for(std::list<dataCacheMap*>::iterator it = _children.begin(); it != _children.end(); it++) { (*it)->setReferenceSolutionFunction(functionSolution, functionSolutionGradient); } + for(std::vector<dataCacheMap*>::iterator it = _secondaryCaches.begin(); it != _secondaryCaches.end(); it++) { + (*it)->setReferenceSolutionFunction(functionSolution, functionSolutionGradient); + } } void setNbEvaluationPoints(int nbEvaluationPoints); inline int getNbEvaluationPoints() { return _nbEvaluationPoints; }