OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

checkTimeOption.H

Go to the documentation of this file.
00001 //
00002 // checkTimeOption.H
00003 // ~~~~~~~~~~~~~~~~~
00004 // check -time and -latestTime options
00005 
00006     if (args.optionFound("time"))
00007     {
00008         Foam::scalar timeValue = args.optionRead<scalar>("time");
00009 
00010         startTime = Foam::Time::findClosestTimeIndex(Times, timeValue);
00011         endTime = startTime + 1;
00012     }
00013 
00014     if (args.optionFound("latestTime"))
00015     {
00016         startTime = Times.size() - 1;
00017     }
Copyright © 2000-2009 OpenCFD Ltd