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

- mapFields and splitMeshRegions need more clarification
This commit is contained in:
Mark Olesen
2010-04-27 10:50:15 +02:00
parent 5debfe4cdf
commit 147fa2a75d
85 changed files with 1221 additions and 472 deletions

View File

@ -49,9 +49,28 @@ static const scalar kappa(0.41);
int main(int argc, char *argv[])
{
argList::addOption("ybl", "scalar");
argList::addOption("Cbl", "scalar");
argList::addBoolOption("writenut");
argList::addNote
(
"apply a simplified boundary-layer model to the velocity and\n"
"turbulence fields based on the 1/7th power-law."
);
argList::addOption
(
"ybl",
"scalar",
"specify the boundary-layer thickness"
);
argList::addOption
(
"Cbl", "scalar",
"boundary-layer thickness as Cbl * mean distance to wall"
);
argList::addBoolOption
(
"writenut",
"write nut field"
);
#include "setRootCase.H"
#include "createTime.H"

View File

@ -60,7 +60,7 @@ License
else if (args.optionFound("Cbl"))
{
// Calculate boundary layer thickness as Cbl * mean distance to wall
ybl.value() = gAverage(y)*args.optionRead<scalar>("Cbl");
ybl.value() = gAverage(y) * args.optionRead<scalar>("Cbl");
}
else
{

View File

@ -333,13 +333,17 @@ void updateIncompressibleCase(const fvMesh& mesh)
int main(int argc, char *argv[])
{
#include "addTimeOptions.H"
argList::addBoolOption("compressible");
argList::addBoolOption
(
"compressible",
"force use of compressible wall functions. default is auto-detect."
);
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
bool compressible = args.optionFound("compressible");
const bool compressible = args.optionFound("compressible");
Info<< "Updating turbulence fields to operate using new run time "
<< "selectable" << nl << "wall functions"

View File

@ -244,15 +244,24 @@ bool merge
int main(int argc, char *argv[])
{
argList::addOption("instance", "instance");
argList::addBoolOption("literalRE");
argList::addOption
(
"instance",
"name",
"specify alternate time instance - default is latest time"
);
argList::addBoolOption
(
"literalRE",
"treat regular expressions literally (ie, as a keyword)"
);
#include "addRegionOption.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createNamedMesh.H"
bool literalRE = args.optionFound("literalRE");
const bool literalRE = args.optionFound("literalRE");
if (literalRE)
{

View File

@ -48,8 +48,17 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addNote
(
"upgrade the syntax of system/fvSolution::solvers"
);
argList::noParallel();
argList::addBoolOption("test");
argList::addBoolOption
(
"test",
"suppress writing the updated system/fvSolution file"
);
# include "setRootCase.H"
# include "createTime.H"
@ -89,7 +98,6 @@ int main(int argc, char *argv[])
<< (solutionDict.objectPath() + ".old") << nl;
}
solutionDict.writeObject
(
IOstream::ASCII,

View File

@ -227,7 +227,53 @@ wordList addProcessorPatches
int main(int argc, char *argv[])
{
#include "setRoots.H"
argList::addNote
(
"map volume fields from one mesh to another"
);
argList::noParallel();
argList::validArgs.clear();
argList::validArgs.append("sourceCase");
argList::addOption
(
"sourceTime",
"scalar",
"specify the source time"
);
argList::addBoolOption
(
"parallelSource",
"the source is decomposed"
);
argList::addBoolOption
(
"parallelTarget",
"the target is decomposed"
);
argList::addBoolOption("consistent");
argList args(argc, argv);
if (!args.check())
{
FatalError.exit();
}
fileName rootDirTarget(args.rootPath());
fileName caseDirTarget(args.globalCaseName());
const fileName casePath = args[1];
const fileName rootDirSource = casePath.path();
const fileName caseDirSource = casePath.name();
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl;
const bool parallelSource = args.optionFound("parallelSource");
const bool parallelTarget = args.optionFound("parallelTarget");
const bool consistent = args.optionFound("consistent");
#include "createTimes.H"
HashTable<word> patchMap;
@ -249,7 +295,6 @@ int main(int argc, char *argv[])
);
mapFieldsDict.lookup("patchMap") >> patchMap;
mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches;
}

View File

@ -1,30 +0,0 @@
argList::noParallel();
argList::validArgs.clear();
argList::validArgs.append("source dir");
argList::addOption("sourceTime", "scalar");
argList::addBoolOption("parallelSource");
argList::addBoolOption("parallelTarget");
argList::addBoolOption("consistent");
argList args(argc, argv);
if (!args.check())
{
FatalError.exit();
}
fileName rootDirTarget(args.rootPath());
fileName caseDirTarget(args.globalCaseName());
const fileName casePath = args[1];
const fileName rootDirSource = casePath.path();
const fileName caseDirSource = casePath.name();
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl;
const bool parallelSource = args.optionFound("parallelSource");
const bool parallelTarget = args.optionFound("parallelTarget");
const bool consistent = args.optionFound("consistent");