From 455352a478edf30cb54145b245ed7c63a62a5e72 Mon Sep 17 00:00:00 2001 From: Emilie Marchandise <emilie.marchandise@uclouvain.be> Date: Thu, 8 Sep 2011 07:48:58 +0000 Subject: [PATCH] GetDT and getSubDT for ERK and DIRK schemes --- Solver/function.cpp | 7 +++++++ Solver/function.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/Solver/function.cpp b/Solver/function.cpp index f589a260a7..7982e1ceb6 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 b0763d9037..33ca860511 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(); -- GitLab