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

@ -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();