setConstantMeshDictionaryIO.H
Go to the documentation of this file.
1 //
2 // setConstantMeshDictionaryIO.H
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 
5  fileName dictPath = "";
6  if (args.optionFound("dict"))
7  {
8  dictPath = args["dict"];
9  if (isDir(dictPath))
10  {
12  }
13  }
14 
15  IOobject dictIO
16  (
17  dictName,
18  runTime.constant(),
19  mesh,
20  IOobject::MUST_READ_IF_MODIFIED,
21  IOobject::NO_WRITE
22  );
23 
24  if (dictPath.size())
25  {
26  dictIO = IOobject
27  (
28  dictPath,
29  mesh,
30  IOobject::MUST_READ_IF_MODIFIED,
31  IOobject::NO_WRITE
32  );
33  }
dictName
const word dictName("particleTrackDict")
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::isDir
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
Definition: POSIX.C:615
Foam::argList::optionFound
bool optionFound(const word &opt) const
Return true if the named option is found.
Definition: argListI.H:108
args
Foam::argList args(argc, argv)
dictPath
fileName dictPath
Definition: setConstantMeshDictionaryIO.H:5
dictIO
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)