From c7e807cf74323bed447de0b39c08ef569c42b7d2 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 25 Apr 2015 15:12:08 +0100 Subject: [PATCH] timeSelector: Rename option zeroTime -> withZero for consistency with the noZero option --- .../reconstructPar/reconstructPar.C | 10 +++++----- .../reconstructParMesh/reconstructParMesh.C | 2 +- .../foamToEnsightParts/foamToEnsightParts.C | 2 +- src/OpenFOAM/db/Time/timeSelector.C | 16 ++++++++-------- src/OpenFOAM/db/Time/timeSelector.H | 12 ++++++------ 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 29a94fe2c..db2df9eec 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -72,8 +72,8 @@ int main(int argc, char *argv[]) "Reconstruct fields of a parallel case" ); - // enable -constant ... if someone really wants it - // enable -zeroTime to prevent accidentally trashing the initial fields + // Enable -constant ... if someone really wants it + // Enable -withZero to prevent accidentally trashing the initial fields timeSelector::addOptions(true, true); argList::noParallel(); #include "addRegionOption.H" @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) ); } - // use the times list from the master processor + // Use the times list from the master processor // and select a subset based on the command-line options instantList timeDirs = timeSelector::select ( @@ -308,7 +308,7 @@ int main(int argc, char *argv[]) processorMeshes procMeshes(databases, regionName); - // check face addressing for meshes that have been decomposed + // Check face addressing for meshes that have been decomposed // with a very old foam version #include "checkFaceAddressingComp.H" @@ -882,7 +882,7 @@ int main(int argc, char *argv[]) } } - Info<< "\nEnd\n" << endl; + Info<< "End.\n" << endl; return 0; } diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 7f8f3d67f..cfa77f702 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -432,7 +432,7 @@ int main(int argc, char *argv[]) ); // Enable -constant ... if someone really wants it - // Enable -zeroTime to prevent accidentally trashing the initial fields + // Enable -withZero to prevent accidentally trashing the initial fields timeSelector::addOptions(true, true); argList::noParallel(); argList::addOption diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index c58a008c5..62b1f9e0a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -79,7 +79,7 @@ using namespace Foam; int main(int argc, char *argv[]) { // enable -constant - // probably don't need -zeroTime though, since the fields are vetted + // probably don't need -withZero though, since the fields are vetted // afterwards anyhow timeSelector::addOptions(true, false); argList::noParallel(); diff --git a/src/OpenFOAM/db/Time/timeSelector.C b/src/OpenFOAM/db/Time/timeSelector.C index 05c12671b..61f3d9a64 100644 --- a/src/OpenFOAM/db/Time/timeSelector.C +++ b/src/OpenFOAM/db/Time/timeSelector.C @@ -113,7 +113,7 @@ void Foam::timeSelector::inplaceSelect(instantList& Times) const void Foam::timeSelector::addOptions ( const bool constant, - const bool zeroTime + const bool withZero ) { if (constant) @@ -124,11 +124,11 @@ void Foam::timeSelector::addOptions "include the 'constant/' dir in the times list" ); } - if (zeroTime) + if (withZero) { argList::addBoolOption ( - "zeroTime", + "withZero", "include the '0/' dir in the times list" ); } @@ -136,7 +136,7 @@ void Foam::timeSelector::addOptions ( "noZero", "exclude the '0/' dir from the times list, " - "has precedence over the -zeroTime option" + "has precedence over the -withZero option" ); argList::addBoolOption ( @@ -228,10 +228,10 @@ Foam::List Foam::timeSelector::select // Exclude 0/ if specifically requested selectTimes[zeroIdx] = false; } - else if (argList::validOptions.found("zeroTime")) + else if (argList::validOptions.found("withZero")) { - // With -zeroTime enabled, drop 0/ unless specifically requested - selectTimes[zeroIdx] = args.optionFound("zeroTime"); + // With -withZero enabled, drop 0/ unless specifically requested + selectTimes[zeroIdx] = args.optionFound("withZero"); } } @@ -284,7 +284,7 @@ Foam::List Foam::timeSelector::selectIfPresent || args.optionFound("time") || args.optionFound("constant") || args.optionFound("noZero") - || args.optionFound("zeroTime") + || args.optionFound("withZero") ) { return select0(runTime, args); diff --git a/src/OpenFOAM/db/Time/timeSelector.H b/src/OpenFOAM/db/Time/timeSelector.H index 1af2be592..590da7a1b 100644 --- a/src/OpenFOAM/db/Time/timeSelector.H +++ b/src/OpenFOAM/db/Time/timeSelector.H @@ -59,7 +59,7 @@ Description \endverbatim The first argument avoids adding the \b -constant option. The second - argument adds an additional \b -zeroTime option and also prevents the + argument adds an additional \b -withZero option and also prevents the \c 0/ directory from being included in the default time range and in the \b -latestTime selection. @@ -122,16 +122,16 @@ public: // \param constant // Add the \b -constant option to include the \c constant/ directory // - // \param zeroTime - // Enable the \b -zeroTime option and alter the normal time selection + // \param withZero + // Enable the \b -withZero option and alter the normal time selection // behaviour (and \b -latestTime behaviour) to exclude the \c 0/ // directory. The \c 0/ directory will only be included when - // \b -zeroTime is specified. - // The \b -noZero option has precedence over the @b -zeroTime option. + // \b -withZero is specified. + // The \b -noZero option has precedence over the @b -withZero option. static void addOptions ( const bool constant=true, - const bool zeroTime=false + const bool withZero=false ); //- Return the set of times selected based on the argList options