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" 107 if (collapseFaces && collapseFaceSet)
110 <<
"Both face zone collapsing and face collapsing have been" 111 <<
"selected. Choose only one of:" <<
nl 112 <<
" -collapseFaces" <<
nl 113 <<
" -collapseFaceSet <faceSet>" 120 word faceSetName(
"indirectPatchFaces");
159 Info<<
"Read faceSet " << indirectPatchFaces.name()
177 nBadFaces = meshFilter.filterEdges(0);
181 meshMod.changeMesh(
mesh,
false);
183 polyMeshFilter::copySets(newMesh(),
mesh);
201 meshFilter.
filter(indirectPatchFaces);
205 meshMod.changeMesh(
mesh,
false);
207 polyMeshFilter::copySets(newMesh(),
mesh);
225 meshFilter.
filter(nBadFaces);
229 meshMod.changeMesh(
mesh,
false);
231 polyMeshFilter::copySets(newMesh(),
mesh);
247 Info<<
nl <<
"Writing collapsed mesh to time " 251 pointPriority.write();
#define forAll(list, i)
Loop across all elements in list.
label filter(const label nOriginalBadFaces)
Filter edges and faces.
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< labelList > & pointPriority() const
Return the new pointPriority list.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
void off()
Switch the function objects off.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
readOption
Enumeration defining the read options.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const fileName & pointsInstance() const
Return the current instance directory for points.
A class for handling words, derived from string.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
List< label > labelList
A List of labels.
const word dictName("particleTrackDict")
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria...
errorManip< error > abort(error &err)
void set(T *)
Set pointer to that given.
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
void setInstance(const fileName &)
Set the instance for mesh files.
time_t elapsedClockTime() const
Returns wall-clock time from clock instantiation.
double elapsedCpuTime() const
Return CPU time (in seconds) from the start.
const functionObjectList & functionObjects() const
Return the list of function objects.
Direct mesh changes based on v1.3 polyTopoChange syntax.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
const autoPtr< fvMesh > & filteredMesh() const
Return reference to the filtered mesh. Does not check if the.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const label labelMin
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.