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"
92 const word oldInstance = mesh.pointsInstance();
101 if (collapseFaces && collapseFaceSet)
104 <<
"Both face zone collapsing and face collapsing have been"
105 <<
"selected. Choose only one of:" <<
nl
106 <<
" -collapseFaces" <<
nl
107 <<
" -collapseFaceSet <faceSet>"
114 word faceSetName(
"indirectPatchFaces");
138 runTime.setTime(
timeDirs[timeI], timeI);
140 Info<<
"Time = " << runTime.userTimeName() <<
endl;
153 Info<<
"Read faceSet " << indirectPatchFaces.name()
171 nBadFaces = meshFilter.filterEdges(0);
175 meshMod.changeMesh(mesh);
177 polyMeshFilter::copySets(newMesh(), mesh);
195 meshFilter.
filter(indirectPatchFaces);
199 meshMod.changeMesh(mesh);
201 polyMeshFilter::copySets(newMesh(), mesh);
219 meshFilter.
filter(nBadFaces);
223 meshMod.changeMesh(mesh);
225 polyMeshFilter::copySets(newMesh(), mesh);
238 mesh.setInstance(oldInstance);
241 Info<<
nl <<
"Writing collapsed mesh to time "
242 << runTime.name() <<
nl <<
endl;
245 pointPriority.
write();
248 Info<<
nl <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
249 <<
" 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.
virtual Ostream & write(const char)=0
Write character.
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 keyword definitions, which are a keyword followed by any number of values (e....
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.
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.
#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.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
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)
static const label labelMin
Foam::argList args(argc, argv)