65 int 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;
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;
237 Info<<
nl <<
"Writing polyMesh with " 244 <<
"Failed writing polyMesh." 248 #include "printMeshSummary.H" const IOdictionary & meshDict
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
static unsigned int defaultPrecision() noexcept
Return the default precision.
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 addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Specify an alias for the option name.
Ignore writing from objectRegistry::writeObject()
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void removeFiles(const fileName &instanceDir) const
Remove all files from mesh instance.
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
A class for handling words, derived from Foam::string.
static word defaultRegion
Return the default region name.
label size() const noexcept
The number of entries in the list.
const word & system() const noexcept
Return system name.
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation. Some of the input is similar to blockMeshDict, but since this specialization is for a single-block that is aligned with the x-y-z directions, it provides a different means of specifying the mesh.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
const word & constant() const noexcept
Return constant name.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name...
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
fileName objectRelPath() const
The object path relative to the root.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
bool found(const word &optName) const
Return true if the named option is found.