diff --git a/Solver/function.cpp b/Solver/function.cpp index f589a260a73ee71c8f266738a84805e818421307..7982e1ceb62774395b0d4f9878c642aed2e47a34 100644 --- a/Solver/function.cpp +++ b/Solver/function.cpp @@ -44,6 +44,7 @@ void function::setArgument(fullMatrix<double> &v, const function *f, int iMap) functionConstant *function::_timeFunction = NULL; functionConstant *function::_dtFunction = NULL; +functionConstant *function::_dtSubFunction = NULL; functionConstant *function::getTime() { @@ -58,6 +59,12 @@ functionConstant *function::getDT() _dtFunction = new functionConstant(0.); return _dtFunction; } +functionConstant *function::getSubDT() +{ + if (! _dtSubFunction) + _dtSubFunction = new functionConstant(0.); + return _dtSubFunction; +} functionSolution *functionSolution::_instance = NULL; diff --git a/Solver/function.h b/Solver/function.h index b0763d90378bb903e59b03d3a394f496b644ddc3..33ca8605116d298b9e8bee53267d0bcd51ab1e7a 100644 --- a/Solver/function.h +++ b/Solver/function.h @@ -55,6 +55,7 @@ class function { private: static functionConstant *_timeFunction; static functionConstant *_dtFunction; + static functionConstant *_dtSubFunction; public: function(int nbCol, bool invalidatedOnElement = true) @@ -71,6 +72,7 @@ class function { inline int getNbCol() const {if(_nbCol ==0) Msg::Error("Cannot ask nbCol of functionSolution"); return _nbCol; } static functionConstant *getTime(); static functionConstant *getDT(); + static functionConstant *getSubDT(); static function *getSolution(); static function *getCoordinates(); static function *getSolutionGradient();