Commit ee293cde authored by Mark Olesen's avatar Mark Olesen
Browse files

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

- make centrally available via #include "addOverwriteOption.H"
parent cb527178
......@@ -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));
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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]);
......
......@@ -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);
......
......@@ -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"
......
extrude2DMesh.C
doExtrude2DMesh.C
extrude2DMeshApp.C
EXE = $(FOAM_APPBIN)/extrude2DMesh
......@@ -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
......
......@@ -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();
......
......@@ -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)
{
......
......@@ -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));
......
......@@ -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)
{
......
......@@ -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"
......
......@@ -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());
......
......@@ -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;
......
......@@ -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());
......
......@@ -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
......
......@@ -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);
......
Supports Markdown
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