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

@ -38,26 +38,22 @@ Description
int main(int argc, char *argv[])
{
argList::noParallel();
# include "addTimeOptions.H"
timeSelector::addOptions(false); // no constant
# include "setRootCase.H"
# include "createTime.H"
instantList Times = runTime.times();
// set startTime and endTime depending on -time and -latestTime options
# include "checkTimeOptionsNoConstant.H"
runTime.setTime(Times[startTime], startTime);
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
// make a directory called proInterface in the case
mkDir(runTime.rootPath()/runTime.caseName()/"fluentInterface");
for (label timeI = startTime; timeI < endTime; timeI++)
forAll(timeDirs, timeI)
{
runTime.setTime(Times[timeI], timeI);
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time = " << runTime.timeName() << endl;
if (mesh.readUpdate())

View File

@ -225,8 +225,10 @@ labelList getSelectedPatches
int main(int argc, char *argv[])
{
# include "addTimeOptions.H"
timeSelector::addOptions();
# include "addRegionOption.H"
argList::validOptions.insert("fields", "fields");
argList::validOptions.insert("cellSet", "cellSet name");
argList::validOptions.insert("faceSet", "faceSet name");
@ -244,7 +246,6 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
bool doWriteInternal = !args.options().found("noInternal");
bool doFaceZones = !args.options().found("noFaceZones");
bool doLinks = !args.options().found("noLinks");
@ -312,14 +313,8 @@ int main(int argc, char *argv[])
}
instantList Times = runTime.times();
instantList timeDirs = timeSelector::select0(runTime, args);
// set startTime and endTime depending on -time and -latestTime options
# include "checkTimeOptions.H"
runTime.setTime(Times[startTime], startTime);
// Current mesh.
# include "createNamedMesh.H"
// VTK/ directory in the case
@ -359,11 +354,11 @@ int main(int argc, char *argv[])
// mesh wrapper; does subsetting and decomposition
vtkMesh vMesh(mesh, cellSetName);
for (label timeI = startTime; timeI < endTime; timeI++)
forAll(timeDirs, timeI)
{
runTime.setTime(Times[timeI], timeI);
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time " << Times[timeI].name() << endl;
Info<< "Time: " << runTime.timeName() << endl;
// Check for new polyMesh/ and update mesh, fvMeshSubset and cell
// decomposition.