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

18 lines
394 B
C
Raw Normal View History

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