mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
use timeSelector mechanism in a few more utilities
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user