Skip to content
Snippets Groups Projects
Commit 436b387e authored by Van Dung NGUYEN's avatar Van Dung NGUYEN
Browse files

reset the last step index in restartManager

parent 83566311
Branches
Tags
No related merge requests found
...@@ -2880,6 +2880,7 @@ void nonLinearMechSolver::init(){ ...@@ -2880,6 +2880,7 @@ void nonLinearMechSolver::init(){
{ {
moveFiles("previousScheme","mv"); moveFiles("previousScheme","mv");
if(!_disableResetRestart) _resetRestart=true; //to avoid restart when shitfing schemes if(!_disableResetRestart) _resetRestart=true; //to avoid restart when shitfing schemes
restartManager::resetLastSavedStep();
} }
   
   
......
...@@ -156,6 +156,11 @@ bool restartManager::internalStateRestartAvailable() ...@@ -156,6 +156,11 @@ bool restartManager::internalStateRestartAvailable()
return (!tempofile.fail()); return (!tempofile.fail());
} }
void restartManager::resetLastSavedStep()
{
_lastSavedStep = 0;
}
void restartManager::openRestartFile(const std::string &fname) void restartManager::openRestartFile(const std::string &fname)
{ {
// include the partition number in the file name // include the partition number in the file name
......
...@@ -56,6 +56,7 @@ class restartManager{ ...@@ -56,6 +56,7 @@ class restartManager{
static void closeRestartFile(); static void closeRestartFile();
static bool available(); static bool available();
static bool internalStateRestartAvailable(); static bool internalStateRestartAvailable();
static void resetLastSavedStep();
template<class T> static void createRestart(const std::string &name, const T* obj) template<class T> static void createRestart(const std::string &name, const T* obj)
{ {
restartManager::createRestartFile(name); restartManager::createRestartFile(name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment