Commit f37cfd52 authored by Andrew Heather's avatar Andrew Heather
Browse files
parents a3ae26c4 22ce56db
......@@ -10,7 +10,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
set -x
wmake all solvers
wmake all utilities
wmake all solvers
# ----------------------------------------------------------------- end-of-file
......@@ -11,7 +11,7 @@ forAll(patches, patchi)
{
const fvPatch& currPatch = patches[patchi];
if (isType<wallFvPatch>(currPatch))
if (isA<wallFvPatch>(currPatch))
{
const vectorField nf = currPatch.nf();
......
......@@ -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))
......
......@@ -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());
......
......@@ -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);
......
......@@ -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);
......
......@@ -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,7 +69,7 @@ int main()
word name;
fileName path(SubList<word>(wrdList, wrdList.size()-start, start));
fileName path2 = "." / path;
fileName path2 = "."/path;
IOobject::fileNameComponents
(
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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"];
}
fileName CHEMKINFileName(args.additionalArgs()[0]);
args.optionReadIfPresent("thermo", thermoFileName);
chemkinReader ck(CHEMKINFileName, thermoFileName);
chemkinReader ck(args[1], 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();
......
......@@ -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);
......
......@@ -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);
......
......@@ -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())
......
......@@ -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));
......
......@@ -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));
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
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