use timeSelector mechanism in a few more utilities

This commit is contained in:
Mark Olesen
2009-03-23 16:57:26 +01:00
parent 549c78f9fe
commit be8cbc1018
21 changed files with 124 additions and 239 deletions

View File

@ -26,7 +26,7 @@ Application
streamFunction
Description
Calculates and writes the stream function of velocity field U at each time
Calculates and writes the stream function of velocity field U at each time
\*---------------------------------------------------------------------------*/
@ -42,27 +42,20 @@ Description
int main(int argc, char *argv[])
{
timeSelector::addOptions();
# include "addTimeOptions.H"
# include "setRootCase.H"
# include "createTime.H"
// Get times list
instantList Times = runTime.times();
// set startTime and endTime depending on -time and -latestTime options
# include "checkTimeOptions.H"
runTime.setTime(Times[startTime], startTime);
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMeshNoClear.H"
pointMesh pMesh(mesh);
for (label i=startTime; i<endTime; i++)
forAll(timeDirs, timeI)
{
runTime.setTime(Times[i], i);
runTime.setTime(timeDirs[timeI], timeI);
Info<< nl << "Time: " << runTime.timeName() << endl;