Go to the documentation of this file.
66 int main(
int argc,
char *argv[])
70 "A block mesh generator for a rectilinear mesh in x-y-z.\n"
71 " The ordering of vertex and face labels within a block as shown "
73 " For the local vertex numbering in the sequence 0 to 7:\n"
74 " Faces 0, 1 == x-min, x-max.\n"
75 " Faces 2, 3 == y-min, y-max.\n"
76 " Faces 4, 5 == z-min, z-max.\n"
85 " \\ | f0 ------ f1\n"
96 "Do not remove any existing polyMesh/ directory or files"
103 "Specify a time to write mesh to (default: constant)"
110 const bool removeOldFiles = !
args.
found(
"noClean");
113 bool useTime =
false;
125 useTime = readScalar(meshInstance, timeValue);
129 <<
"Bad input value: " << meshInstance
130 <<
"Should be a scalar or 'constant'"
143 Info<<
"Creating PDRblockMesh from "
152 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
169 Info<<
"Deleting polyMesh directory "
176 Info<<
nl <<
"Creating polyMesh from PDRblockMesh" <<
endl;
196 Info<<
nl <<
"Writing polyMesh with "
203 <<
"Failed writing polyMesh."
209 Info<<
"----------------" <<
nl
210 <<
"Mesh Information" <<
nl
211 <<
"----------------" <<
nl
218 Info<<
"----------------" <<
nl
220 <<
"----------------" <<
nl;
224 Info<<
" " <<
"patch " <<
p.index()
225 <<
" (start: " <<
p.start()
226 <<
" size: " <<
p.size()
227 <<
") name: " <<
p.name()
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual const pointField & points() const
Return raw points.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Foam::autoPtr< Foam::fvMesh > meshPtr(nullptr)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
A class for handling words, derived from Foam::string.
A class for handling file names.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
static word defaultRegion
Return the default region name.
label nInternalFaces() const
Number of internal faces.
label nFaces() const
Number of mesh faces.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
static void addNote(const string ¬e)
Add extra notes for the usage information.
const word dictName("blockMeshDict")
const cellZoneMesh & cellZones() const
Return cell zone mesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Mesh consisting of general polyhedral cells.
fileName relativePath(const fileName &input, const bool caseTag=false) const
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
label nCells() const
Number of mesh cells.
messageStream Info
Information stream (uses stdout - output is on the master only)
A patch is a list of labels that address the faces in the global face list.
void removeFiles(const fileName &instanceDir) const
Remove all files from mesh instance.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation....
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
fileName path() const
Return path.
static unsigned int defaultPrecision()
Return the default precision.
bool rmDir(const fileName &directory, const bool silent=false)
Remove a directory and its contents (optionally silencing warnings)
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
label nPoints() const
Number of mesh points.
A bounding box defined in terms of min/max extrema points.
An instant of time. Contains the time value and name.
static void noParallel()
Remove the parallel options.
fileName objectPath() const
The complete path + object name.
const word & constant() const
Return constant name.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
const IOdictionary & meshDict
bool found(const word &optName) const
Return true if the named option is found.