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

add dgDofContainer::function

parent 21cccc53
No related branches found
No related tags found
No related merge requests found
......@@ -68,15 +68,13 @@ dataCacheDouble::dataCacheDouble(dataCacheMap *m, function *f):
for (int i = 0; i < f->_functionReplaces.size(); i++) {
functionReplaceCaches.push_back (new functionReplaceCache(m, f->_functionReplaces[i], this));
}
f->registerInDataCacheMap(m, this);
}
void dataCacheDouble::resize() {
_value = fullMatrix<double>(_nRowByPoint==0?1:_nRowByPoint*_cacheMap.getNbEvaluationPoints(),_value.size2());
}
void dataCacheDouble::_eval() {
/*for(unsigned int i=0;i<_substitutions.size(); i++){
_substitutions[i].first->set() = (*_substitutions[i].second)();
}*/
for(unsigned int i=0;i<_dependencies.size(); i++){
_function->arguments[i].val->setAsProxy((*_dependencies[i])());
}
......@@ -378,7 +376,8 @@ class functionC : public function {
"\tg++ -shared -fPIC -o $@ $(CXX_FLAGS) $(CXX_DEFINES) $<\n",
filename.c_str(), "_tmpSrc.cpp");
fclose(tmpMake);
system("make -f _tmpMake");
if(system("make -f _tmpMake"))
Msg::Error("make command failed\n");
unlink ("_tmpSrc.cpp");
unlink ("_tmpMake.cpp");
}
......
......@@ -46,6 +46,7 @@ class function {
std::vector<int> _childrenCache;
std::vector<substitutedFunction> _substitutedFunctions;
virtual void call (dataCacheMap *m, fullMatrix<double> &res)=0;
virtual void registerInDataCacheMap(dataCacheMap *m, dataCacheDouble *d) {}
std::vector<argument> arguments;
const void setArgument(fullMatrix<double> &v, const function *f, int iMap = 0) {
if(f==NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment