Files
openfoam/src/OpenFOAM/include/checkTimeOption.H
Mark Olesen 1310e85225 ENH: support 'get()' for retrieving argList options
- previously only had 'opt<..>()' for options, but 'get<..>()'
  provides more similarity with dictionary methods.
  The 'opt<..>()' method is retained.
2019-11-26 21:07:11 +01:00

14 lines
261 B
C

// Check -time and -latestTime options
if (args.found("time"))
{
Foam::scalar timeValue = args.get<scalar>("time");
startTime = Foam::Time::findClosestTimeIndex(Times, timeValue);
}
if (args.found("latestTime"))
{
startTime = Times.size() - 1;
}