ENH: support usage descriptions for command arguments

This commit is contained in:
Mark Olesen
2018-12-12 11:58:56 +01:00
parent c3b6c787a7
commit f38190213c
49 changed files with 256 additions and 110 deletions

View File

@ -350,7 +350,11 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H"
argList::addArgument("featureAngle [0..180]");
argList::addArgument
(
"featureAngle",
"in degrees [0-180]"
);
argList::addOption
(
"concaveAngle",
@ -360,7 +364,7 @@ int main(int argc, char *argv[])
argList::addBoolOption
(
"meshQuality",
"Read user-defined mesh quality criterions from system/meshQualityDict"
"Read user-defined mesh quality criteria from system/meshQualityDict"
);
argList::noFunctionObjects(); // Never use function objects
@ -411,7 +415,7 @@ int main(int argc, char *argv[])
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
)
);
}

View File

@ -31,7 +31,7 @@ Description
Refine cells next to specified patches.
Arguments:
1: List of patch name regular expressions
1: List of patch names or regular expressions
2: The size of the refined cells as a fraction of the edge-length.
Examples:
@ -63,13 +63,21 @@ int main(int argc, char *argv[])
{
argList::addNote
(
"Refine cells next to specified patches.\n"
"The list of patches may contain regular expressions.\n"
"Refine cells next to specified patches."
);
#include "addOverwriteOption.H"
argList::addArgument("patches");
argList::addArgument("edgeFraction");
argList::addArgument
(
"patches",
"The list of patch names or regex - Eg, '(top \"Wall.\")'"
);
argList::addArgument
(
"edgeFraction",
"The size of the refined cells as a fraction of the edge-length"
" on a (0,1) interval"
);
argList::addOption
(

View File

@ -526,7 +526,11 @@ int main(int argc, char *argv[])
);
#include "addOverwriteOption.H"
argList::noParallel();
argList::addArgument("edgeAngle [0..360]");
argList::addArgument
(
"edgeAngle",
"in degrees [0-360]"
);
argList::addOption
(