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" 89 runTime.functionObjects().off();
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,
false);
179 polyMeshFilter::copySets(newMesh(),
mesh);
197 meshFilter.
filter(indirectPatchFaces);
201 meshMod.changeMesh(
mesh,
false);
203 polyMeshFilter::copySets(newMesh(),
mesh);
221 meshFilter.
filter(nBadFaces);
225 meshMod.changeMesh(
mesh,
false);
227 polyMeshFilter::copySets(newMesh(),
mesh);
243 Info<<
nl <<
"Writing collapsed mesh to time " 244 << runTime.timeName() <<
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.
label filter(const label nOriginalBadFaces)
Filter edges and faces.
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.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
readOption
Enumeration defining the read options.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
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.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
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.
void setInstance(const fileName &)
Set the instance for mesh files.
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.