checkTimeOption.H
Go to the documentation of this file.
1 // Check -time and -latestTime options
2 
3 if (args.optionFound("time"))
4 {
5  Foam::scalar timeValue = args.optionRead<scalar>("time");
6 
8 }
9 
10 if (args.optionFound("latestTime"))
11 {
12  startTime = Times.size() - 1;
13 }
bool optionFound(const word &opt) const
Return true if the named option is found.
Definition: argListI.H:108
T optionRead(const word &opt) const
Read a value from the named option.
Definition: argListI.H:187
Foam::argList args(argc, argv)
Foam::label startTime
static label findClosestTimeIndex(const instantList &, const scalar, const word &constantName="constant")
Search instantList for the time index closest to the given time.
Definition: Time.C:738