Commit f3819021 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: support usage descriptions for command arguments

parent c3b6c787
......@@ -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
)
)
)
);
}
......
......@@ -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
(
......
......@@ -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
(
......
......@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
);
argList::noParallel();
argList::addArgument("ccmMesh");
argList::addArgument("ccm-file", "The input .ccm or .ccmg file");
argList::addBoolOption
(
"ascii",
......
......@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
);
argList::noParallel();
argList::addArgument("firePolyMesh");
argList::addArgument("firePolyMesh", "The input FIRE mesh");
argList::addBoolOption
(
"ascii",
......
......@@ -61,7 +61,8 @@ int main(int argc, char *argv[])
"Extract boundaries from an OpenFOAM mesh and write in a surface format"
);
argList::noParallel();
argList::addArgument("outputFile.ext");
argList::addArgument("output", "The output surface file");
timeSelector::addOptions();
argList::addOption
......
......@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
);
argList::noParallel();
argList::addArgument("PROSTAR prefix");
argList::addArgument("prefix", "The prefix for the input PROSTAR files");
argList::addBoolOption
(
"ascii",
......
......@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
"Convert tetgen .ele and .node and .face files to an OpenFOAM mesh"
);
argList::addArgument("file prefix");
argList::addArgument("prefix", "The prefix for the input tetgen files");
argList::addBoolOption
(
"noFaceFile",
......
......@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
);
argList::noParallel();
argList::addArgument(".vtk ascii file");
argList::addArgument("vtk-file", "The input legacy ascii vtk file");
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -369,7 +369,7 @@ int main(int argc, char *argv[])
"Re-sample surfaces used in foamyHexMesh operation"
);
argList::addArgument("outputName");
argList::addArgument("output", "The output triSurface/ file");
argList::noFunctionObjects(); // Never use function objects
......
......@@ -53,8 +53,8 @@ int main(int argc, char *argv[])
(
"Re-sample surfaces used in foamyHexMesh operation"
);
argList::addArgument("(nx ny nz)");
argList::addArgument("outputName");
argList::addArgument("(nx ny nz)", "The resampling interval");
argList::addArgument("output", "The output triSurface/ file");
argList::noFunctionObjects(); // Never use function objects
......
......@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
argList::noParallel();
argList::noFunctionObjects(); // Never use function objects
argList::addArgument("feature angle[0-180]");
argList::addArgument("featureAngle", "in degrees [0-180]");
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
" supplied as an argument"
);
argList::addArgument("scaling factor");
argList::addArgument("factor", "The deformation scaling factor");
#include "setRootCase.H"
......
......@@ -116,8 +116,8 @@ int main(int argc, char *argv[])
);
argList::noParallel();
argList::addArgument("OBJ file");
argList::addArgument("output VTK file");
argList::addArgument("obj-file", "The input obj line file");
argList::addArgument("vtk-file", "The output vtk file");
argList args(argc, argv);
const fileName objName = args[1];
......
......@@ -28,7 +28,7 @@ Group
grpMeshManipulationUtilities
Description
Corrects teh orientation of faceZone.
Corrects the orientation of faceZone.
- correct in parallel - excludes coupled faceZones from walk
- correct for non-manifold faceZones - restarts walk
......@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
);
#include "addRegionOption.H"
argList::addArgument("faceZone");
argList::addArgument("outsidePoint");
argList::addArgument("point", "A point outside of the mesh");
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -368,7 +368,12 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H"
argList::noParallel();
argList::addArgument("featureAngle [0-180]");
argList::addArgument
(
"featureAngle",
"in degrees [0-180]"
);
argList::addBoolOption
(
"splitAllFaces",
......
......@@ -72,13 +72,13 @@ int main(int argc, char *argv[])
argList::addNote
(
"Rotate mesh points and vector/tensor fields\n"
"Rotation from the <n1> vector to the <n2> vector"
"Rotation from the <from> vector to the <to> vector"
);
timeSelector::addOptions();
argList::addArgument("n1");
argList::addArgument("n2");
argList::addArgument("from", "The vector to rotate from");
argList::addArgument("to", "The vector to rotate to");
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -123,9 +123,9 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H"
argList::addArgument("faceSet");
argList::addArgument("masterPatch");
argList::addArgument("slavePatch");
argList::addArgument("faceSet", "The faces used for splitting");
argList::addArgument("master", "The master patch name");
argList::addArgument("slave", "The slave patch name");
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -145,8 +145,16 @@ int main(int argc, char *argv[])
);
// The arguments are non-mandatory when using dictionary mode
argList::addArgument("masterPatch");
argList::addArgument("slavePatch");
argList::addArgument
(
"master",
"The master patch name (non-dictionary mode)"
);
argList::addArgument
(
"slave",
"The slave patch name (non-dictionary mode)"
);
#include "setRootCaseNonMandatoryArgs.H"
......
......@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
argList::noBanner();
argList::noJobInfo();
argList::addArgument("dictionary");
argList::addArgument("dict", "The dictionary file to process");
argList::addBoolOption("keywords", "List keywords");
argList::addOption("entry", "name", "Report/select the named entry");
argList::addBoolOption
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment