diff --git a/exercises/exercise-fluidsystem/exercise3.cc b/exercises/exercise-fluidsystem/exercise3.cc index 5d811a73f6c8c2999a000032dd5a7545d2dc337c..f3f9ef9e8fdfaacf2edba52f681b072c78599167 100644 --- a/exercises/exercise-fluidsystem/exercise3.cc +++ b/exercises/exercise-fluidsystem/exercise3.cc @@ -113,18 +113,13 @@ int main(int argc, char** argv) try const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize"); auto dt = getParam<Scalar>("TimeLoop.DtInitial"); - // check if we are about to restart a previously interrupted simulation - Scalar restartTime = 0; - if (Parameters::getTree().hasKey("Restart") || Parameters::getTree().hasKey("TimeLoop.Restart")) - restartTime = getParam<Scalar>("TimeLoop.Restart"); - // intialize the vtk output module using VtkOutputFields = typename GET_PROP_TYPE(TypeTag, VtkOutputFields); VtkOutputModule<TypeTag> vtkWriter(*problem, *fvGridGeometry, *gridVariables, x, problem->name()); VtkOutputFields::init(vtkWriter); //! Add model specific output fields // instantiate time loop - auto timeLoop = std::make_shared<TimeLoop<Scalar>>(restartTime, dt, tEnd); + auto timeLoop = std::make_shared<TimeLoop<Scalar>>(/*start time*/0.0, dt, tEnd); timeLoop->setMaxTimeStepSize(maxDt); // the assembler with time loop for instationary problem diff --git a/exercises/solution/ex3/exercise3.cc b/exercises/solution/ex3/exercise3.cc index 5d811a73f6c8c2999a000032dd5a7545d2dc337c..f3f9ef9e8fdfaacf2edba52f681b072c78599167 100644 --- a/exercises/solution/ex3/exercise3.cc +++ b/exercises/solution/ex3/exercise3.cc @@ -113,18 +113,13 @@ int main(int argc, char** argv) try const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize"); auto dt = getParam<Scalar>("TimeLoop.DtInitial"); - // check if we are about to restart a previously interrupted simulation - Scalar restartTime = 0; - if (Parameters::getTree().hasKey("Restart") || Parameters::getTree().hasKey("TimeLoop.Restart")) - restartTime = getParam<Scalar>("TimeLoop.Restart"); - // intialize the vtk output module using VtkOutputFields = typename GET_PROP_TYPE(TypeTag, VtkOutputFields); VtkOutputModule<TypeTag> vtkWriter(*problem, *fvGridGeometry, *gridVariables, x, problem->name()); VtkOutputFields::init(vtkWriter); //! Add model specific output fields // instantiate time loop - auto timeLoop = std::make_shared<TimeLoop<Scalar>>(restartTime, dt, tEnd); + auto timeLoop = std::make_shared<TimeLoop<Scalar>>(/*start time*/0.0, dt, tEnd); timeLoop->setMaxTimeStepSize(maxDt); // the assembler with time loop for instationary problem