mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- previously only had 'opt<..>()' for options, but 'get<..>()' provides more similarity with dictionary methods. The 'opt<..>()' method is retained.
14 lines
261 B
C
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;
|
|
}
|