mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support usage descriptions for command arguments
This commit is contained in:
@ -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
|
||||
|
||||
@ -56,9 +56,9 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("surface1", "The input surface file 1");
|
||||
argList::addArgument("surface2", "The input surface file 2");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -1509,14 +1509,18 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Generates the extendedFeatureEdgeMesh for the interface between"
|
||||
"Generates the extendedFeatureEdgeMesh for the interface created by"
|
||||
" a boolean operation on two surfaces."
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("action");
|
||||
argList::addArgument("surfaceFile1");
|
||||
argList::addArgument("surfaceFile2");
|
||||
argList::addArgument
|
||||
(
|
||||
"action",
|
||||
"One of (intersection | union | difference)"
|
||||
);
|
||||
argList::addArgument("surface1", "The input surface file 1");
|
||||
argList::addArgument("surface2", "The input surface file 2");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
@ -1560,12 +1564,6 @@ int main(int argc, char *argv[])
|
||||
" 'mixed' (keep all)"
|
||||
);
|
||||
|
||||
argList::addNote
|
||||
(
|
||||
"Valid actions: \"intersection\", \"union\", \"difference\""
|
||||
);
|
||||
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
|
||||
@ -323,7 +323,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"checkSelfIntersection",
|
||||
|
||||
@ -59,10 +59,11 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("min length");
|
||||
argList::addArgument("min quality");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("length", "The min length");
|
||||
argList::addArgument("quality", "The min quality");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noClean",
|
||||
|
||||
@ -77,9 +77,9 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("reductionFactor");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("factor", "The reduction factor [0,1)");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
|
||||
@ -68,8 +68,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("inputFile");
|
||||
argList::addArgument("outputFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -49,8 +49,8 @@ int main(int argc, char *argv[])
|
||||
"Convert between edgeMesh formats"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("inputFile");
|
||||
argList::addArgument("outputFile");
|
||||
argList::addArgument("input", "The input edge file");
|
||||
argList::addArgument("output", "The output edge file");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
|
||||
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addOption("x", "X", "The point x-coordinate (if non-zero)");
|
||||
argList::addOption("y", "Y", "The point y-coordinate (if non-zero)");
|
||||
argList::addOption("z", "Z", "The point y-coordinate (if non-zero)");
|
||||
|
||||
@ -273,7 +273,7 @@ int main(int argc, char *argv[])
|
||||
" boundary edges to match other surface boundary edges"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("hookTolerance");
|
||||
argList::addArgument("hookTolerance", "The point merge tolerance");
|
||||
|
||||
#include "addDictOption.H"
|
||||
|
||||
|
||||
@ -60,7 +60,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"shellProperties",
|
||||
|
||||
@ -597,9 +597,9 @@ int main(int argc, char *argv[])
|
||||
"Switch on additional debug information"
|
||||
);
|
||||
|
||||
argList::addArgument("inputFile");
|
||||
argList::addArgument("distance");
|
||||
argList::addArgument("safety factor [1..]");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("distance", "The inflate distance");
|
||||
argList::addArgument("factor", "The extend safety factor [1,10]");
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
|
||||
@ -140,11 +140,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
argList::noParallel();
|
||||
argList::validOptions.clear();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("lambda (0..1)");
|
||||
argList::addArgument("mu (0..1)");
|
||||
argList::addArgument("iterations");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("lambda", "On the interval [0,1]");
|
||||
argList::addArgument("mu", "On the interval [0,1]");
|
||||
argList::addArgument("iterations", "The number of iterations to perform");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"featureFile",
|
||||
|
||||
@ -80,8 +80,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("inputFile");
|
||||
argList::addArgument("outputFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("outputFile");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("inputFile");
|
||||
argList::addArgument("surface", "The input surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("surface", "The input surface file");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -66,7 +66,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
timeSelector::addOptions();
|
||||
|
||||
argList::addArgument("output file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -50,9 +50,10 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("visiblePoint");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("point", "The visible 'outside' point");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"inside",
|
||||
|
||||
@ -51,9 +51,9 @@ int main(int argc, char *argv[])
|
||||
"Merge points on surface if they are within absolute distance [m]."
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("merge distance");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("distance", "The merge distance");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -59,8 +59,8 @@ int main(int argc, char *argv[])
|
||||
"Refine by splitting all three edges of triangle"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
|
||||
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("input surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfName = args[1];
|
||||
|
||||
@ -53,8 +53,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
argList::noParallel();
|
||||
argList::validOptions.clear();
|
||||
argList::addArgument("input surface file");
|
||||
argList::addArgument("output surface file");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList args(argc, argv);
|
||||
|
||||
fileName surfFileName(args[1]);
|
||||
|
||||
@ -681,8 +681,8 @@ int main(int argc, char *argv[])
|
||||
"Split multiply connected surface edges by duplicating points"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"debug",
|
||||
|
||||
@ -58,9 +58,9 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceSubsetDict");
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("dict", "The surfaceSubsetDict");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList args(argc, argv);
|
||||
|
||||
Info<< "Reading dictionary " << args[1] << " ..." << endl;
|
||||
|
||||
@ -66,8 +66,8 @@ int main(int argc, char *argv[])
|
||||
"Note: roll=rotate about x, pitch=rotate about y, yaw=rotate about z"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::addArgument("surfaceFile");
|
||||
argList::addArgument("output surfaceFile");
|
||||
argList::addArgument("input", "The input surface file");
|
||||
argList::addArgument("output", "The output surface file");
|
||||
argList::addOption
|
||||
(
|
||||
"translate",
|
||||
|
||||
Reference in New Issue
Block a user