Skip to content
Snippets Groups Projects
Commit 08ca7060 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dg : remove more bugs

parent 0d2f16c0
No related branches found
No related tags found
No related merge requests found
......@@ -234,12 +234,28 @@ dataCacheDouble *dataCacheMap::get(const function *f, dataCacheDouble *caller, b
//special case
if (f == function::getSolution()) {
f = _functionSolution;
if (f == NULL)
Msg::Error ("solution function has not been set");
if (f == NULL) {
dataCacheMap *parent = _parent;
while (parent) {
f = _parent->_functionSolution;
if (f) break;
parent = _parent->_parent;
}
if (f == NULL)
Msg::Error ("solution function has not been set");
}
} else if (f == function::getSolutionGradient()) {
f = _functionSolutionGradient;
if (f == NULL)
if (f == NULL) {
dataCacheMap *parent = _parent;
while (parent) {
f = _parent->_functionSolutionGradient;
if (f) break;
parent = _parent->_parent;
}
if (f == NULL)
Msg::Error ("solution function gradient has not been set");
}
}
// do I have a cache for this function ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment