Commit 147fa2a7 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: add notes to some (most) command-line options

- mapFields and splitMeshRegions need more clarification
parent 5debfe4c
......@@ -41,7 +41,12 @@ Description
int main(int argc, char *argv[])
{
argList::addOption("cloudName", "cloud name");
argList::addOption
(
"cloudName",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
#include "setRootCase.H"
#include "createTime.H"
......
......@@ -38,7 +38,7 @@ Description
E.g. to allow all faces on same patch to be merged:
combinePatchFaces .. cavity 180 -concaveAngle 90
combinePatchFaces 180 -concaveAngle 90
\*---------------------------------------------------------------------------*/
......@@ -429,15 +429,18 @@ int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::validArgs.append("feature angle [0..180]");
argList::validArgs.append("featureAngle [0..180]");
argList::addOption
(
"concaveAngle",
"[0..180]",
"specify concave angle [0..180] degrees (default: 30.0 degrees)"
"degrees",
"specify concave angle [0..180] (default: 30 degrees)"
);
argList::addBoolOption
(
"snapMesh",
"use system/snapMeshDict"
);
argList::addBoolOption("snapMesh");
# include "setRootCase.H"
# include "createTime.H"
......
......@@ -46,12 +46,18 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
#include "addOverwriteOption.H"
argList::noParallel();
argList::validArgs.append("patchName");
argList::validArgs.append("edgeWeight");
argList::addOption("useSet", "cellSet");
argList::addOption
(
"useSet",
"name",
"restrict cells to refine based on specified cellSet name"
);
# include "setRootCase.H"
# include "createTime.H"
......
......@@ -96,11 +96,15 @@ bool limitRefinementLevel
int main(int argc, char *argv[])
{
argList::addBoolOption("readLevel");
argList::addBoolOption
(
"readLevel",
"read level from refinementLevel file"
);
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createPolyMesh.H"
Info<< "Dividing cells into bins depending on cell volume.\nThis will"
<< " correspond to refinement levels for a mesh with only 2x2x2"
......@@ -109,7 +113,7 @@ int main(int argc, char *argv[])
<< " to allow for some truncation error."
<< nl << endl;
bool readLevel = args.optionFound("readLevel");
const bool readLevel = args.optionFound("readLevel");
const scalarField& vols = mesh.cellVolumes();
......
......@@ -517,17 +517,35 @@ void collectCuts
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::addNote
(
"split cells with flat faces"
);
#include "addOverwriteOption.H"
argList::noParallel();
argList::addOption("set", "cellSet name");
argList::addBoolOption("geometry");
argList::addOption("tol", "edge snap tolerance");
argList::validArgs.append("edge angle [0..360]");
argList::validArgs.append("edgeAngle [0..360]");
argList::addOption
(
"set",
"name",
"split cells from specified cellSet only"
);
argList::addBoolOption
(
"geometry",
"use geometric cut for hexes as well"
);
argList::addOption
(
"tol",
"scalar", "edge snap tolerance (default 0.2)"
);
# include "setRootCase.H"
# include "createTime.H"
#include "setRootCase.H"
#include "createTime.H"
runTime.functionObjects().off();
# include "createPolyMesh.H"
#include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
const scalar featureAngle = args.argRead<scalar>(1);
......@@ -538,7 +556,7 @@ int main(int argc, char *argv[])
const bool geometry = args.optionFound("geometry");
const bool overwrite = args.optionFound("overwrite");
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
<< "featureAngle : " << featureAngle << nl
......
......@@ -235,7 +235,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("ANSYS input file");
argList::addOption("scale", "scale factor");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList args(argc, argv);
......@@ -244,8 +249,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
......
......@@ -49,7 +49,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("CFX geom file");
argList::addOption("scale", "scale factor");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList args(argc, argv);
......@@ -58,8 +63,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
......
......@@ -761,10 +761,30 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("Fluent mesh file");
argList::addOption("scale", "scale factor");
argList::addOption("ignoreCellGroups", "cell group names");
argList::addOption("ignoreFaceGroups", "face group names");
argList::addBoolOption("cubit");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList::addOption
(
"ignoreCellGroups",
"names",
"specify cell groups to ignore"
);
argList::addOption
(
"ignoreFaceGroups",
"names",
"specify face groups to ignore"
);
argList::addBoolOption
(
"cubit",
"special parsing of (incorrect) cubit files"
);
argList args(argc, argv);
......
......@@ -866,9 +866,22 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("Fluent mesh file");
argList::addOption("scale", "scale factor");
argList::addBoolOption("writeSets");
argList::addBoolOption("writeZones");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList::addBoolOption
(
"writeSets",
"write cell zones and patches as sets"
);
argList::addBoolOption
(
"writeZones",
"write cell zones as zones"
);
argList args(argc, argv);
......@@ -877,8 +890,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
const bool writeSets = args.optionFound("writeSets");
const bool writeZones = args.optionFound("writeZones");
......@@ -1554,7 +1566,7 @@ int main(int argc, char *argv[])
// interior boundaries are handled via faceSets
// cell zones will only be written if there is more than one
if (writeZones && cellGroupZoneID.size()>1)
if (writeZones && cellGroupZoneID.size() > 1)
{
Info<< "Adding Zones" << endl;
List<pointZone*> pz(0);
......
......@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
(
"scale",
"factor",
"specify geometry scaling factor - default is 1000 ([m] to [mm])"
"geometry scaling factor - default is 1000 ([m] to [mm])"
);
argList::addBoolOption
(
......
......@@ -61,8 +61,8 @@ int main(int argc, char *argv[])
argList::addOption
(
"scale",
"scale",
"specify geometry scaling factor"
"factor",
"geometry scaling factor - default is 1"
);
argList::addBoolOption
(
......
......@@ -628,7 +628,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("GAMBIT file");
argList::addOption("scale", "scale factor");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList args(argc, argv);
......@@ -637,8 +642,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
......
......@@ -716,7 +716,11 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append(".msh file");
argList::addBoolOption("keepOrientation");
argList::addBoolOption
(
"keepOrientation",
"retain raw orientation for prisms/hexs"
);
# include "setRootCase.H"
# include "createTime.H"
......
......@@ -46,7 +46,7 @@ Description
using namespace Foam;
// Supported KIVA versions
//- Supported KIVA versions
enum kivaVersions
{
kiva3,
......@@ -59,37 +59,51 @@ enum kivaVersions
int main(int argc, char *argv[])
{
argList::noParallel();
argList::addOption("file", "fileName");
argList::addOption("version", "[kiva3|kiva3v]");
argList::addOption("zHeadMin", "scalar");
argList::addOption
(
"file",
"name",
"specify alternative input file name - default is otape17"
);
argList::addOption
(
"version",
"version",
"specify kiva version [kiva3|kiva3v] - default is '3v'"
);
argList::addOption
(
"zHeadMin",
"scalar",
"minimum z-height for transferring liner faces to cylinder-head"
);
# include "setRootCase.H"
# include "createTime.H"
fileName kivaFileName("otape17");
args.optionReadIfPresent("file", kivaFileName);
const fileName kivaFileName =
args.optionLookupOrDefault<fileName>("file", "otape17");
kivaVersions kivaVersion = kiva3v;
if (args.optionFound("version"))
{
const word kivaVersionName = args["version"];
const word versionName = args["version"];
if (kivaVersionName == "kiva3")
if (versionName == "kiva3")
{
kivaVersion = kiva3;
}
else if (kivaVersionName == "kiva3v")
else if (versionName == "kiva3v")
{
kivaVersion = kiva3v;
}
else
{
FatalErrorIn("main(int argc, char *argv[])")
<< "KIVA file version " << kivaVersionName << " not supported"
<< "KIVA file version " << versionName << " not supported"
<< exit(FatalError);
args.printUsage();
FatalError.exit(1);
}
}
......
......@@ -315,7 +315,7 @@ for (label i=0; i<nPoints; i++)
}
}
// Tranfer liner faces that are above the minimum cylinder-head z height
// Transfer liner faces that are above the minimum cylinder-head z height
// into the cylinder-head region
if
(
......
......@@ -56,7 +56,11 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append(".msh file");
argList::addBoolOption("hex");
argList::addBoolOption
(
"hex",
"treat input as containing hex instead of tet cells"
);
# include "setRootCase.H"
# include "createTime.H"
......@@ -69,11 +73,11 @@ int main(int argc, char *argv[])
if (readHex)
{
Info<< "Trying to read " << nCells << " hexes." << endl << endl;
Info<< "Trying to read " << nCells << " hexes." << nl << endl;
}
else
{
Info<< "Trying to read " << nCells << " tets." << endl << endl;
Info<< "Trying to read " << nCells << " tets." << nl << endl;
}
cellShapeList cells(nCells);
......
......@@ -57,10 +57,28 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("PLOT3D geom file");
argList::addOption("scale", "scale factor");
argList::addBoolOption("noBlank");
argList::addBoolOption("singleBlock");
argList::addOption("2D", "thickness");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList::addBoolOption
(
"noBlank",
"skip blank items"
);
argList::addBoolOption
(
"singleBlock",
"input is a single block"
);
argList::addOption
(
"2D",
"thickness",
"use when converting a 2-D geometry"
);
argList args(argc, argv);
......@@ -69,8 +87,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
bool readBlank = !args.optionFound("noBlank");
bool singleBlock = args.optionFound("singleBlock");
......
......@@ -356,7 +356,7 @@ int main(int argc, char *argv[])
argList::noParallel();
timeSelector::addOptions(true, false);
argList::validArgs.append("feature angle[0-180]");
argList::validArgs.append("featureAngle [0-180]");
argList::addBoolOption
(
"splitAllFaces",
......
......@@ -40,7 +40,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("SAMM mesh file prefix");
argList::addOption("scale", "scale factor");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList args(argc, argv);
......@@ -49,7 +54,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
......
......@@ -40,7 +40,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("STAR mesh file prefix");
argList::addOption("scale", "scale factor");
argList::addOption
(
"scale",
"factor",
"geometry scaling factor - default is 1"
);
argList args(argc, argv);
......@@ -49,7 +54,7 @@ int main(int argc, char *argv[])
FatalError.exit();
}
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
......
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