Go to the documentation of this file.
94 int main(
int argc,
char *argv[])
98 "Block mesh generator.\n"
99 " The ordering of vertex and face labels within a block as shown "
101 " For the local vertex numbering in the sequence 0 to 7:\n"
102 " Faces 0, 1 (x-direction) are left, right.\n"
103 " Faces 2, 3 (y-direction) are front, back.\n"
104 " Faces 4, 5 (z-direction) are bottom, top.\n"
113 " \\ | f0 ------ f1\n"
124 "Write block edges and centres as obj files and exit",
132 "Write topology as VTK file and exit"
138 "Geometric point merging instead of topological merging"
139 " [default for 1912 and earlier]."
145 "Do not remove polyMesh/ directory or files"
153 "Write cellZones as cellSets too (for processing purposes)"
159 "Specify a time to write mesh to (default: constant)"
167 const bool removeOldFiles = !
args.
found(
"no-clean");
170 const bool writeCellSets =
args.
found(
"sets");
192 bool useTime =
false;
204 useTime = readScalar(meshInstance, timeValue);
208 <<
"Bad input value: " << meshInstance
209 <<
"Should be a scalar or 'constant'"
226 <<
"Did not generate any blocks. Stopping." <<
nl <<
endl;
232 bool quickExit =
false;
258 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
268 #include "cleanMeshDirectory.H"
273 blocks.verbose(
true);
292 Info<<
nl <<
"Writing polyMesh with "
297 Info<<
" (written as cellSets too)";
305 <<
"Failed writing polyMesh."
317 #include "printMeshSummary.H"
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...
A class for handling words, derived from Foam::string.
Default (TOPOLOGY), not selectable.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
static word defaultRegion
Return the default region name.
mergeStrategy
The block merging strategy.
static void addNote(const string ¬e)
Add extra notes for the usage information.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Specify an alias for the option name.
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.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
const word & executable() const
Name of executable without the path.
messageStream Info
Information stream (uses stdout - output is on the master only)
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.
"points" merge by point geometry
A collection of cell labels.
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static unsigned int defaultPrecision()
Return the default precision.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
An instant of time. Contains the time value and name.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
static void noParallel()
Remove the parallel options.
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.
const word & name() const
Return reference to name.
A multi-block mesh generator.