FreeFOAM The Cross-Platform CFD Toolkit
checkTimeOption.H
Go to the documentation of this file.
1 //
2 // checkTimeOption.H
3 // ~~~~~~~~~~~~~~~~~
4 // check -time and -latestTime options
5 
6  if (args.optionFound("time"))
7  {
8  Foam::scalar timeValue = args.optionRead<scalar>("time");
9 
10  startTime = Foam::Time::findClosestTimeIndex(Times, timeValue);
11  endTime = startTime + 1;
12  }
13 
14  if (args.optionFound("latestTime"))
15  {
16  startTime = Times.size() - 1;
17  }