Go to the documentation of this file.
61 int main(
int argc,
char *argv[])
66 "Collapses small edges to a point.\n"
67 "Optionally collapse small faces to a point and thin faces to an edge."
73 "Collapse small and sliver faces as well as small edges"
80 "Collapse faces that are in the supplied face set"
87 runTime.functionObjects().off();
99 if (collapseFaces && collapseFaceSet)
102 <<
"Both face zone collapsing and face collapsing have been"
103 <<
"selected. Choose only one of:" <<
nl
104 <<
" -collapseFaces" <<
nl
105 <<
" -collapseFaceSet <faceSet>"
112 word faceSetName(
"indirectPatchFaces");
136 runTime.setTime(
timeDirs[timeI], timeI);
138 Info<<
"Time = " << runTime.timeName() <<
endl;
151 Info<<
"Read faceSet " << indirectPatchFaces.name()
170 meshMod.changeMesh(
mesh,
false);
187 meshFilter.
filter(indirectPatchFaces);
191 meshMod.changeMesh(
mesh,
false);
208 meshFilter.
filter(nBadFaces);
212 meshMod.changeMesh(
mesh,
false);
230 Info<<
nl <<
"Writing collapsed mesh to time "
231 << runTime.timeName() <<
nl <<
endl;
234 pointPriority.write();
237 Info<<
nl <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
238 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
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.
#define forAll(list, i)
Loop across all elements in list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool write() const
Write mesh using IO settings from time.
const fileName & pointsInstance() const
Return the current instance directory for points.
label filterEdges(polyMesh &newMesh, scalarField &newMeshMinEdgeLen, labelList &origToCurrentPointMap)
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria.
static const label labelMin
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const autoPtr< fvMesh > & filteredMesh() const
Return reference to the filtered mesh. Does not check if the.
label filter(const label nOriginalBadFaces)
Filter edges and faces.
void set(T *)
Set pointer to that given.
int main(int argc, char *argv[])
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
const autoPtr< labelList > & pointPriority() const
Return the new pointPriority list.
errorManip< error > abort(error &err)
void setInstance(const fileName &)
Set the instance for mesh files.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static instantList timeDirs
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void copySets(const polyMesh &oldMesh, const polyMesh &newMesh)
bool optionFound(const word &opt) const
Return true if the named option is found.
void reset(T *=0)
If object pointer already set, delete object and set to given.
readOption
Enumeration defining the read options.
Foam::argList args(argc, argv)
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.