utilities: Rationalised and standardised the handling of the -dict option

This commit is contained in:
Henry Weller
2021-03-05 13:42:46 +00:00
parent d4d21c9c04
commit cf552e6343
16 changed files with 197 additions and 142 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,6 +53,7 @@ Usage
#include "fvMesh.H" #include "fvMesh.H"
#include "polyMeshFilter.H" #include "polyMeshFilter.H"
#include "faceSet.H" #include "faceSet.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -92,12 +93,7 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
const word dictName("collapseDict"); const dictionary collapseDict(systemDict("collapseDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl;
IOdictionary collapseDict(dictIO);
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ Description
#include "meshTools.H" #include "meshTools.H"
#include "Pair.H" #include "Pair.H"
#include "globalIndex.H" #include "globalIndex.H"
#include "IOdictionary.H" #include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -327,8 +327,6 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
} }
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
@ -341,19 +339,7 @@ int main(int argc, char *argv[])
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");
Info<< "Reading modifyMeshDict\n" << endl; const dictionary dict(systemDict("modifyMeshDict", args, mesh));
IOdictionary dict
(
IOobject
(
"modifyMeshDict",
runTime.system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
// Read all from the dictionary. // Read all from the dictionary.
List<Pair<point>> pointsToMove(dict.lookup("pointsToMove")); List<Pair<point>> pointsToMove(dict.lookup("pointsToMove"));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,6 +45,7 @@ Description
#include "MeshedSurfaces.H" #include "MeshedSurfaces.H"
#include "globalIndex.H" #include "globalIndex.H"
#include "cellSet.H" #include "cellSet.H"
#include "systemDict.H"
#include "extrudedMesh.H" #include "extrudedMesh.H"
#include "extrudeModel.H" #include "extrudeModel.H"
@ -266,7 +267,7 @@ int main(int argc, char *argv[])
#include "addDictOption.H" #include "addDictOption.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTimeExtruded.H" #include "createTime.H"
// Get optional regionName // Get optional regionName
word regionName; word regionName;
@ -275,30 +276,16 @@ int main(int argc, char *argv[])
{ {
regionDir = regionName; regionDir = regionName;
Info<< "Create mesh " << regionName << " for time = " Info<< "Create mesh " << regionName << " for time = "
<< runTimeExtruded.timeName() << nl << endl; << runTime.timeName() << nl << endl;
} }
else else
{ {
regionName = fvMesh::defaultRegion; regionName = fvMesh::defaultRegion;
Info<< "Create mesh for time = " Info<< "Create mesh for time = "
<< runTimeExtruded.timeName() << nl << endl; << runTime.timeName() << nl << endl;
} }
const word dictName const dictionary dict(systemDict("extrudeMeshDict", args, runTime));
(
args.optionLookupOrDefault<word>("dict", "extrudeMeshDict")
);
IOdictionary dict
(
IOobject
(
dictName,
runTimeExtruded.system(),
runTimeExtruded,
IOobject::MUST_READ_IF_MODIFIED
)
);
// Point generator // Point generator
autoPtr<extrudeModel> model(extrudeModel::New(dict)); autoPtr<extrudeModel> model(extrudeModel::New(dict));
@ -376,13 +363,6 @@ int main(int argc, char *argv[])
<< " on mesh " << sourceCasePath << nl << " on mesh " << sourceCasePath << nl
<< endl; << endl;
Time runTime
(
Time::controlDictName,
sourceRootDir,
sourceCaseDir
);
#include "createMesh.H" #include "createMesh.H"
const polyBoundaryMesh& patches = mesh.boundaryMesh(); const polyBoundaryMesh& patches = mesh.boundaryMesh();
@ -711,8 +691,8 @@ int main(int argc, char *argv[])
IOobject IOobject
( (
regionName, regionName,
runTimeExtruded.constant(), runTime.constant(),
runTimeExtruded, runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE, IOobject::AUTO_WRITE,
false false
@ -795,8 +775,8 @@ int main(int argc, char *argv[])
IOobject IOobject
( (
extrudedMesh::defaultRegion, extrudedMesh::defaultRegion,
runTimeExtruded.constant(), runTime.constant(),
runTimeExtruded runTime
), ),
fMesh, fMesh,
model() model()
@ -1040,7 +1020,7 @@ int main(int argc, char *argv[])
} }
} }
mesh.setInstance(runTimeExtruded.constant()); mesh.setInstance(runTime.constant());
Info<< "Writing mesh to " << mesh.localObjectPath() << nl << endl; Info<< "Writing mesh to " << mesh.localObjectPath() << nl << endl;
if (!mesh.write()) if (!mesh.write())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -126,6 +126,7 @@ Notes:
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "OBJstream.H" #include "OBJstream.H"
#include "PatchTools.H" #include "PatchTools.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -1406,11 +1407,7 @@ int main(int argc, char *argv[])
bool overwrite = args.optionFound("overwrite"); bool overwrite = args.optionFound("overwrite");
const word dictName("extrudeToRegionMeshDict"); const dictionary dict(systemDict("extrudeToRegionMeshDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
IOdictionary dict(dictIO);
// Point generator // Point generator

View File

@ -58,6 +58,7 @@ Description
#include "globalIndex.H" #include "globalIndex.H"
#include "IOmanip.H" #include "IOmanip.H"
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -731,9 +732,7 @@ int main(int argc, char *argv[])
// Read meshing dictionary // Read meshing dictionary
const word dictName("snappyHexMeshDict"); const dictionary meshDict(systemDict("snappyHexMeshDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
const IOdictionary meshDict(dictIO);
// all surface geometry // all surface geometry

View File

@ -51,6 +51,7 @@ Description
#include "faceSelection.H" #include "faceSelection.H"
#include "searchableSurface.H" #include "searchableSurface.H"
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -450,17 +451,13 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
const word dictName("createBafflesDict");
#include "setSystemMeshDictionaryIO.H"
Switch internalFacesOnly(false); Switch internalFacesOnly(false);
Switch fields(false); Switch fields(false);
PtrList<faceSelection> selectors; PtrList<faceSelection> selectors;
{ {
Info<< "Reading baffle criteria from " << dictName << nl << endl; const dictionary dict(systemDict("createBafflesDict", args, mesh));
IOdictionary dict(dictIO);
dict.lookup("internalFacesOnly") >> internalFacesOnly; dict.lookup("internalFacesOnly") >> internalFacesOnly;
fields = dict.lookupOrDefault("fields", false); fields = dict.lookupOrDefault("fields", false);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,7 @@ Description
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "polyModifyFace.H" #include "polyModifyFace.H"
#include "wordReList.H" #include "wordReList.H"
#include "IOdictionary.H" #include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -488,12 +488,7 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
const word dictName("createPatchDict"); const dictionary dict(systemDict("createPatchDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl;
IOdictionary dict(dictIO);
// Whether to synchronise points // Whether to synchronise points
const Switch pointSync(dict.lookup("pointSync")); const Switch pointSync(dict.lookup("pointSync"));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,6 +49,7 @@ Description
#include "cellSet.H" #include "cellSet.H"
#include "faceSet.H" #include "faceSet.H"
#include "pointSet.H" #include "pointSet.H"
#include "systemDict.H"
#ifdef FOAM_USE_ZOLTAN #ifdef FOAM_USE_ZOLTAN
#include "zoltanRenumber.H" #include "zoltanRenumber.H"
@ -691,18 +692,16 @@ int main(int argc, char *argv[])
bool renumberSets = true; bool renumberSets = true;
// Construct renumberMethod // Construct renumberMethod
autoPtr<IOdictionary> renumberDictPtr; autoPtr<dictionary> renumberDictPtr;
autoPtr<renumberMethod> renumberPtr; autoPtr<renumberMethod> renumberPtr;
if (readDict) if (readDict)
{ {
const word dictName("renumberMeshDict"); renumberDictPtr.reset
#include "setSystemMeshDictionaryIO.H" (
new dictionary(systemDict("renumberMeshDict", args, mesh))
Info<< "Renumber according to " << dictName << nl << endl; );
const dictionary& renumberDict = renumberDictPtr();
renumberDictPtr.reset(new IOdictionary(dictIO));
const IOdictionary& renumberDict = renumberDictPtr();
renumberPtr = renumberMethod::New(renumberDict); renumberPtr = renumberMethod::New(renumberDict);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,7 +39,7 @@ Description
#include "cellZoneSet.H" #include "cellZoneSet.H"
#include "faceZoneSet.H" #include "faceZoneSet.H"
#include "pointZoneSet.H" #include "pointZoneSet.H"
#include "IOdictionary.H" #include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -211,12 +211,7 @@ int main(int argc, char *argv[])
const bool noSync = args.optionFound("noSync"); const bool noSync = args.optionFound("noSync");
const word dictName("topoSetDict"); const dictionary topoSetDict(systemDict("topoSetDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl;
IOdictionary topoSetDict(dictIO);
// Read set construct info from dictionary // Read set construct info from dictionary
PtrList<dictionary> actions(topoSetDict.lookup("actions")); PtrList<dictionary> actions(topoSetDict.lookup("actions"));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,6 +80,7 @@ Note
#include "volFields.H" #include "volFields.H"
#include "stringListOps.H" #include "stringListOps.H"
#include "timeSelector.H" #include "timeSelector.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -508,10 +509,7 @@ int main(int argc, char *argv[])
// Get the replacement rules from a dictionary // Get the replacement rules from a dictionary
const dictionary dict(systemDict("changeDictionaryDict", args, mesh));
const word dictName("changeDictionaryDict");
#include "setSystemMeshDictionaryIO.H"
IOdictionary dict(dictIO);
const dictionary* replaceDictsPtr = &dict; const dictionary* replaceDictsPtr = &dict;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,9 +33,12 @@ Description
#include "cellSet.H" #include "cellSet.H"
#include "faceSet.H" #include "faceSet.H"
#include "volFields.H" #include "volFields.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
bool setCellFieldType bool setCellFieldType
( (
@ -373,7 +376,6 @@ public:
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -384,12 +386,7 @@ int main(int argc, char *argv[])
#include "createTime.H" #include "createTime.H"
#include "createNamedMesh.H" #include "createNamedMesh.H"
const word dictName("setFieldsDict"); const dictionary setFieldsDict(systemDict("setFieldsDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl;
IOdictionary setFieldsDict(dictIO);
if (setFieldsDict.found("defaultFieldValues")) if (setFieldsDict.found("defaultFieldValues"))
{ {
@ -402,7 +399,6 @@ int main(int argc, char *argv[])
Info<< endl; Info<< endl;
} }
Info<< "Setting field region values" << endl; Info<< "Setting field region values" << endl;
PtrList<entry> regions(setFieldsDict.lookup("regions")); PtrList<entry> regions(setFieldsDict.lookup("regions"));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,6 +39,7 @@ Description
#include "wallPolyPatch.H" #include "wallPolyPatch.H"
#include "waveAlphaFvPatchScalarField.H" #include "waveAlphaFvPatchScalarField.H"
#include "waveVelocityFvPatchVectorField.H" #include "waveVelocityFvPatchVectorField.H"
#include "systemDict.H"
using namespace Foam; using namespace Foam;
@ -78,10 +79,7 @@ int main(int argc, char *argv[])
#include "createNamedMesh.H" #include "createNamedMesh.H"
const word dictName("setWavesDict"); const dictionary setWavesDict(systemDict("setWavesDict", args, mesh));
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl;
IOdictionary setWavesDict(dictIO);
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"

View File

@ -240,6 +240,7 @@ IOdictionary = db/IOobjects/IOdictionary
$(IOdictionary)/IOdictionary.C $(IOdictionary)/IOdictionary.C
$(IOdictionary)/IOdictionaryIO.C $(IOdictionary)/IOdictionaryIO.C
$(IOdictionary)/localIOdictionary.C $(IOdictionary)/localIOdictionary.C
$(IOdictionary)/systemDict.C
db/IOobjects/IOMap/IOMapName.C db/IOobjects/IOMap/IOMapName.C
db/IOobjects/decomposedBlockData/decomposedBlockData.C db/IOobjects/decomposedBlockData/decomposedBlockData.C

View File

@ -0,0 +1,83 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "systemDict.H"
#include "IOdictionary.H"
#include "Time.H"
// * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * * //
Foam::dictionary Foam::systemDict
(
const word& dictName,
const argList& args,
const objectRegistry& mesh
)
{
fileName dictPath = "";
if (args.optionFound("dict"))
{
dictPath = args["dict"];
if (isDir(dictPath))
{
dictPath = dictPath / dictName;
}
}
if (dictPath.size())
{
Info<< "Reading " << dictPath << nl << endl;
return IOdictionary
(
IOobject
(
dictPath,
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
}
else
{
Info<< "Reading " << dictName << nl << endl;
return IOdictionary
(
IOobject
(
dictName,
mesh.time().system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,64 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::systemDict
Description
Read and return the specified dictionary from system or from path provided
with the -dict option.
SourceFiles
systemDict.C
\*---------------------------------------------------------------------------*/
#ifndef systemDict_H
#define systemDict_H
#include "argList.H"
#include "objectRegistry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * * //
dictionary systemDict
(
const word& dictName,
const argList& args,
const objectRegistry& mesh
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,29 +0,0 @@
fileName dictPath = "";
if (args.optionFound("dict"))
{
dictPath = args["dict"];
if (isDir(dictPath))
{
dictPath = dictPath / dictName;
}
}
IOobject dictIO
(
dictName,
runTime.system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
);
if (dictPath.size())
{
dictIO = IOobject
(
dictPath,
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
);
}