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");
195 bool useTime =
false;
207 useTime = readScalar(meshInstance, timeValue);
211 <<
"Bad input value: " << meshInstance
212 <<
"Should be a scalar or 'constant'" 229 <<
"Did not generate any blocks. Stopping." <<
nl <<
endl;
235 bool quickExit =
false;
261 Info<<
"Writing polyMesh to " << meshInstance <<
nl <<
endl;
271 #include "cleanMeshDirectory.H" 276 blocks.verbose(
true);
295 Info<<
nl <<
"Writing polyMesh with " 300 Info<<
" (written as cellSets too)";
308 <<
"Failed writing polyMesh." 320 #include "printMeshSummary.H"
const IOdictionary & meshDict
#define WarningIn(functionName)
Report a warning using Foam::Warning.
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.
const word & regionName() const
The mesh region name or word::null if polyMesh::defaultRegion.
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)
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.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
A multi-block mesh generator.
mergeStrategy
The block merging strategy.
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.
const word & executable() const noexcept
Name of executable without the path.
label size() const noexcept
The number of entries in the list.
Default (TOPOLOGY), not selectable.
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.
static void addVerboseOption(const string &usage="", bool advanced=false)
Enable a 'verbose' bool option, with usage information.
const word & constant() const noexcept
Return constant name.
"points" merge by point geometry
bool empty() const noexcept
True if the list is empty (ie, size() is zero)
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name...
const word & name() const
Return reference to name.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
A collection of cell labels.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
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...
int verbose() const noexcept
Return the verbose flag.
bool found(const word &optName) const
Return true if the named option is found.