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

@ -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
@ -453,8 +453,8 @@ label simplifyFaces
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
argList::addBoolOption("overwrite");
argList::validArgs.append("edge length [m]");
argList::validArgs.append("merge angle (degrees)");
@ -466,7 +466,7 @@ int main(int argc, char *argv[])
scalar minLen(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
scalar maxCos = Foam::cos(degToRad(angle));

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
@ -428,10 +428,17 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::validArgs.append("feature angle [0..180]");
argList::addOption("concaveAngle", "[0..180]");
argList::addOption
(
"concaveAngle",
"[0..180]",
"specify concave angle [0..180] degrees (default: 30.0 degrees)"
);
argList::addBoolOption("snapMesh");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -449,8 +456,8 @@ int main(int argc, char *argv[])
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
bool snapMeshDict = args.optionFound("snapMesh");
bool overwrite = args.optionFound("overwrite");
const bool snapMeshDict = args.optionFound("snapMesh");
const bool overwrite = args.optionFound("overwrite");
Info<< "Merging all faces of a cell" << nl
<< " - which are on the same patch" << nl

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
@ -328,7 +328,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
int main(int argc, char *argv[])
{
argList::addBoolOption("overwrite");
# include "addOverwriteOption.H"
# include "setRootCase.H"
# include "createTime.H"
@ -336,7 +336,7 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
Info<< "Reading modifyMeshDict\n" << endl;

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
@ -52,8 +52,9 @@ using namespace Foam;
// Main program:
int main(int argc, char *argv[])
{
argList::addBoolOption("overwrite");
# include "addOverwriteOption.H"
argList::validArgs.append("cellSet");
# include "setRootCase.H"
# include "createTime.H"
runTime.functionObjects().off();
@ -63,7 +64,7 @@ int main(int argc, char *argv[])
pointMesh pMesh(mesh);
word cellSetName(args.args()[1]);
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
Info<< "Reading cells to refine from cellSet " << cellSetName
<< nl << endl;

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
@ -47,12 +47,12 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
argList::validArgs.append("patchName");
argList::validArgs.append("edgeWeight");
argList::addOption("useSet", "cellSet");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
word patchName(args.additionalArgs()[0]);
scalar weight(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
label patchID = mesh.boundaryMesh().findPatchID(patchName);

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
@ -48,7 +48,7 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addBoolOption("overwrite");
# include "addOverwriteOption.H"
argList::validArgs.append("faceSet");
# include "setRootCase.H"
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
# include "createMesh.H"
const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
word setName(args.additionalArgs()[0]);

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
@ -524,11 +524,11 @@ void collectCuts
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
argList::addOption("set", "cellSet name");
argList::addBoolOption("geometry");
argList::addOption("tol", "edge snap tolerance");
argList::addBoolOption("overwrite");
argList::validArgs.append("edge angle [0..360]");
# include "setRootCase.H"
@ -542,9 +542,9 @@ int main(int argc, char *argv[])
scalar minCos = Foam::cos(degToRad(featureAngle));
scalar minSin = Foam::sin(degToRad(featureAngle));
bool readSet = args.optionFound("set");
bool geometry = args.optionFound("geometry");
bool overwrite = args.optionFound("overwrite");
const bool readSet = args.optionFound("set");
const bool geometry = args.optionFound("geometry");
const bool overwrite = args.optionFound("overwrite");
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);

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
@ -353,6 +353,7 @@ void dumpFeatures
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
timeSelector::addOptions(true, false);
@ -360,7 +361,6 @@ int main(int argc, char *argv[])
argList::addBoolOption("splitAllFaces");
argList::addBoolOption("concaveMultiCells");
argList::addBoolOption("doNotPreserveFaceZones");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"

View File

@ -1,4 +1,4 @@
extrude2DMesh.C
doExtrude2DMesh.C
extrude2DMeshApp.C
EXE = $(FOAM_APPBIN)/extrude2DMesh

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
@ -38,7 +38,6 @@ Usage
Note
Not sure about the walking of the faces to create the front and back faces.
Tested on one .ccm file.
\*---------------------------------------------------------------------------*/
@ -57,8 +56,9 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::validArgs.append("thickness");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
runTime.functionObjects().off();
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance();
scalar thickness(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
// Check that mesh is 2D

View File

@ -120,11 +120,8 @@ void writeMesh
int main(int argc, char *argv[])
{
argList::addBoolOption
(
"overwrite",
"overwrite existing mesh files"
);
# include "addOverwriteOption.H"
# include "setRootCase.H"
# include "createTime.H"
runTime.functionObjects().off();

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
@ -41,8 +41,8 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
if (!overwrite)
{

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
@ -69,9 +69,9 @@ void collectFeatureEdges(const boundaryMesh& bMesh, labelList& markedEdges)
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::noParallel();
argList::validArgs.append("feature angle[0-180]");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
boundaryMesh bMesh;
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
scalar minCos = Foam::cos(degToRad(featureAngle));

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
@ -125,12 +125,13 @@ label findPatchID(const polyMesh& mesh, const word& name)
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
# include "addRegionOption.H"
argList::validArgs.append("faceZone");
argList::validArgs.append("patch");
argList::addOption("additionalPatches", "(patch2 .. patchN)");
argList::addBoolOption("internalFacesOnly");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -191,9 +192,8 @@ int main(int argc, char *argv[])
}
bool overwrite = args.optionFound("overwrite");
bool internalFacesOnly = args.optionFound("internalFacesOnly");
const bool overwrite = args.optionFound("overwrite");
const bool internalFacesOnly = args.optionFound("internalFacesOnly");
if (internalFacesOnly)
{

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
@ -516,8 +516,8 @@ void syncPoints
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
# include "addRegionOption.H"
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"

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
@ -222,19 +222,20 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
# include "addRegionOption.H"
argList::addBoolOption("split");
argList::addBoolOption("overwrite");
argList::addBoolOption("detectOnly");
# include "setRootCase.H"
# include "createTime.H"
runTime.functionObjects().off();
# include "createNamedMesh.H"
const word oldInstance = mesh.pointsInstance();
bool split = args.optionFound("split");
bool overwrite = args.optionFound("overwrite");
bool detectOnly = args.optionFound("detectOnly");
const bool split = args.optionFound("split");
const bool overwrite = args.optionFound("overwrite");
const bool detectOnly = args.optionFound("detectOnly");
// Collect all boundary faces
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());

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
@ -291,8 +291,8 @@ label twoDNess(const polyMesh& mesh)
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::addBoolOption("dict");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -307,8 +307,8 @@ int main(int argc, char *argv[])
// Read/construct control dictionary
//
bool readDict = args.optionFound("dict");
bool overwrite = args.optionFound("overwrite");
const bool readDict = args.optionFound("dict");
const bool overwrite = args.optionFound("overwrite");
// List of cells to refine
labelList refCells;

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 anispulation |
-------------------------------------------------------------------------------
License
@ -367,8 +367,8 @@ int main(int argc, char *argv[])
argList::addBoolOption("blockOrder");
argList::addBoolOption("orderPoints");
argList::addBoolOption("writeMaps");
argList::addBoolOption("overwrite");
# include "addOverwriteOption.H"
# include "addTimeOptions.H"
# include "setRootCase.H"
@ -409,7 +409,7 @@ int main(int argc, char *argv[])
<< endl;
}
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
label band = getBand(mesh.faceOwner(), mesh.faceNeighbour());

View File

@ -66,9 +66,9 @@ void interpolateFields
int main(int argc, char *argv[])
{
argList::addBoolOption("overwrite");
# include "addOverwriteOption.H"
# include "addTimeOptions.H"
# include "setRootCase.H"
# include "createTime.H"
// Get times list
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
# include "createMesh.H"
const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
// Read objects in time 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
@ -111,11 +111,11 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
int main(int argc, char *argv[])
{
argList::noParallel();
# include "addOverwriteOption.H"
argList::validArgs.append("faceSet");
argList::validArgs.append("masterPatch");
argList::validArgs.append("slavePatch");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -126,7 +126,8 @@ int main(int argc, char *argv[])
word setName(args.additionalArgs()[0]);
word masterPatch(args.additionalArgs()[1]);
word slavePatch(args.additionalArgs()[2]);
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
// List of faces to split
faceSet facesSet(mesh, setName);

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
@ -1309,13 +1309,13 @@ label findCorrespondingRegion
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::addBoolOption("cellZones");
argList::addBoolOption("cellZonesOnly");
argList::addOption("blockedFaces", "faceSet");
argList::addBoolOption("makeCellZones");
argList::addBoolOption("largestOnly");
argList::addOption("insidePoint", "point");
argList::addBoolOption("overwrite");
argList::addBoolOption("detectOnly");
argList::addBoolOption("sloppyCellZones");
@ -1333,14 +1333,14 @@ int main(int argc, char *argv[])
<< blockedFacesName << nl << endl;
}
bool makeCellZones = args.optionFound("makeCellZones");
bool largestOnly = args.optionFound("largestOnly");
bool insidePoint = args.optionFound("insidePoint");
bool useCellZones = args.optionFound("cellZones");
bool useCellZonesOnly = args.optionFound("cellZonesOnly");
bool overwrite = args.optionFound("overwrite");
bool detectOnly = args.optionFound("detectOnly");
bool sloppyCellZones = args.optionFound("sloppyCellZones");
const bool makeCellZones = args.optionFound("makeCellZones");
const bool largestOnly = args.optionFound("largestOnly");
const bool insidePoint = args.optionFound("insidePoint");
const bool useCellZones = args.optionFound("cellZones");
const bool useCellZonesOnly = args.optionFound("cellZonesOnly");
const bool overwrite = args.optionFound("overwrite");
const bool detectOnly = args.optionFound("detectOnly");
const bool sloppyCellZones = args.optionFound("sloppyCellZones");
if (insidePoint && largestOnly)
{

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
@ -96,6 +96,7 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
int main(int argc, char *argv[])
{
argList::noParallel();
# include "addOverwriteOption.H"
# include "addRegionOption.H"
argList::validArgs.append("masterPatch");
@ -103,7 +104,6 @@ int main(int argc, char *argv[])
argList::addBoolOption("partial");
argList::addBoolOption("perfect");
argList::addBoolOption("overwrite");
argList::addOption("toleranceDict", "file with tolerances");
@ -117,9 +117,9 @@ int main(int argc, char *argv[])
word masterPatchName(args.additionalArgs()[0]);
word slavePatchName(args.additionalArgs()[1]);
bool partialCover = args.optionFound("partial");
bool perfectCover = args.optionFound("perfect");
bool overwrite = args.optionFound("overwrite");
const bool partialCover = args.optionFound("partial");
const bool perfectCover = args.optionFound("perfect");
const bool overwrite = args.optionFound("overwrite");
if (partialCover && perfectCover)
{

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
@ -151,9 +151,9 @@ void subsetPointFields
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
argList::validArgs.append("set");
argList::addOption("patch", "patch name");
argList::addBoolOption("overwrite");
# include "setRootCase.H"
# include "createTime.H"
@ -162,7 +162,7 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance();
word setName(args.additionalArgs()[0]);
bool overwrite = args.optionFound("overwrite");
const bool overwrite = args.optionFound("overwrite");
Info<< "Reading cell set from " << setName << endl << endl;

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,

View File

@ -0,0 +1,10 @@
//
// addOverwriteOption.H
// ~~~~~~~~~~~~~~~~~~~~
Foam::argList::addOption
(
"overwrite",
"overwrite existing mesh/results files"
);