applications/utilities/surface: Updated handling of -dict option
This commit is contained in:
@ -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
|
||||
|
||||
@ -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"))
|
||||
{
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user