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"
95 "Do not remove polyMesh/ directory or files"
102 "Create without any other region"
107 "Print blockMeshDict equivalent and exit"
112 "Write system/blockMeshDict.PDRblockMesh and exit"
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;
141 args.readIfPresent(
"time", meshInstance)
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 "
172 if (
args.found(
"print-dict"))
174 Info<<
nl <<
"Equivalent blockMeshDict" <<
nl <<
nl;
176 blkMesh.blockMeshDict(
Info,
true);
182 if (
args.found(
"write-dict"))
185 blkMesh.writeBlockMeshDict
189 "blockMeshDict.PDRblockMesh",
205 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
219 Info<<
nl <<
"Creating polyMesh from PDRblockMesh" <<
endl;
222 Info<<
"Outer region disabled, using ijk generation" <<
nl;
227 args.found(
"no-outer")
237 Info<<
nl <<
"Writing polyMesh with "
238 <<
mesh.cellZones().size() <<
" cellZones" <<
endl;
244 <<
"Failed writing polyMesh."
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...
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation....
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Specify an alias for the option name.
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.
static word defaultRegion
Return the default region name.
A class for handling words, derived from Foam::string.
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
Foam::word regionName(args.getOrDefault< word >("region", 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.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)