Go to the documentation of this file.
67 int main(
int argc,
char *argv[])
71 "Collapses small edges to a point.\n"
72 "Optionally collapse small faces to a point and thin faces to an edge."
78 "Collapse small and sliver faces as well as small edges"
85 "Collapse faces that are in the supplied face set"
110 const bool overwrite =
args.
found(
"overwrite");
112 const bool collapseFaces =
args.
found(
"collapseFaces");
113 const bool collapseFaceSet =
args.
found(
"collapseFaceSet");
115 if (collapseFaces && collapseFaceSet)
118 <<
"Both face zone collapsing and face collapsing have been"
119 <<
"selected. Choose only one of:" <<
nl
120 <<
" -collapseFaces" <<
nl
121 <<
" -collapseFaceSet <faceSet>"
128 word faceSetName(
"indirectPatchFaces");
166 Info<<
"Read faceSet " << indirectPatchFaces.name()
184 nBadFaces = meshFilter.filterEdges(0);
188 meshMod.changeMesh(
mesh,
false);
190 polyMeshFilter::copySets(newMesh(),
mesh);
208 meshFilter.
filter(indirectPatchFaces);
212 meshMod.changeMesh(
mesh,
false);
214 polyMeshFilter::copySets(newMesh(),
mesh);
232 meshFilter.
filter(nBadFaces);
236 meshMod.changeMesh(
mesh,
false);
238 polyMeshFilter::copySets(newMesh(),
mesh);
254 Info<<
nl <<
"Writing collapsed mesh to time "
258 pointPriority.write();
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
virtual bool write(const bool valid=true) const
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const word dictName("faMeshDefinition")
static word timeName(const scalar t, const int precision=precision_)
Direct mesh changes based on v1.3 polyTopoChange syntax.
static void addNote(const string ¬e)
Ostream & endl(Ostream &os)
bool readIfPresent(const word &optName, T &val) const
label nPoints() const noexcept
Ostream & printExecutionTime(OSstream &os) const
const fileName & pointsInstance() const
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria.
static void noFunctionObjects(bool addWithOption=false)
const autoPtr< fvMesh > & filteredMesh() const
label filter(const label nOriginalBadFaces)
static instantList selectIfPresent(Time &runTime, const argList &args)
const autoPtr< labelList > & pointPriority() const
errorManip< error > abort(error &err)
void reset(autoPtr< T > &&other) noexcept
const word & name() const noexcept
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
static void addOptions(const bool constant=true, const bool withZero=false)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void setTime(const Time &t)
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
bool found(const word &optName) const