timeSelector: Rename option zeroTime -> withZero for consistency with the noZero option

This commit is contained in:
Henry
2015-04-25 15:12:08 +01:00
parent dcdc7a2265
commit 82c0cc5312
5 changed files with 21 additions and 21 deletions

View File

@ -72,8 +72,8 @@ int main(int argc, char *argv[])
"Reconstruct fields of a parallel case" "Reconstruct fields of a parallel case"
); );
// enable -constant ... if someone really wants it // 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); timeSelector::addOptions(true, true);
argList::noParallel(); argList::noParallel();
#include "addRegionOption.H" #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 // and select a subset based on the command-line options
instantList timeDirs = timeSelector::select instantList timeDirs = timeSelector::select
( (
@ -308,7 +308,7 @@ int main(int argc, char *argv[])
processorMeshes procMeshes(databases, regionName); 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 // with a very old foam version
#include "checkFaceAddressingComp.H" #include "checkFaceAddressingComp.H"
@ -882,7 +882,7 @@ int main(int argc, char *argv[])
} }
} }
Info<< "\nEnd\n" << endl; Info<< "End.\n" << endl;
return 0; return 0;
} }

View File

@ -432,7 +432,7 @@ int main(int argc, char *argv[])
); );
// Enable -constant ... if someone really wants it // 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); timeSelector::addOptions(true, true);
argList::noParallel(); argList::noParallel();
argList::addOption argList::addOption

View File

@ -79,7 +79,7 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// enable -constant // 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 // afterwards anyhow
timeSelector::addOptions(true, false); timeSelector::addOptions(true, false);
argList::noParallel(); argList::noParallel();

View File

@ -113,7 +113,7 @@ void Foam::timeSelector::inplaceSelect(instantList& Times) const
void Foam::timeSelector::addOptions void Foam::timeSelector::addOptions
( (
const bool constant, const bool constant,
const bool zeroTime const bool withZero
) )
{ {
if (constant) if (constant)
@ -124,11 +124,11 @@ void Foam::timeSelector::addOptions
"include the 'constant/' dir in the times list" "include the 'constant/' dir in the times list"
); );
} }
if (zeroTime) if (withZero)
{ {
argList::addBoolOption argList::addBoolOption
( (
"zeroTime", "withZero",
"include the '0/' dir in the times list" "include the '0/' dir in the times list"
); );
} }
@ -136,7 +136,7 @@ void Foam::timeSelector::addOptions
( (
"noZero", "noZero",
"exclude the '0/' dir from the times list, " "exclude the '0/' dir from the times list, "
"has precedence over the -zeroTime option" "has precedence over the -withZero option"
); );
argList::addBoolOption argList::addBoolOption
( (
@ -228,10 +228,10 @@ Foam::List<Foam::instant> Foam::timeSelector::select
// Exclude 0/ if specifically requested // Exclude 0/ if specifically requested
selectTimes[zeroIdx] = false; selectTimes[zeroIdx] = false;
} }
else if (argList::validOptions.found("zeroTime")) else if (argList::validOptions.found("withZero"))
{ {
// With -zeroTime enabled, drop 0/ unless specifically requested // With -withZero enabled, drop 0/ unless specifically requested
selectTimes[zeroIdx] = args.optionFound("zeroTime"); selectTimes[zeroIdx] = args.optionFound("withZero");
} }
} }
@ -284,7 +284,7 @@ Foam::List<Foam::instant> Foam::timeSelector::selectIfPresent
|| args.optionFound("time") || args.optionFound("time")
|| args.optionFound("constant") || args.optionFound("constant")
|| args.optionFound("noZero") || args.optionFound("noZero")
|| args.optionFound("zeroTime") || args.optionFound("withZero")
) )
{ {
return select0(runTime, args); return select0(runTime, args);

View File

@ -59,7 +59,7 @@ Description
\endverbatim \endverbatim
The first argument avoids adding the \b -constant option. The second 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 \c 0/ directory from being included in the default time range and in the
\b -latestTime selection. \b -latestTime selection.
@ -122,16 +122,16 @@ public:
// \param constant // \param constant
// Add the \b -constant option to include the \c constant/ directory // Add the \b -constant option to include the \c constant/ directory
// //
// \param zeroTime // \param withZero
// Enable the \b -zeroTime option and alter the normal time selection // Enable the \b -withZero option and alter the normal time selection
// behaviour (and \b -latestTime behaviour) to exclude the \c 0/ // behaviour (and \b -latestTime behaviour) to exclude the \c 0/
// directory. The \c 0/ directory will only be included when // directory. The \c 0/ directory will only be included when
// \b -zeroTime is specified. // \b -withZero is specified.
// The \b -noZero option has precedence over the @b -zeroTime option. // The \b -noZero option has precedence over the @b -withZero option.
static void addOptions static void addOptions
( (
const bool constant=true, const bool constant=true,
const bool zeroTime=false const bool withZero=false
); );
//- Return the set of times selected based on the argList options //- Return the set of times selected based on the argList options