Commit dfbb9d09 authored by sergio's avatar sergio
Browse files

Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

Conflicts:
	tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
parents ab40ddaa 784461b2
......@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
const Switch inflate(args.args()[1]);
const Switch inflate(args[1]);
if (inflate)
{
......
......@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
const pointConstraints& pc = pointConstraints::New(pointMesh::New(mesh));
const Switch inflate(args.args()[1]);
const Switch inflate(args[1]);
if (inflate)
{
......
......@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
#include "createNamedMesh.H"
const word oldInstance = mesh.pointsInstance();
word cellSetName(args.args()[1]);
word cellSetName(args[1]);
const bool overwrite = args.optionFound("overwrite");
const bool minSet = args.optionFound("minSet");
......
......@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
std::ifstream plot3dFile(args.args()[1].c_str());
std::ifstream plot3dFile(args[1].c_str());
string line;
std::getline(plot3dFile, line);
......
......@@ -811,7 +811,7 @@ int main(int argc, char *argv[])
args.optionReadIfPresent("ignoreCellGroups", ignoreCellGroups);
args.optionReadIfPresent("ignoreFaceGroups", ignoreFaceGroups);
cubitFile = args.options().found("cubit");
cubitFile = args.optionFound("cubit");
if (cubitFile)
{
......
......@@ -128,16 +128,12 @@ int main(int argc, char *argv[])
fileName dictPath;
// Check if the dictionary is specified on the command-line
if (args.optionFound("dict"))
if (args.optionReadIfPresent("dict", dictPath))
{
dictPath = args["dict"];
dictPath =
(
isDir(dictPath)
? dictPath/dictName
: dictPath
);
if (isDir(dictPath))
{
dictPath = dictPath / dictName;
}
}
// Check if dictionary is present in the constant directory
else if
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -67,14 +67,7 @@ int main(int argc, char *argv[])
// Allow override of decomposeParDict location
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile / "decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
IOdictionary foamyHexMeshDict
(
......
......@@ -524,13 +524,7 @@ int main(int argc, char *argv[])
// Allow override of decomposeParDict location
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile / "decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
labelList decomp = decompositionModel::New
(
......
......@@ -374,7 +374,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
runTime.functionObjects().off();
const fileName exportName = args.args()[1];
const fileName exportName = args[1];
Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
<< " writing a re-sampled surface to " << exportName
......
......@@ -36,6 +36,7 @@ Description
#include "searchableSurfaces.H"
#include "conformationSurfaces.H"
#include "triSurfaceMesh.H"
#include "labelVector.H"
#include "MarchingCubes.h"
......@@ -52,7 +53,6 @@ int main(int argc, char *argv[])
(
"Re-sample surfaces used in foamyHexMesh operation"
);
//argList::validArgs.append("inputFile");
argList::validArgs.append("(nx ny nz)");
argList::validArgs.append("outputName");
......@@ -60,8 +60,8 @@ int main(int argc, char *argv[])
#include "createTime.H"
runTime.functionObjects().off();
const Vector<label> n(IStringStream(args.args()[1])());
const fileName exportName = args.args()[2];
const labelVector n(args.argRead<labelVector>(1));
const fileName exportName = args[2];
Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
<< " writing re-sampled " << n << " to " << exportName
......
......@@ -93,10 +93,9 @@ int main(int argc, char *argv[])
// ~~~~~~~~~~~~~~~~~~~~~~
CV2D mesh(runTime, controlDict);
if (args.options().found("pointsFile"))
if (args.optionFound("pointsFile"))
{
fileName pointFileName(IStringStream(args.options()["pointsFile"])());
mesh.insertPoints(pointFileName);
mesh.insertPoints(args["pointsFile"]);
}
else
{
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright 2015-2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -905,13 +905,7 @@ int main(int argc, char *argv[])
if (Pstream::parRun())
{
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile/"decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
decomposeDict = IOdictionary
(
......
......@@ -297,13 +297,13 @@ int main(int argc, char *argv[])
// set up the tolerances for the sliding mesh
dictionary slidingTolerances;
if (args.options().found("toleranceDict"))
if (args.optionFound("toleranceDict"))
{
IOdictionary toleranceFile
(
IOobject
(
args.options()["toleranceDict"],
args["toleranceDict"],
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
......
......@@ -270,14 +270,7 @@ int main(int argc, char *argv[])
// Allow override of decomposeParDict location
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile/"decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
wordList regionNames;
wordList regionDirs;
......@@ -360,7 +353,6 @@ int main(int argc, char *argv[])
),
decompDictFile
)
).lookup("numberOfSubdomains")
);
......
......@@ -64,6 +64,7 @@ Usage
#include "fvMeshTools.H"
#include "fvMeshDistribute.H"
#include "decompositionMethod.H"
#include "decompositionModel.H"
#include "timeSelector.H"
#include "PstreamReduceOps.H"
#include "volFields.H"
......@@ -74,7 +75,6 @@ Usage
#include "loadOrCreateMesh.H"
#include "processorFvPatchField.H"
#include "zeroGradientFvPatchFields.H"
#include "decompositionModel.H"
#include "parFvFieldReconstructor.H"
#include "parLagrangianRedistributor.H"
......@@ -2152,7 +2152,6 @@ int main(int argc, char *argv[])
bool newTimes = args.optionFound("newTimes");
if (env("FOAM_SIGFPE"))
{
WarningInFunction
......@@ -2245,8 +2244,6 @@ int main(int argc, char *argv[])
Pstream::scatter(decompose);
// If running distributed we have problem of new processors not finding
// a system/controlDict. However if we switch on the master-only reading
// the problem becomes that the time directories are differing sizes and
......@@ -2330,7 +2327,6 @@ int main(int argc, char *argv[])
// Determine any region
word regionName = polyMesh::defaultRegion;
fileName meshSubDir;
if (args.optionReadIfPresent("region", regionName))
{
meshSubDir = regionName/polyMesh::meshSubDir;
......@@ -2774,13 +2770,7 @@ int main(int argc, char *argv[])
// Allow override of decomposeParDict location
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile / "decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
// Determine decomposition
......
......@@ -18,8 +18,10 @@ if (!fieldsToUse.found(fieldName))
fieldName,
timeDirs[n1].name(),
mesh,
IOobject::NO_READ
).typeHeaderOk<volScalarField>(false)
IOobject::NO_READ,
IOobject::NO_WRITE,
false // no register
).typeHeaderOk<volScalarField>(false, false)
);
if (variableGood)
......
......@@ -7,8 +7,6 @@ if (timeDirs.size() > 1 && Pstream::master())
// We already loaded a mesh (usually from constant).
// See if any other "polyMesh/points" files exist too.
const fileName& baseDir = mesh.time().path();
Info<< "Search for moving mesh ... " << flush;
forAll(timeDirs, timeI)
{
......@@ -17,7 +15,6 @@ if (timeDirs.size() > 1 && Pstream::master())
meshMoving =
(
timeName != mesh.pointsInstance()
&& isDir(baseDir/timeName/polyMesh::meshSubDir)
&& IOobject
(
"points",
......@@ -27,7 +24,7 @@ if (timeDirs.size() > 1 && Pstream::master())
IOobject::NO_READ,
IOobject::NO_WRITE,
false // no register
).typeHeaderOk<pointIOField>(true)
).typeHeaderOk<pointIOField>(true, false)
);
if (meshMoving)
......
......@@ -8,15 +8,12 @@ if (timeDirs.size() > 1 && Pstream::master())
// We already loaded a mesh (usually from constant).
// See if any other "polyMesh/points" files exist too.
const fileName& baseDir = mesh.time().path();
Info<< "Search for moving mesh ... " << flush;
forAll(timeDirs, timeI)
{
meshMoving =
(
isDir(baseDir/timeDirs[timeI].name()/polyMesh::meshSubDir)
&& IOobject
IOobject
(
"points",
timeDirs[timeI].name(),
......@@ -25,7 +22,7 @@ if (timeDirs.size() > 1 && Pstream::master())
IOobject::NO_READ,
IOobject::NO_WRITE,
false // no register
).typeHeaderOk<pointIOField>(true)
).typeHeaderOk<pointIOField>(true, false)
);
if (meshMoving)
......
......@@ -21,10 +21,10 @@
runTime,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
false // no register
);
if (io.typeHeaderOk<IOdictionary>(true))
if (io.typeHeaderOk<IOdictionary>(true, false))
{
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
IOdictionary timeObject(io);
......
......@@ -4,10 +4,13 @@
"points",
runTime.timeName(),
polyMesh::meshSubDir,
mesh
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false // no register
);
if (io.typeHeaderOk<pointIOField>(true))
if (io.typeHeaderOk<pointIOField>(true, false))
{
// Read new points
io.readOpt() = IOobject::MUST_READ;
......
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