mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Use argList::addOption, argList::addBoolOption (almost) everywhere
- ensure that the standard options (eg, from timeSelector) also have some usage information
This commit is contained in:
@ -124,15 +124,37 @@ void Foam::timeSelector::addOptions
|
||||
{
|
||||
if (constant)
|
||||
{
|
||||
argList::validOptions.insert("constant", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"constant",
|
||||
"include the 'constant/' dir in the times list"
|
||||
);
|
||||
}
|
||||
if (zeroTime)
|
||||
{
|
||||
argList::validOptions.insert("zeroTime", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"zeroTime",
|
||||
"include the '0/' dir in the times list"
|
||||
);
|
||||
}
|
||||
argList::validOptions.insert("noZero", "");
|
||||
argList::validOptions.insert("time", "ranges");
|
||||
argList::validOptions.insert("latestTime", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noZero",
|
||||
"exclude the '0/' dir from the times list, "
|
||||
"has precedence over the -zeroTime option"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"latestTime",
|
||||
"select the latest time"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"time",
|
||||
"ranges",
|
||||
"comma-separated time ranges - eg, ':10,20,40-70,1000:'"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,4 +2,10 @@
|
||||
// addRegionOption.H
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList::validOptions.insert("region", "name");
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"region",
|
||||
"name",
|
||||
"specify alternative mesh region"
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,28 @@
|
||||
// addTimeOptions.H
|
||||
// ~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList::validOptions.insert("constant", "");
|
||||
Foam::argList::validOptions.insert("latestTime", "");
|
||||
Foam::argList::validOptions.insert("noZero", "");
|
||||
Foam::argList::validOptions.insert("time", "time");
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"constant",
|
||||
"include the 'constant/' dir in the times list"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"latestTime",
|
||||
"select the latest time"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"noZero",
|
||||
"exclude the '0/' dir from the times list"
|
||||
);
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"time",
|
||||
"time",
|
||||
"specify a single time value to select"
|
||||
);
|
||||
|
||||
|
||||
@ -58,8 +58,16 @@ namespace Foam
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::timeSelector::addOptions();
|
||||
Foam::argList::validOptions.insert("noWrite", "");
|
||||
Foam::argList::validOptions.insert("dict", "dictionary name");
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"noWrite",
|
||||
"suppress writing results"
|
||||
);
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"dictionary name"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
Reference in New Issue
Block a user