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" 88 runTime.functionObjects().off();
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");
144 runTime.setTime(timeDirs[timeI], timeI);
146 Info<<
"Time = " << runTime.timeName() <<
endl;
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 " 248 << runTime.timeName() <<
nl <<
endl;
251 pointPriority.write();
254 Info<<
nl <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s" 255 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
#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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
const autoPtr< labelList > & pointPriority() const
Return the new pointPriority list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
readOption
Enumeration defining the read options.
const autoPtr< fvMesh > & filteredMesh() const
Return reference to the filtered mesh. Does not check if the.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void reset(T *=0)
If object pointer already set, delete object and set to given.
bool optionFound(const word &opt) const
Return true if the named option is found.
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.
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
void setInstance(const fileName &)
Set the instance for mesh files.
word dictName("noiseDict")
const fileName & pointsInstance() const
Return the current instance directory for points.
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.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual bool write() const
Write mesh using IO settings from time.
static const label labelMin
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.