Go to the documentation of this file.
95 int main(
int argc,
char *argv[])
99 "Block mesh generator.\n"
101 " The ordering of vertex and face labels within a block as shown "
103 " For the local vertex numbering in the sequence 0 to 7:\n"
104 " Faces 0, 1 (x-direction) are left, right.\n"
105 " Faces 2, 3 (y-direction) are front, back.\n"
106 " Faces 4, 5 (z-direction) are bottom, top.\n"
115 " \\ | f0 ------ f1\n"
126 "Write block edges and centres as obj files and exit",
134 "Write topology as VTU file and exit"
138 "Force verbose output. (Can be used multiple times)"
144 "Geometric point merging instead of topological merging"
145 " [default for 1912 and earlier]."
151 "Do not remove polyMesh/ directory or files"
159 "Write cellZones as cellSets too (for processing purposes)"
165 "Specify a time to write mesh to (default: constant)"
173 const bool removeOldFiles = !
args.
found(
"no-clean");
176 const bool writeCellSets =
args.
found(
"sets");
198 bool useTime =
false;
210 useTime = readScalar(meshInstance, timeValue);
214 <<
"Bad input value: " << meshInstance
215 <<
"Should be a scalar or 'constant'"
232 <<
"Did not generate any blocks. Stopping." <<
nl <<
endl;
238 bool quickExit =
false;
264 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
274 #include "cleanMeshDirectory.H"
279 blocks.verbose(
true);
298 Info<<
nl <<
"Writing polyMesh with "
303 Info<<
" (written as cellSets too)";
311 <<
"Failed writing polyMesh."
323 #include "printMeshSummary.H"
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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_MERGE
Default (TOPOLOGY), not selectable.
virtual bool write(const bool valid=true) const
static word defaultRegion
static void addNote(const string ¬e)
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Ostream & endl(Ostream &os)
bool readIfPresent(const word &optName, T &val) const
Mesh consisting of general polyhedral cells.
static void noFunctionObjects(bool addWithOption=false)
virtual bool write(const bool valid=true) const
const cellZoneMesh & cellZones() const noexcept
void removeFiles(const fileName &instanceDir) const
label max(const labelHashSet &set, label maxValue=labelMin)
int verbose() const noexcept
@ MERGE_POINTS
"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)
static unsigned int defaultPrecision() noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
const word & executable() const noexcept
virtual void setTime(const Time &t)
An instant of time. Contains the time value and name.
#define WarningIn(functionName)
const word & constant() const
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
const IOdictionary & meshDict
Foam::autoPtr< Foam::fvMesh > meshPtr(nullptr)
static void addVerboseOption(const string &usage, bool advanced=false)
bool found(const word &optName) const
const word & name() const
A multi-block mesh generator.