From b4fdaa294558f1f224b9bfb9ceef5644bb1dd183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Tue, 10 Jul 2018 11:22:59 +0200 Subject: [PATCH] [ex3] get rid of restart stuff --- exercises/exercise-fluidsystem/exercise3.cc | 7 +------ exercises/solution/ex3/exercise3.cc | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/exercises/exercise-fluidsystem/exercise3.cc b/exercises/exercise-fluidsystem/exercise3.cc index 5d811a73..f3f9ef9e 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 5d811a73..f3f9ef9e 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 -- GitLab