65int main(
int argc,
char *argv[])
69 "A block mesh generator for a rectilinear mesh in x-y-z.\n"
70 " The ordering of vertex and face labels within a block as shown "
72 " For the local vertex numbering in the sequence 0 to 7:\n"
73 " Faces 0, 1 == x-min, x-max.\n"
74 " Faces 2, 3 == y-min, y-max.\n"
75 " Faces 4, 5 == z-min, z-max.\n"
84 " \\ | f0 ------ f1\n"
89 argList::noParallel();
90 argList::noFunctionObjects();
92 argList::addBoolOption
95 "Do not remove polyMesh/ directory or files"
97 argList::addOptionCompat(
"no-clean", {
"noClean", -2006});
99 argList::addBoolOption
102 "Create without any other region"
104 argList::addBoolOption
107 "Print blockMeshDict equivalent and exit"
109 argList::addBoolOption
112 "Write system/blockMeshDict.PDRblockMesh and exit"
115 argList::addOption(
"dict",
"file",
"Alternative PDRblockMeshDict");
120 "Specify a time to write mesh to (default: constant)"
127 const bool removeOldFiles = !
args.
found(
"no-clean");
130 const bool noOuterRegion =
args.
found(
"no-outer");
136 bool useTime =
false;
142 &&
runTime.constant() != meshInstance
148 useTime = readScalar(meshInstance, timeValue);
152 <<
"Bad input value: " << meshInstance
153 <<
"Should be a scalar or 'constant'"
166 Info<<
"Creating PDRblockMesh from "
174 Info<<
nl <<
"Equivalent blockMeshDict" <<
nl <<
nl;
176 blkMesh.blockMeshDict(Info,
true);
185 blkMesh.writeBlockMeshDict
189 "blockMeshDict.PDRblockMesh",
205 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
215 #include "cleanMeshDirectory.H"
219 Info<<
nl <<
"Creating polyMesh from PDRblockMesh" <<
endl;
222 Info<<
"Outer region disabled, using ijk generation" <<
nl;
235 IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision()));
237 Info<<
nl <<
"Writing polyMesh with "
238 <<
mesh.cellZones().size() <<
" cellZones" <<
endl;
244 <<
"Failed writing polyMesh."
248 #include "printMeshSummary.H"
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation....
bool found(const word &optName) const
Return true if the named option is found.
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
Foam::word regionName(Foam::polyMesh::defaultRegion)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const IOdictionary & meshDict
const word dictName("faMeshDefinition")
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)