ENH: add usage information for '-overwrite' option.

- make centrally available via #include "addOverwriteOption.H"
This commit is contained in:
Mark Olesen
2010-02-16 11:44:27 +01:00
parent cb527178ea
commit ee293cde8e
27 changed files with 158 additions and 106 deletions

View File

@ -34,8 +34,8 @@ Usage
- decomposePar [OPTION]
@param -cellDist \n
Write the cell distribution as a labelList for use with 'manual'
decomposition method and as a volScalarField for post-processing.
Write the cell distribution as a labelList, for use with 'manual'
decomposition method or as a volScalarField for post-processing.
@param -region regionName \n
Decompose named region. Does not check for existence of processor*.
@ -84,7 +84,12 @@ int main(int argc, char *argv[])
{
argList::noParallel();
# include "addRegionOption.H"
argList::addBoolOption("cellDist");
argList::addBoolOption
(
"cellDist",
"write cell distribution as a labelList - for use with 'manual' "
"decomposition method or as a volScalarField for post-processing."
);
argList::addBoolOption
(
"copyUniform",
@ -106,6 +111,11 @@ int main(int argc, char *argv[])
"only decompose geometry if the number of domains has changed"
);
argList::addNote
(
"decompose a mesh and fields of a case for parallel execution"
);
# include "setRootCase.H"
word regionName = fvMesh::defaultRegion;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,8 +50,18 @@ int main(int argc, char *argv[])
timeSelector::addOptions(true, true);
argList::noParallel();
# include "addRegionOption.H"
argList::addOption("fields", "\"(list of fields)\"");
argList::addBoolOption("noLagrangian");
argList::addOption
(
"fields",
"list",
"specify a list of fields to be reconstructed. Eg, '(U T p)' - "
"regular expressions not currently supported"
);
argList::addBoolOption
(
"noLagrangian",
"skip reconstructing lagrangian positions and fields"
);
# include "setRootCase.H"
# include "createTime.H"
@ -62,7 +72,7 @@ int main(int argc, char *argv[])
args.optionLookup("fields")() >> selectedFields;
}
bool noLagrangian = args.optionFound("noLagrangian");
const bool noLagrangian = args.optionFound("noLagrangian");
// determine the processor count directly
label nProcs = 0;
@ -111,10 +121,10 @@ int main(int argc, char *argv[])
}
# include "createNamedMesh.H"
fileName regionPrefix = "";
word regionDir = word::null;
if (regionName != fvMesh::defaultRegion)
{
regionPrefix = regionName;
regionDir = regionName;
}
// Set all times on processor meshes equal to reconstructed mesh
@ -289,7 +299,7 @@ int main(int argc, char *argv[])
(
readDir
(
databases[procI].timePath()/regionPrefix/cloud::prefix,
databases[procI].timePath() / regionDir / cloud::prefix,
fileName::DIRECTORY
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -281,8 +281,23 @@ autoPtr<mapPolyMesh> mergeSharedPoints
int main(int argc, char *argv[])
{
argList::noParallel();
argList::addOption("mergeTol", "relative merge distance");
argList::addBoolOption("fullMatch");
argList::addOption
(
"mergeTol",
"scalar",
"specify the merge distance relative to the bounding box size "
"(default 1E-7)"
);
argList::addBoolOption
(
"fullMatch",
"do (slower) geometric matching on all boundary faces"
);
argList::addNote
(
"reconstruct a mesh using geometric information only"
);
# include "addTimeOptions.H"
# include "addRegionOption.H"
@ -306,11 +321,11 @@ int main(int argc, char *argv[])
word regionName = polyMesh::defaultRegion;
fileName regionPrefix = "";
if (args.optionFound("region"))
word regionDir = word::null;
if (args.optionReadIfPresent("region", regionName))
{
regionName = args.option("region");
regionPrefix = regionName;
regionDir = regionName;
Info<< "Operating on region " << regionName << nl << endl;
}
@ -425,7 +440,7 @@ int main(int argc, char *argv[])
(
databases[procI].findInstance
(
regionPrefix/polyMesh::meshSubDir,
regionDir / polyMesh::meshSubDir,
"points"
)
);
@ -454,10 +469,10 @@ int main(int argc, char *argv[])
"points",
databases[procI].findInstance
(
regionPrefix/polyMesh::meshSubDir,
regionDir / polyMesh::meshSubDir,
"points"
),
regionPrefix/polyMesh::meshSubDir,
regionDir / polyMesh::meshSubDir,
databases[procI],
IOobject::MUST_READ,
IOobject::NO_WRITE,