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();
List< label > labelList
A List of labels.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
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)
Add extra notes for the usage information.
const word dictName("blockMeshDict")
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
#define forAll(list, i)
Loop across all elements in list.
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
const fileName & pointsInstance() const
Return the current instance directory for points.
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
messageStream Info
Information stream (uses stdout - output is on the master only)
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.
static instantList selectIfPresent(Time &runTime, const argList &args)
const autoPtr< labelList > & pointPriority() const
Return the new pointPriority list.
errorManip< error > abort(error &err)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
label nPoints() const
Number of mesh points.
readOption
Enumeration defining the read options.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
bool found(const word &optName) const
Return true if the named option is found.