This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/src/OpenFOAM/include/checkTimeOption.H
2010-08-24 16:19:39 +01:00

17 lines
394 B
C

//
// checkTimeOption.H
// ~~~~~~~~~~~~~~~~~
// check -time and -latestTime options
if (args.optionFound("time"))
{
Foam::scalar timeValue = args.optionRead<scalar>("time");
startTime = Foam::Time::findClosestTimeIndex(Times, timeValue);
endTime = startTime + 1;
}
if (args.optionFound("latestTime"))
{
startTime = Times.size() - 1;
}