Skip to content
Snippets Groups Projects
Commit 6aa64286 authored by Timo Koch's avatar Timo Koch Committed by hanchuan
Browse files

[test][ff][angeli] Enable setting the start time

parent 75858e5c
No related branches found
No related tags found
1 merge request!2607Improve angeli test
...@@ -136,17 +136,19 @@ int main(int argc, char** argv) ...@@ -136,17 +136,19 @@ int main(int argc, char** argv)
// get some time loop parameters // get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
const auto tStart = getParam<Scalar>("TimeLoop.TStart", 0.0);
const auto tEnd = getParam<Scalar>("TimeLoop.TEnd"); const auto tEnd = getParam<Scalar>("TimeLoop.TEnd");
const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize"); const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
auto dt = getParam<Scalar>("TimeLoop.DtInitial"); auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// instantiate time loop // instantiate time loop
auto timeLoop = std::make_shared<TimeLoop<Scalar>>(0, dt, tEnd); auto timeLoop = std::make_shared<TimeLoop<Scalar>>(tStart, dt, tEnd);
timeLoop->setMaxTimeStepSize(maxDt); timeLoop->setMaxTimeStepSize(maxDt);
// the problem (initial and boundary conditions) // the problem (initial and boundary conditions)
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
auto problem = std::make_shared<Problem>(gridGeometry); auto problem = std::make_shared<Problem>(gridGeometry);
problem->setTime(timeLoop->time());
// the solution vector // the solution vector
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment