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  {
11  dictPath = dictPath / dictName;
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  }
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
dynamicFvMesh & mesh
const word dictName("particleTrackDict")
bool optionFound(const word &opt) const
Return true if the named option is found.
Definition: argListI.H:108
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
Definition: POSIX.C:616
Foam::argList args(argc, argv)
fileName dictPath