applications/utilities/surface: Updated handling of -dict option

This commit is contained in:
Henry Weller
2021-03-05 14:43:35 +00:00
parent 7d22121153
commit a0ca9a745e
4 changed files with 5 additions and 44 deletions

View File

@ -732,7 +732,7 @@ int main(int argc, char *argv[])
// Read meshing dictionary
const dictionary meshDict(systemDict("snappyHexMeshDict", args, mesh));
const IOdictionary meshDict(systemDict("snappyHexMeshDict", args, mesh));
// all surface geometry

View File

@ -35,7 +35,7 @@ Description
#include "surfaceFeatures.H"
#include "triSurfaceFields.H"
#include "vtkSurfaceWriter.H"
#include "IOdictionary.H"
#include "systemDict.H"
using namespace Foam;
@ -731,12 +731,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
const word dictName("surfaceFeaturesDict");
#include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl;
const IOdictionary dict(dictIO);
const dictionary dict(systemDict("surfaceFeaturesDict", args, runTime));
if (dict.found("surfaces"))
{

View File

@ -41,7 +41,7 @@ Usage
#include "PackedBoolList.H"
#include "unitConversion.H"
#include "searchableSurfaces.H"
#include "IOdictionary.H"
#include "systemDict.H"
using namespace Foam;
@ -281,12 +281,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
const word dictName("surfaceHookUpDict");
#include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl;
const IOdictionary dict(dictIO);
const dictionary dict(systemDict("surfaceHookUpDict", args, runTime));
const scalar dist(args.argRead<scalar>(1));
const scalar matchTolerance(max(1e-6*dist, small));

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(),
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
);
if (dictPath.size())
{
dictIO = IOobject
(
dictPath,
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
);
}