Merge branch 'olesenm'

This commit is contained in:
andy
2010-02-17 16:48:44 +00:00
158 changed files with 804 additions and 712 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
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
if (args.optionFound("flag"))
{
Info<<"-flag:" << args.option("flag") << endl;
Info<<"-flag:" << args["flag"] << endl;
}
if (args.optionReadIfPresent<scalar>("float", xxx))

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
@ -109,10 +109,8 @@ int main(int argc, char *argv[])
argList::validArgs.append("ODESolver");
argList args(argc, argv);
word ODESolverName(args.additionalArgs()[0]);
testODE ode;
autoPtr<ODESolver> odeSolver = ODESolver::New(ODESolverName, ode);
autoPtr<ODESolver> odeSolver = ODESolver::New(args[1], ode);
scalar xStart = 1.0;
scalarField yStart(ode.nEqns());

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
@ -130,15 +130,15 @@ int main(int argc, char *argv[])
return 0;
}
else if (args.additionalArgs().empty())
else if (args.size() <= 1)
{
args.printUsage();
}
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
const string& srcFile = args.additionalArgs()[argI];
const string& srcFile = args[argI];
Info<< nl << "reading " << srcFile << nl;
IFstream ifs(srcFile);

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
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
<< endl;
if (args.additionalArgs().empty())
if (args.size() <= 1)
{
{
dictionary dict1(IFstream("testDict")());
@ -114,9 +114,9 @@ int main(int argc, char *argv[])
else
{
IOobject::writeDivider(Info);
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
const string& dictFile = args.additionalArgs()[argI];
const string& dictFile = args[argI];
IFstream is(dictFile);
dictionary dict(is);

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) 2009-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
argList args(argc, argv, false, true);
if (args.additionalArgs().empty() && args.options().empty())
if (args.size() <= 1 && args.options().empty())
{
args.printUsage();
}
@ -90,9 +90,9 @@ int main(int argc, char *argv[])
printCleaning(pathName);
}
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
pathName = args.additionalArgs()[argI];
pathName = args[argI];
printCleaning(pathName);
}

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
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createMesh.H"
point sample(IStringStream(args.additionalArgs()[0])());
const point sample = args.argRead<point>(1);
treeBoundBox meshBb(mesh.points());
@ -82,8 +82,8 @@ int main(int argc, char *argv[])
);
Info<< "Point:" << sample << " is in shape "
<< oc.find(sample) << endl;
Info<< "Point:" << sample << " is in cell "
<< oc.find(sample) << nl
<< "Point:" << sample << " is in cell "
<< mesh.findCell(sample) << 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) 2009-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,20 +45,20 @@ int main(int argc, char *argv[])
argList args(argc, argv, false, true);
if (args.additionalArgs().empty())
if (args.size() <= 1)
{
args.printUsage();
}
label ok = 0;
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
const string& srcFile = args.additionalArgs()[argI];
const string& srcFile = args[argI];
if (args.optionFound("ext"))
{
if (mvBak(srcFile, args.option("ext")))
if (mvBak(srcFile, args["ext"]))
{
ok++;
}
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
}
}
Info<< "mvBak called for " << args.additionalArgs().size()
Info<< "mvBak called for " << args.size()-1
<< " files (moved " << ok << ")\n" << endl;
return 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
#include "createMesh.H"
runTime.functionObjects().off();
const word cloudName(args.additionalArgs()[0]);
const word cloudName = args[1];
{
// Start with empty cloud

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
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createPolyMesh.H"
word patchName(args.additionalArgs()[0]);
const word patchName = args[1];
label patchI = 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
@ -42,20 +42,15 @@ int main(int argc, char *argv[])
argList args(argc, argv);
fileName thermoFileName = fileName::null;
if (args.options().found("thermo"))
{
thermoFileName = args.options()["thermo"];
}
args.optionReadIfPresent("thermo", thermoFileName);
fileName CHEMKINFileName(args.additionalArgs()[0]);
chemkinReader ck(args[1], thermoFileName);
chemkinReader ck(CHEMKINFileName, thermoFileName);
//Info<< ck.isotopeAtomicWts() << endl;
//Info<< ck.specieNames() << endl;
//Info<< ck.speciePhase() << endl;
//Info<< ck.specieThermo() << endl;
//Info<< ck.reactions() << endl;
//Info<< ck.isotopeAtomicWts() << nl
// << ck.specieNames() << nl
// << ck.speciePhase() << nl
// << ck.specieThermo() << nl
// << ck.reactions() << endl;
const SLPtrList<gasReaction>& reactions = ck.reactions();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
argList args(argc, argv, false, true);
if (args.additionalArgs().empty())
if (args.size() <= 1)
{
args.printUsage();
}
@ -73,9 +73,9 @@ int main(int argc, char *argv[])
useCatmullRom = true;
}
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
const string& srcFile = args.additionalArgs()[argI];
const string& srcFile = args[argI];
Info<< nl << "reading " << srcFile << nl;
IFstream ifs(srcFile);

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
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
const polyBoundaryMesh& patches = mesh.boundaryMesh();
// Get name of patch
word patchName(args.additionalArgs()[0]);
const word patchName = args[1];
// Find the label in patches by name.
label patchI = patches.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
@ -54,9 +54,9 @@ int main(int argc, char *argv[])
cpuTime timer;
for (label count = 0; count < repeat; ++count)
{
forAll(args.additionalArgs(), argI)
for (label argI=1; argI < args.size(); ++argI)
{
const string& rawArg = args.additionalArgs()[argI];
const string& rawArg = args[argI];
if (count == 0)
{
Info<< "input string: " << rawArg << nl;
@ -94,11 +94,11 @@ int main(int argc, char *argv[])
{
for (label count = 0; count < repeat; ++count)
{
IFstream is(args.option("file"));
IFstream is(args["file"]);
if (count == 0)
{
Info<< "tokenizing file: " << args.option("file") << nl;
Info<< "tokenizing file: " << args["file"] << nl;
}
while (is.good())

View File

@ -17,7 +17,7 @@ FoamFile
// Surface to keep to
surface "plexi.ftr";
surface "plexi.obj";
// What is outside. These points have to be inside a cell (so not on a face!)
outsidePoints ((-0.99001 -0.99001 -0.99001));

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)");
@ -464,9 +464,9 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
scalar minLen(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.optionFound("overwrite");
const scalar minLen = args.argRead<scalar>(1);
const scalar angle = args.argRead<scalar>(2);
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"
@ -439,18 +446,16 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar minCos = Foam::cos(degToRad(featureAngle));
const scalar featureAngle = args.argRead<scalar>(1);
const scalar minCos = Foam::cos(degToRad(featureAngle));
// Sin of angle between two consecutive edges on a face.
// If sin(angle) larger than this the face will be considered concave.
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
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"
@ -60,11 +60,9 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
word patchName(args.additionalArgs()[0]);
scalar weight(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.optionFound("overwrite");
const word patchName = args[1];
const scalar weight = args.argRead<scalar>(2);
const bool overwrite = args.optionFound("overwrite");
label patchID = mesh.boundaryMesh().findPatchID(patchName);
@ -103,20 +101,17 @@ int main(int argc, char *argv[])
// List of cells to refine
//
bool useSet = args.optionFound("useSet");
if (useSet)
word setName;
if (args.optionReadIfPresent("useSet", setName))
{
word setName(args.option("useSet"));
Info<< "Subsetting cells to cut based on cellSet" << setName << endl
<< endl;
Info<< "Subsetting cells to cut based on cellSet"
<< setName << nl << endl;
cellSet cells(mesh, setName);
Info<< "Read " << cells.size() << " cells from cellSet "
<< cells.instance()/cells.local()/cells.name()
<< endl << endl;
<< nl << endl;
for
(
@ -127,8 +122,8 @@ int main(int argc, char *argv[])
{
cutCells.erase(iter.key());
}
Info<< "Removed from cells to cut all the ones not in set " << setName
<< endl << endl;
Info<< "Removed from cells to cut all the ones not in set "
<< setName << nl << endl;
}
// Mark all meshpoints on patch
@ -182,9 +177,9 @@ int main(int argc, char *argv[])
allCutEdges.shrink();
allCutEdgeWeights.shrink();
Info<< "Cutting:" << endl
<< " cells:" << cutCells.size() << endl
<< " edges:" << allCutEdges.size() << endl
Info<< "Cutting:" << nl
<< " cells:" << cutCells.size() << nl
<< " edges:" << allCutEdges.size() << nl
<< endl;
// Transfer DynamicLists to straight ones.

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,9 +57,8 @@ int main(int argc, char *argv[])
# include "createMesh.H"
const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite");
word setName(args.additionalArgs()[0]);
const word setName = args[1];
const bool overwrite = args.optionFound("overwrite");
// Read faces
faceSet candidateSet(mesh, setName);

View File

@ -21,7 +21,7 @@ FoamFile
useSurface false;
// Surface to keep to
surface "plexi.ftr";
surface "plexi.obj";
// What is outside
outsidePoints ((-1 -1 -1));

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"
@ -537,14 +537,13 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
const scalar featureAngle = args.argRead<scalar>(1);
const scalar minCos = Foam::cos(degToRad(featureAngle));
const scalar minSin = Foam::sin(degToRad(featureAngle));
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);
@ -553,7 +552,7 @@ int main(int argc, char *argv[])
<< "edge snapping tol : " << edgeTol << nl;
if (readSet)
{
Info<< "candidate cells : cellSet " << args.option("set") << nl;
Info<< "candidate cells : cellSet " << args["set"] << nl;
}
else
{
@ -581,7 +580,7 @@ int main(int argc, char *argv[])
if (readSet)
{
// Read cells to cut from cellSet
cellSet cells(mesh, args.option("set"));
cellSet cells(mesh, args["set"]);
cellsToCut = cells;
}

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
@ -615,7 +615,7 @@ int main(int argc, char *argv[])
wordList foamPatchNames;
{
fileName ccmFile(args.additionalArgs()[0]);
const fileName ccmFile = args[1];
if (!isFile(ccmFile))
{

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
@ -26,7 +26,8 @@ Application
ansysToFoam
Description
Converts an ANSYS input mesh file, exported from I-DEAS, to FOAM format.
Converts an ANSYS input mesh file, exported from I-DEAS,
to OpenFOAM format.
\*---------------------------------------------------------------------------*/
@ -252,7 +253,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName ansysFile(args.additionalArgs()[0]);
const fileName ansysFile = args[1];
ifstream ansysStream(ansysFile.c_str());
if (!ansysStream)

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
@ -26,7 +26,7 @@ Application
cfx4ToFoam
Description
Converts a CFX 4 mesh to FOAM format
Converts a CFX 4 mesh to OpenFOAM format
\*---------------------------------------------------------------------------*/
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
IFstream cfxFile(args.additionalArgs()[0]);
IFstream cfxFile(args[1]);
// Read the cfx information using a fixed format reader.
// Comments in the file are in C++ style, so the stream parser will remove
@ -603,7 +603,7 @@ int main(int argc, char *argv[])
Info<< "CFX patch " << patchI
<< ", of type " << cfxPatchTypes[patchI]
<< ", name " << cfxPatchNames[patchI]
<< " already exists as FOAM patch " << existingPatch
<< " already exists as OpenFOAM patch " << existingPatch
<< ". Adding faces." << endl;
faceList& renumberedPatch = boundary[existingPatch];
@ -655,7 +655,7 @@ int main(int argc, char *argv[])
Info<< "CFX patch " << patchI
<< ", of type " << cfxPatchTypes[patchI]
<< ", name " << cfxPatchNames[patchI]
<< " converted into FOAM patch " << nCreatedPatches
<< " converted into OpenFOAM patch " << nCreatedPatches
<< " type ";
if (cfxPatchTypes[patchI] == "WALL")

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
@ -795,7 +795,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName fluentFile(args.additionalArgs()[0]);
const fileName fluentFile = args[1];
IFstream fluentStream(fluentFile);
if (!fluentStream)

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
@ -26,7 +26,7 @@ Application
fluentMeshToFoam
Description
Converts a Fluent mesh to FOAM format
Converts a Fluent mesh to OpenFOAM format
including multiple region and region boundary handling.
\*---------------------------------------------------------------------------*/
@ -881,12 +881,12 @@ int main(int argc, char *argv[])
scalar scaleFactor = 1.0;
args.optionReadIfPresent("scale", scaleFactor);
bool writeSets = args.optionFound("writeSets");
bool writeZones = args.optionFound("writeZones");
const bool writeSets = args.optionFound("writeSets");
const bool writeZones = args.optionFound("writeZones");
# include "createTime.H"
fileName fluentFile(args.additionalArgs()[0]);
const fileName fluentFile = args[1];
std::ifstream fluentStream(fluentFile.c_str());
if (!fluentStream)

View File

@ -199,7 +199,8 @@ void Foam::fluentFvMesh::writeFluentMesh() const
fluentMeshFile << l.size() << " ";
// Note: In Fluent, all boundary faces point inwards, which is
// opposite from the FOAM convention. Turn them round on printout
// opposite from the OpenFOAM convention.
// Turn them around on printout
forAllReverse (l, lI)
{
fluentMeshFile << l[lI] + 1 << " ";

View File

@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Writes out the FOAM mesh in Fluent mesh format.
Writes out the OpenFOAM mesh in Fluent mesh format.
\*---------------------------------------------------------------------------*/

View File

@ -73,14 +73,12 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
const stringList& params = args.additionalArgs();
fileName exportName = args[1];
scalar scaleFactor = 0;
args.optionReadIfPresent<scalar>("scale", scaleFactor);
const bool doTriangulate = args.optionFound("tri");
fileName exportName(params[0]);
fileName exportBase = exportName.lessExt();
word exportExt = exportName.ext();

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
@ -26,7 +26,7 @@ Application
gambitToFoam
Description
Converts a GAMBIT mesh to FOAM format.
Converts a GAMBIT mesh to OpenFOAM format.
\*---------------------------------------------------------------------------*/
@ -653,7 +653,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName gambitFile(args.additionalArgs()[0]);
const fileName gambitFile = args[1];
ifstream gambitStream(gambitFile.c_str());
if (!gambitStream)

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
@ -722,9 +722,8 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
fileName mshName(args.additionalArgs()[0]);
bool keepOrientation = args.optionFound("keepOrientation");
const bool keepOrientation = args.optionFound("keepOrientation");
IFstream inFile(args[1]);
// Storage for points
pointField points;
@ -749,9 +748,6 @@ int main(int argc, char *argv[])
// Version 1 or 2 format
bool version2Format = false;
IFstream inFile(mshName);
while (inFile.good())
{
string line;

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
@ -595,9 +595,8 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
fileName ideasName(args.additionalArgs()[0]);
IFstream inFile(ideasName.c_str());
const fileName ideasName = args[1];
IFstream inFile(ideasName);
if (!inFile.good())
{

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
@ -26,7 +26,7 @@ Application
kivaToFoam
Description
Converts a KIVA3v grid to FOAM format
Converts a KIVA3v grid to OpenFOAM format
\*---------------------------------------------------------------------------*/
@ -68,15 +68,12 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName kivaFileName("otape17");
if (args.optionFound("file"))
{
kivaFileName = args.option("file");
}
args.optionReadIfPresent("file", kivaFileName);
kivaVersions kivaVersion = kiva3v;
if (args.optionFound("version"))
{
word kivaVersionName = args.option("version");
const word kivaVersionName = args["version"];
if (kivaVersionName == "kiva3")
{

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
@ -62,10 +62,8 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
bool readHex = args.optionFound("hex");
fileName mshFile(args.additionalArgs()[0]);
IFstream mshStream(mshFile);
const bool readHex = args.optionFound("hex");
IFstream mshStream(args[1]);
label nCells;
mshStream >> nCells;

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
@ -93,11 +93,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
fileName neuFile(args.additionalArgs()[0]);
IFstream str(neuFile);
IFstream str(args[1]);
//
// Read nodes.
@ -106,7 +102,6 @@ int main(int argc, char *argv[])
Info<< "nNodes:" << nNodes << endl;
pointField points(nNodes);
forAll(points, pointI)

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
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
IFstream plot3dFile(args.additionalArgs()[0]);
IFstream plot3dFile(args[1]);
// Read the plot3d information using a fixed format reader.
// Comments in the file are in C++ style, so the stream parser will remove

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"
@ -385,9 +385,8 @@ int main(int argc, char *argv[])
}
}
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar minCos = Foam::cos(degToRad(featureAngle));
const scalar featureAngle = args.argRead<scalar>(1);
const scalar minCos = Foam::cos(degToRad(featureAngle));
Info<< "Feature:" << featureAngle << endl
<< "minCos :" << minCos << endl

View File

@ -30,6 +30,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define starMesh sammMesh
#include "../starToFoam/readPoints.C"
#include "../star3ToFoam/readPoints.C"
// ************************************************************************* //

View File

@ -47,7 +47,7 @@ const cellModel* sammMesh::sammTrim4Ptr_ = cellModeller::lookup("sammTrim4");
const cellModel* sammMesh::sammTrim5Ptr_ = cellModeller::lookup("sammTrim5");
const cellModel* sammMesh::sammTrim8Ptr_ = cellModeller::lookup("hexagonalPrism");
// lookup table giving FOAM face number when looked up with shape index
// lookup table giving OpenFOAM face number when looked up with shape index
// (first index) and STAR face number
// - first column is always -1
// - last column is -1 for all but hexagonal prism

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
@ -26,7 +26,7 @@ Application
sammToFoam
Description
Converts a STAR-CD SAMM mesh to FOAM format
Converts a Star-CD (v3) SAMM mesh to OpenFOAM format.
\*---------------------------------------------------------------------------*/
@ -54,8 +54,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName sammFile(args.additionalArgs()[0]);
sammMesh makeMesh(sammFile, runTime, scaleFactor);
sammMesh makeMesh(args[1], runTime, scaleFactor);
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);

View File

@ -14,6 +14,6 @@ createBoundaryFaces.C
createPolyBoundary.C
purgeCellShapes.C
writeMesh.C
starToFoam.C
star3ToFoam.C
EXE = $(FOAM_APPBIN)/starToFoam
EXE = $(FOAM_APPBIN)/star3ToFoam

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
@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
starToFoam
star3ToFoam
Description
Converts a STAR-CD PROSTAR mesh into FOAM format.
Converts a Star-CD (v3) pro-STAR mesh into OpenFOAM format.
\*---------------------------------------------------------------------------*/
@ -54,8 +54,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
fileName starMeshFile(args.additionalArgs()[0]);
starMesh makeMesh(starMeshFile, runTime, scaleFactor);
starMesh makeMesh(args[1], runTime, scaleFactor);
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);

View File

@ -83,7 +83,7 @@ const label starMesh::sammAddressingTable[9][12] =
};
// lookup table giving FOAM face number when looked up with shape index
// lookup table giving OpenFOAM face number when looked up with shape index
// (first index) and STAR face number
// - first column is always -1
// - last column is -1 for all but hexagonal prism

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
@ -81,7 +81,6 @@ int main(int argc, char *argv[])
argList args(argc, argv);
Time runTime(args.rootPath(), args.caseName());
const stringList& params = args.additionalArgs();
// default rescale from [mm] to [m]
scalar scaleFactor = args.optionLookupOrDefault("scale", 0.001);
@ -103,7 +102,7 @@ int main(int argc, char *argv[])
IOstream::defaultPrecision(10);
// remove extensions and/or trailing '.'
fileName prefix = fileName(params[0]).lessExt();
const fileName prefix = fileName(args[1]).lessExt();
meshReaders::STARCD reader(prefix, runTime, scaleFactor);

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
@ -103,14 +103,12 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
const fileName prefix = args[1];
const bool readFaceFile = !args.optionFound("noFaceFile");
bool readFaceFile = !args.optionFound("noFaceFile");
fileName prefix(args.additionalArgs()[0]);
fileName nodeFile(prefix + ".node");
fileName eleFile(prefix + ".ele");
fileName faceFile(prefix + ".face");
const fileName nodeFile(prefix + ".node");
const fileName eleFile(prefix + ".ele");
const fileName faceFile(prefix + ".face");
if (!readFaceFile)
{

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
@ -463,7 +463,7 @@ int main(int argc, char *argv[])
}
if (doCellSet)
{
word setName(args.option("cellSet"));
const word setName = args["cellSet"];
cellSet cells(mesh, setName);
@ -475,7 +475,7 @@ int main(int argc, char *argv[])
}
if (doFaceSet)
{
word setName(args.option("faceSet"));
const word setName = args["faceSet"];
faceSet faces(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
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
if (args.optionFound("dict"))
{
fileName dictPath(args.option("dict"));
const fileName dictPath = args["dict"];
meshDictIoPtr.set
(

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,16 +56,17 @@ 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();
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
scalar thickness(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.optionFound("overwrite");
const scalar thickness = args.argRead<scalar>(1);
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"
@ -84,21 +84,20 @@ int main(int argc, char *argv[])
<< " s\n" << endl << endl;
//
// Use boundaryMesh to reuse all the featureEdge stuff in there.
//
const scalar featureAngle = args.argRead<scalar>(1);
const bool overwrite = args.optionFound("overwrite");
boundaryMesh bMesh;
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.optionFound("overwrite");
scalar minCos = Foam::cos(degToRad(featureAngle));
const scalar minCos = Foam::cos(degToRad(featureAngle));
Info<< "Feature:" << featureAngle << endl
<< "minCos :" << minCos << endl
<< endl;
//
// Use boundaryMesh to reuse all the featureEdge stuff in there.
//
boundaryMesh bMesh;
bMesh.read(mesh);
// Set feature angle (calculate feature edges)

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"
@ -142,7 +143,7 @@ int main(int argc, char *argv[])
const faceZoneMesh& faceZones = mesh.faceZones();
// Faces to baffle
faceZoneID zoneID(args.additionalArgs()[0], faceZones);
faceZoneID zoneID(args[1], faceZones);
Info<< "Converting faces on zone " << zoneID.name()
<< " into baffles." << nl << endl;
@ -167,7 +168,7 @@ int main(int argc, char *argv[])
// Patches to put baffles into
DynamicList<label> newPatches(1);
word patchName(args.additionalArgs()[1]);
const word patchName = args[2];
newPatches.append(findPatchID(mesh, patchName));
Info<< "Using patch " << patchName
<< " at index " << newPatches[0] << endl;
@ -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
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])()));
const scalar scaleFactor = args.argRead<scalar>(1);
# include "createTime.H"
# include "createMesh.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
@ -51,9 +51,8 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createPolyMesh.H"
fileName surfName(args.additionalArgs()[0]);
fileName setName(args.additionalArgs()[1]);
const fileName surfName = args[1];
const fileName setName = args[2];
// Read surface
Info<< "Reading surface from " << surfName << 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

View File

@ -15,13 +15,13 @@
FatalError.exit();
}
fileName rootDirMaster(args.additionalArgs()[0]);
fileName caseDirMaster(args.additionalArgs()[1]);
fileName rootDirMaster = args[1];
fileName caseDirMaster = args[2];
word masterRegion = polyMesh::defaultRegion;
args.optionReadIfPresent("masterRegion", masterRegion);
fileName rootDirToAdd(args.additionalArgs()[2]);
fileName caseDirToAdd(args.additionalArgs()[3]);
fileName rootDirToAdd = args[3];
fileName caseDirToAdd = args[4];
word addRegion = polyMesh::defaultRegion;
args.optionReadIfPresent("addRegion", addRegion);
@ -29,3 +29,4 @@
<< " region " << masterRegion << nl
<< "mesh to add: " << rootDirToAdd << " " << caseDirToAdd
<< " region " << addRegion << 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
@ -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
@ -116,8 +116,8 @@ int main(int argc, char *argv[])
argList::validArgs.append("output VTK file");
argList::argList args(argc, argv);
fileName objName(args.additionalArgs()[0]);
fileName outName(args.additionalArgs()[1]);
const fileName objName = args[1];
const fileName outName = args[2];
std::ifstream OBJfile(objName.c_str());

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

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anispulation |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -75,10 +75,10 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
vector n1(IStringStream(args.additionalArgs()[0])());
vector n1 = args.argRead<vector>(1);
n1 /= mag(n1);
vector n2(IStringStream(args.additionalArgs()[1])());
vector n2 = args.argRead<vector>(2);
n2 /= mag(n2);
tensor T = rotationTensor(n1, n2);

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
@ -835,15 +835,14 @@ int main(int argc, char *argv[])
# include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args);
bool writeVTK = !args.optionFound("noVTK");
bool loop = args.optionFound("loop");
bool batch = args.optionFound("batch");
const bool writeVTK = !args.optionFound("noVTK");
const bool loop = args.optionFound("loop");
const bool batch = args.optionFound("batch");
if (loop && !batch)
{
FatalErrorIn(args.executable())
<< "Can only loop when in batch mode."
<< "Can only loop in batch mode."
<< exit(FatalError);
}
@ -885,7 +884,7 @@ int main(int argc, char *argv[])
if (batch)
{
fileName batchFile(args.option("batch"));
const fileName batchFile = args["batch"];
Info<< "Reading commands from file " << batchFile << endl;

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"
@ -123,10 +123,10 @@ int main(int argc, char *argv[])
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
word setName(args.additionalArgs()[0]);
word masterPatch(args.additionalArgs()[1]);
word slavePatch(args.additionalArgs()[2]);
bool overwrite = args.optionFound("overwrite");
const word setName = args[1];
const word masterPatch = args[2];
const word slavePatch = args[3];
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");
@ -1326,21 +1326,20 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance();
word blockedFacesName;
if (args.optionFound("blockedFaces"))
if (args.optionReadIfPresent("blockedFaces", blockedFacesName))
{
blockedFacesName = args.option("blockedFaces");
Info<< "Reading blocked internal faces from faceSet "
<< 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)
{
@ -1882,7 +1881,7 @@ int main(int argc, char *argv[])
if (insidePoint)
{
point insidePoint(args.optionLookup("insidePoint")());
const point insidePoint = args.optionRead<point>("insidePoint");
label regionI = -1;

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");
@ -113,13 +113,12 @@ int main(int argc, char *argv[])
# include "createNamedMesh.H"
const word oldInstance = mesh.pointsInstance();
const word masterPatchName = args[1];
const word slavePatchName = args[2];
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"
@ -161,8 +161,8 @@ int main(int argc, char *argv[])
# include "createMesh.H"
const word oldInstance = mesh.pointsInstance();
word setName(args.additionalArgs()[0]);
bool overwrite = args.optionFound("overwrite");
const word setName = args[1];
const bool overwrite = args.optionFound("overwrite");
Info<< "Reading cell set from " << setName << endl << endl;
@ -174,7 +174,7 @@ int main(int argc, char *argv[])
if (args.optionFound("patch"))
{
word patchName(args.option("patch"));
const word patchName = args["patch"];
patchI = 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
@ -210,7 +210,9 @@ int main(int argc, char *argv[])
)
);
const bool doRotateFields = args.optionFound("rotateFields");
// this is not actually stringent enough:
if (args.options().empty())
{
FatalErrorIn(args.executable())
@ -219,18 +221,20 @@ int main(int argc, char *argv[])
<< exit(FatalError);
}
if (args.optionFound("translate"))
vector v;
if (args.optionReadIfPresent("translate", v))
{
vector transVector(args.optionLookup("translate")());
Info<< "Translating points by " << v << endl;
Info<< "Translating points by " << transVector << endl;
points += transVector;
points += v;
}
if (args.optionFound("rotate"))
{
Pair<vector> n1n2(args.optionLookup("rotate")());
Pair<vector> n1n2
(
args.optionLookup("rotate")()
);
n1n2[0] /= mag(n1n2[0]);
n1n2[1] /= mag(n1n2[1]);
tensor T = rotationTensor(n1n2[0], n1n2[1]);
@ -239,20 +243,17 @@ int main(int argc, char *argv[])
points = transform(T, points);
if (args.optionFound("rotateFields"))
if (doRotateFields)
{
rotateFields(args, runTime, T);
}
}
else if (args.optionFound("rollPitchYaw"))
else if (args.optionReadIfPresent("rollPitchYaw", v))
{
vector v(args.optionLookup("rollPitchYaw")());
Info<< "Rotating points by" << nl
<< " roll " << v.x() << nl
<< " pitch " << v.y() << nl
<< " yaw " << v.z() << endl;
<< " yaw " << v.z() << nl;
// Convert to radians
v *= pi/180.0;
@ -262,20 +263,17 @@ int main(int argc, char *argv[])
Info<< "Rotating points by quaternion " << R << endl;
points = transform(R, points);
if (args.optionFound("rotateFields"))
if (doRotateFields)
{
rotateFields(args, runTime, R.R());
}
}
else if (args.optionFound("yawPitchRoll"))
else if (args.optionReadIfPresent("yawPitchRoll", v))
{
vector v(args.optionLookup("yawPitchRoll")());
Info<< "Rotating points by" << nl
<< " yaw " << v.x() << nl
<< " pitch " << v.y() << nl
<< " roll " << v.z() << endl;
<< " roll " << v.z() << nl;
// Convert to radians
v *= pi/180.0;
@ -291,21 +289,19 @@ int main(int argc, char *argv[])
Info<< "Rotating points by quaternion " << R << endl;
points = transform(R, points);
if (args.optionFound("rotateFields"))
if (doRotateFields)
{
rotateFields(args, runTime, R.R());
}
}
if (args.optionFound("scale"))
if (args.optionReadIfPresent("scale", v))
{
vector scaleVector(args.optionLookup("scale")());
Info<< "Scaling points by " << v << endl;
Info<< "Scaling points by " << scaleVector << endl;
points.replace(vector::X, scaleVector.x()*points.component(vector::X));
points.replace(vector::Y, scaleVector.y()*points.component(vector::Y));
points.replace(vector::Z, scaleVector.z()*points.component(vector::Z));
points.replace(vector::X, v.x()*points.component(vector::X));
points.replace(vector::Y, v.y()*points.component(vector::Y));
points.replace(vector::Z, v.z()*points.component(vector::Z));
}
// Set the precision of the points data to 10

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
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
argList::validArgs.append("inputDict");
argList args(argc, argv);
const string& dictName = args.additionalArgs()[0];
const string dictName = args[1];
Info<<"//\n// expansion of dictionary " << dictName << "\n//\n";

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
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
{
fileName dictFileName
(
args.rootPath()/args.caseName()/args.option("dictionary")
args.rootPath()/args.caseName()/args["dictionary"]
);
IFstream dictFile(dictFileName);
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
true // wildcards
);
for (int i=1; i<entryNames.size(); i++)
for (int i=1; i<entryNames.size(); ++i)
{
if (entPtr->dict().found(entryNames[i]))
{
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
{
FatalErrorIn(args.executable())
<< "Cannot find sub-entry " << entryNames[i]
<< " in entry " << args.option("entry")
<< " in entry " << args["entry"]
<< " in dictionary " << dictFileName;
FatalError.exit(3);
}
@ -131,7 +131,7 @@ int main(int argc, char *argv[])
{
FatalErrorIn(args.executable())
<< "Cannot find entry "
<< args.option("entry")
<< args["entry"]
<< " in dictionary " << dictFileName
<< " is not a sub-dictionary";
FatalError.exit(4);

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
@ -309,7 +319,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

@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Translates FOAM data to Fluent format.
Translates OpenFOAM data to Fluent format.
\*---------------------------------------------------------------------------*/

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
@ -80,7 +80,10 @@ Foam::ensightMesh::ensightMesh
if (args.optionFound("patches"))
{
wordList patchNameList(args.optionLookup("patches")());
wordList patchNameList
(
args.optionLookup("patches")()
);
if (patchNameList.empty())
{

View File

@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Translates FOAM data to EnSight format.
Translates OpenFOAM data to EnSight format.
An Ensight part is created for the internalMesh and for each patch.

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
@ -215,9 +215,8 @@ int main(int argc, char *argv[])
word cellSetName;
string vtkName;
if (args.optionFound("cellSet"))
if (args.optionReadIfPresent("cellSet", cellSetName))
{
cellSetName = args.option("cellSet");
vtkName = cellSetName;
}
else if (Pstream::parRun())
@ -738,7 +737,7 @@ int main(int argc, char *argv[])
if (args.optionFound("faceSet"))
{
// Load the faceSet
word setName(args.option("faceSet"));
const word setName = args["faceSet"];
labelList faceLabels(faceSet(mesh, setName).toc());
// Filename as if patch with same name.

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
@ -329,9 +329,8 @@ int main(int argc, char *argv[])
word cellSetName;
string vtkName = runTime.caseName();
if (args.optionFound("cellSet"))
if (args.optionReadIfPresent("cellSet", cellSetName))
{
cellSetName = args.option("cellSet");
vtkName = cellSetName;
}
else if (Pstream::parRun())
@ -423,7 +422,7 @@ int main(int argc, char *argv[])
if (args.optionFound("faceSet"))
{
// Load the faceSet
faceSet set(mesh, args.option("faceSet"));
faceSet set(mesh, args["faceSet"]);
// Filename as if patch with same name.
mkDir(fvPath/set.name());
@ -446,7 +445,7 @@ int main(int argc, char *argv[])
if (args.optionFound("pointSet"))
{
// Load the pointSet
pointSet set(mesh, args.option("pointSet"));
pointSet set(mesh, args["pointSet"]);
// Filename as if patch with same name.
mkDir(fvPath/set.name());

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
@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Translates a STAR-CD SMAP data file into FOAM field format.
Translates a STAR-CD SMAP data file into OpenFOAM field format.
\*---------------------------------------------------------------------------*/
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
# include "createMesh.H"
IFstream smapFile(args.additionalArgs()[0]);
IFstream smapFile(args[1]);
if (!smapFile.good())
{

Some files were not shown because too many files have changed in this diff Show More