62 int main(
int argc,
char *argv[])
67 "Collapses small edges to a point.\n"
68 "Optionally collapse small faces to a point and thin faces to an edge."
74 "Collapse small and sliver faces as well as small edges"
81 "Collapse faces that are in the supplied face set"
103 if (collapseFaces && collapseFaceSet)
106 <<
"Both face zone collapsing and face collapsing have been"
107 <<
"selected. Choose only one of:" <<
nl
108 <<
" -collapseFaces" <<
nl
109 <<
" -collapseFaceSet <faceSet>"
116 word faceSetName(
"indirectPatchFaces");
140 runTime.setTime(
timeDirs[timeI], timeI);
142 Info<<
"Time = " << runTime.userTimeName() <<
endl;
155 Info<<
"Read faceSet " << indirectPatchFaces.name()
173 nBadFaces = meshFilter.filterEdges(0);
177 meshMod.changeMesh(
mesh);
179 polyMeshFilter::copySets(newMesh(),
mesh);
197 meshFilter.
filter(indirectPatchFaces);
201 meshMod.changeMesh(
mesh);
203 polyMeshFilter::copySets(newMesh(),
mesh);
221 meshFilter.
filter(nBadFaces);
225 meshMod.changeMesh(
mesh);
227 polyMeshFilter::copySets(newMesh(),
mesh);
243 Info<<
nl <<
"Writing collapsed mesh to time "
244 << runTime.name() <<
nl <<
endl;
247 pointPriority.write();
250 Info<<
nl <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
251 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
#define forAll(list, i)
Loop across all elements in list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
readOption
Enumeration defining the read options.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
void set(T *)
Set pointer to that given.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria.
const autoPtr< labelList > & pointPriority() const
Return the new pointPriority list.
label filter(const label nOriginalBadFaces)
Filter edges and faces.
const autoPtr< fvMesh > & filteredMesh() const
Return reference to the filtered mesh. Does not check if the.
const fileName & pointsInstance() const
Return the current instance directory for points.
void setInstance(const fileName &)
Set the instance for mesh files.
Direct mesh changes based on v1.3 polyTopoChange syntax.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
static instantList timeDirs
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion, const fileName &path=fileName::null)
static const label labelMin
Foam::argList args(argc, argv)