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

dg : term of equations can be functions but not the boundary conditions

parent f6ded005
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ dataCacheDouble &dataCacheMap::get(const function *f, dataCacheDouble *caller) ...@@ -78,7 +78,7 @@ dataCacheDouble &dataCacheMap::get(const function *f, dataCacheDouble *caller)
} }
} }
if (r==NULL) if (r==NULL)
r = new dataCacheDouble(this, const_cast<function*>(f)); r = new dataCacheDouble(this, (function*)(f));
if (caller) if (caller)
r->addMeAsDependencyOf(caller); r->addMeAsDependencyOf(caller);
return *r; return *r;
...@@ -87,7 +87,7 @@ dataCacheDouble &dataCacheMap::get(const function *f, dataCacheDouble *caller) ...@@ -87,7 +87,7 @@ dataCacheDouble &dataCacheMap::get(const function *f, dataCacheDouble *caller)
dataCacheDouble &dataCacheMap::substitute(const function *f) dataCacheDouble &dataCacheMap::substitute(const function *f)
{ {
dataCacheDouble *&r= _cacheDoubleMap[f]; dataCacheDouble *&r= _cacheDoubleMap[f];
r = new dataCacheDouble(this, const_cast<function*>(f)); r = new dataCacheDouble(this, (function*)(f));
return *r; return *r;
} }
......
...@@ -52,6 +52,8 @@ class function { ...@@ -52,6 +52,8 @@ class function {
virtual void call (dataCacheMap *m, fullMatrix<double> &res)=0; virtual void call (dataCacheMap *m, fullMatrix<double> &res)=0;
std::vector<argument*> arguments; std::vector<argument*> arguments;
const fullMatrix<double> &addArgument(const function *f, int iMap = 0) { const fullMatrix<double> &addArgument(const function *f, int iMap = 0) {
if(f==NULL)
throw;
arguments.push_back(new argument(iMap, f)); arguments.push_back(new argument(iMap, f));
return arguments.back()->val; return arguments.back()->val;
} }
...@@ -173,6 +175,9 @@ class dataCacheMap { ...@@ -173,6 +175,9 @@ class dataCacheMap {
} }
void addSecondaryCache(dataCacheMap *s) { void addSecondaryCache(dataCacheMap *s) {
_secondaryCaches.push_back(s); _secondaryCaches.push_back(s);
if(_secondaryCaches.size()>1){
printf("!!!!!!!!!!!!!!!!!!!!!\n");
}
} }
dataCacheDouble &get(const function *f, dataCacheDouble *caller=0); dataCacheDouble &get(const function *f, dataCacheDouble *caller=0);
dataCacheDouble &substitute(const function *f); dataCacheDouble &substitute(const function *f);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment