Go to the documentation of this file.
85 int main(
int argc,
char *argv[])
89 "Checks validity of a mesh"
97 "Skip checking the mesh topology"
102 "Include bounding box checks"
107 "Include extra topology checks"
112 "Write volFields with mesh quality parameters"
118 "Write volFields with selected mesh quality parameters"
123 "Read user-defined mesh quality criteria from system/meshQualityDict"
129 "Reconstruct and write all faceSets and cellSets in selected format"
137 const bool noTopology =
args.
found(
"noTopology");
138 const bool allGeometry =
args.
found(
"allGeometry");
139 const bool allTopology =
args.
found(
"allTopology");
140 const bool meshQuality =
args.
found(
"meshQuality");
143 const bool writeSets = surfaceFormat.size();
175 Info<<
"Disabling all topology checks." <<
nl <<
endl;
179 Info<<
"Enabling all (cell, face, edge, point) topology checks."
184 Info<<
"Enabling all geometry checks." <<
nl <<
endl;
188 Info<<
"Enabling user-defined geometry checks." <<
nl <<
endl;
192 Info<<
"Reconstructing and writing " << surfaceFormat
194 <<
" of all faceSets and cellSets." <<
nl <<
endl;
196 if (selectedFields.
size())
198 Info<<
"Writing mesh quality as fields " << selectedFields <<
nl
252 label nFailedChecks = 0;
283 if (nFailedChecks == 0)
289 Info<<
"\nFailed " << nFailedChecks <<
" mesh checks.\n"
317 Info<<
"\nFailed " << nFailedChecks <<
" mesh checks.\n"
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
label size() const noexcept
The number of elements in table.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
static word timeName(const scalar t, const int precision=precision_)
static void addNote(const string ¬e)
Add extra notes for the usage information.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label checkTopology(const polyMesh &mesh, const bool allTopology, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, const autoPtr< writer< scalar >> &setWriter)
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
#define forAll(list, i)
Loop across all elements in list.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
messageStream Info
Information stream (uses stdout - output is on the master only)
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields)
label checkGeometry(const polyMesh &mesh, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, const autoPtr< writer< scalar >> &setWriter)
label checkMeshQuality(const polyMesh &mesh, const dictionary &dict, autoPtr< surfaceWriter > &writer)
readUpdateState
Enumeration defining the state of the mesh after a read update.
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.
const word & system() const
Return system name.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
static autoPtr< surfaceWriter > New(const word &writeType)
Return a reference to the selected surfaceWriter.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
void printMeshStats(const polyMesh &mesh, const bool allTopology)
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const Time & time() const
Return the top-level database.
const globalMeshData & globalData() const
Return parallel info.
static instantList select0(Time &runTime, const argList &args)
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)
bool found(const word &optName) const
Return true if the named option is found.
static autoPtr< writer > New(const word &writeFormat)
Return a reference to the selected writer.