Skip to content
Snippets Groups Projects
Commit 48d9efa2 authored by Mathis Kelm's avatar Mathis Kelm Committed by Ivan Buntic
Browse files

[test] use iterators for timeLoop.setCheckpoint

parent ee9f4093
No related branches found
No related tags found
1 merge request!3697[cleanup][timeloop][test] Fix deprecation warnings from setCheckPoint
Pipeline #37905 passed
+3
...@@ -200,7 +200,7 @@ Based on that, the checkpoints for the simulation are set. ...@@ -200,7 +200,7 @@ Based on that, the checkpoints for the simulation are set.
// We set the time loop with episodes of various lengths as specified in the injection file // We set the time loop with episodes of various lengths as specified in the injection file
// set the episode ends /check points: // set the episode ends /check points:
timeLoop->setCheckPoint(injectionCheckPoints); timeLoop->setCheckPoint(injectionCheckPoints.begin(), injectionCheckPoints.end());
// We also set the initial episodeIdx in the problem to zero, as in the problem the boundary conditions depend on the episode. // We also set the initial episodeIdx in the problem to zero, as in the problem the boundary conditions depend on the episode.
problem->setEpisodeIdx(episodeIdx); problem->setEpisodeIdx(episodeIdx);
......
...@@ -148,7 +148,7 @@ int main(int argc, char** argv) try ...@@ -148,7 +148,7 @@ int main(int argc, char** argv) try
// We set the time loop with episodes of various lengths as specified in the injection file // We set the time loop with episodes of various lengths as specified in the injection file
// set the episode ends /check points: // set the episode ends /check points:
timeLoop->setCheckPoint(injectionCheckPoints); timeLoop->setCheckPoint(injectionCheckPoints.begin(), injectionCheckPoints.end());
// We also set the initial episodeIdx in the problem to zero, as in the problem the boundary conditions depend on the episode. // We also set the initial episodeIdx in the problem to zero, as in the problem the boundary conditions depend on the episode.
problem->setEpisodeIdx(episodeIdx); problem->setEpisodeIdx(episodeIdx);
......
...@@ -86,7 +86,7 @@ int main(int argc, char** argv) ...@@ -86,7 +86,7 @@ int main(int argc, char** argv)
if (hasParam("TimeLoop.PrintoutTimes")) if (hasParam("TimeLoop.PrintoutTimes"))
{ {
const auto timeLoopPrintoutTimes = getParam<std::vector<double>>("TimeLoop.PrintoutTimes"); const auto timeLoopPrintoutTimes = getParam<std::vector<double>>("TimeLoop.PrintoutTimes");
timeLoop->setCheckPoint(timeLoopPrintoutTimes); timeLoop->setCheckPoint(timeLoopPrintoutTimes.begin(), timeLoopPrintoutTimes.end());
} }
timeLoop->setCheckPoint(tEnd); timeLoop->setCheckPoint(tEnd);
......
...@@ -92,7 +92,7 @@ int main(int argc, char** argv) ...@@ -92,7 +92,7 @@ int main(int argc, char** argv)
// instantiate time loop // instantiate time loop
auto timeLoop = std::make_shared<CheckPointTimeLoop<double>>(0.0, dt, tEnd); auto timeLoop = std::make_shared<CheckPointTimeLoop<double>>(0.0, dt, tEnd);
timeLoop->setMaxTimeStepSize(getParam<double>("TimeLoop.MaxTimeStepSize")); timeLoop->setMaxTimeStepSize(getParam<double>("TimeLoop.MaxTimeStepSize"));
timeLoop->setCheckPoint(checkPoints); timeLoop->setCheckPoint(checkPoints.begin(), checkPoints.end());
int checkPointCounter = 0; int checkPointCounter = 0;
using Assembler = FVAssembler<TypeTag, DiffMethod::analytic>; using Assembler = FVAssembler<TypeTag, DiffMethod::analytic>;
......
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