Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria. More...
Public Member Functions | |
ClassName ("polyMeshFilter") | |
Runtime type information. More... | |
polyMeshFilter (const fvMesh &mesh) | |
Construct from fvMesh. More... | |
polyMeshFilter (const fvMesh &mesh, const labelList &pointPriority) | |
Construct from fvMesh and a label list of point priorities. More... | |
~polyMeshFilter () | |
Destructor. More... | |
const autoPtr< fvMesh > & | filteredMesh () const |
Return reference to the filtered mesh. Does not check if the. More... | |
const autoPtr< labelList > & | pointPriority () const |
Return the new pointPriority list. More... | |
label | filter (const label nOriginalBadFaces) |
Filter edges and faces. More... | |
label | filter (const faceSet &fSet) |
Filter all faces that are in the face set. More... | |
label | filterEdges (const label nOriginalBadFaces) |
Filter edges only. More... | |
Static Public Member Functions | |
static autoPtr< fvMesh > | copyMesh (const fvMesh &mesh) |
Return a copy of an fvMesh. More... | |
static void | copySets (const polyMesh &oldMesh, const polyMesh &newMesh) |
Copy loaded topoSets from the old mesh to the new mesh. More... | |
static void | updateSets (const mapPolyMesh &map) |
Update the loaded topoSets. More... | |
Private Member Functions | |
label | filterFacesLoop (const label nOriginalBadFaces) |
label | filterFaces (polyMesh &newMesh, scalarField &newMeshFaceFilterFactor, labelList &origToCurrentPointMap) |
label | filterEdges (polyMesh &newMesh, scalarField &newMeshMinEdgeLen, labelList &origToCurrentPointMap) |
void | updatePointErrorCount (const PackedBoolList &isErrorPoint, const labelList &oldToNewMesh, labelList &pointErrorCount) const |
Increment pointErrorCount for points attached to a bad face. More... | |
void | checkMeshEdgesAndRelaxEdges (const polyMesh &newMesh, const labelList &oldToNewMesh, const PackedBoolList &isErrorPoint, const labelList &pointErrorCount) |
Given the new points that are part of bad faces, and a map from the. More... | |
void | checkMeshFacesAndRelaxEdges (const polyMesh &newMesh, const labelList &oldToNewMesh, const PackedBoolList &isErrorPoint, const labelList &pointErrorCount) |
Given the new points that are part of bad faces, and a map from the. More... | |
void | updatePointPriorities (const polyMesh &newMesh, const labelList &pointMap) |
void | printScalarFieldStats (const string desc, const scalarField &fld) const |
Print min/mean/max data for a field. More... | |
void | mapOldMeshEdgeFieldToNewMesh (const polyMesh &newMesh, const labelList &pointMap, scalarField &newMeshMinEdgeLen) const |
Update minEdgeLen_ for the new mesh based upon the movement of the. More... | |
void | mapOldMeshFaceFieldToNewMesh (const polyMesh &newMesh, const labelList &faceMap, scalarField &newMeshFaceFilterFactor) const |
Update faceFilterFactor_ for the new mesh based upon the movement. More... | |
void | updateOldToNewPointMap (const labelList &currToNew, labelList &origToCurrentPointMap) const |
Maintain a map of the original mesh points to the latest version of. More... | |
polyMeshFilter (const polyMeshFilter &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const polyMeshFilter &) |
Disallow default bitwise assignment. More... | |
![]() | |
polyMeshFilterSettings (const dictionary &dict) | |
Construct from dictionary. More... | |
~polyMeshFilterSettings () | |
Destructor. More... | |
const dictionary & | collapseEdgesCoeffDict () const |
const dictionary & | collapseFacesCoeffDict () const |
const dictionary & | meshQualityCoeffDict () const |
const Switch & | controlMeshQuality () const |
const scalar & | minLen () const |
const scalar & | maxCos () const |
const scalar & | edgeReductionFactor () const |
const label & | maxIterations () const |
const label & | maxSmoothIters () const |
const scalar & | initialFaceLengthFactor () const |
const scalar & | faceReductionFactor () const |
const label & | maxPointErrorCount () const |
void | writeSettings (Ostream &os) const |
Write the settings to a stream. More... | |
Static Private Member Functions | |
template<typename T > | |
static void | updateSets (const mapPolyMesh &map) |
template<typename T > | |
static void | copySets (const polyMesh &oldMesh, const polyMesh &newMesh) |
Private Attributes | |
const fvMesh & | mesh_ |
Reference to the original mesh. More... | |
autoPtr< fvMesh > | newMeshPtr_ |
Copy of the original mesh to perform the filtering on. More... | |
labelList | originalPointPriority_ |
Original point priorities. If a point has a higher priority than. More... | |
autoPtr< labelList > | pointPriority_ |
Point priority associated with the new mesh. More... | |
scalarField | minEdgeLen_ |
The minimum edge length for each edge. More... | |
scalarField | faceFilterFactor_ |
The face filter factor for each face. More... | |
Remove the edges and faces of a polyMesh whilst satisfying the given mesh quality criteria.
Definition at line 62 of file polyMeshFilter.H.
|
private |
Disallow default bitwise copy construct.
|
explicit |
Construct from fvMesh.
Definition at line 892 of file polyMeshFilter.C.
References Foam::Info, and polyMeshFilterSettings::writeSettings().
polyMeshFilter | ( | const fvMesh & | mesh, |
const labelList & | pointPriority | ||
) |
Construct from fvMesh and a label list of point priorities.
Definition at line 920 of file polyMeshFilter.C.
References Foam::Info.
~polyMeshFilter | ( | ) |
Destructor.
Definition at line 952 of file polyMeshFilter.C.
|
staticprivate |
Definition at line 34 of file polyMeshFilterTemplates.C.
References polyMesh::facesInstance(), forAllConstIter(), forAllIter, HashTable::found(), IOobjectList::lookupClass(), mapPolyMesh::mesh(), and objectRegistry::time().
Definition at line 71 of file polyMeshFilterTemplates.C.
References forAllConstIter(), and IOobject::name().
|
private |
Definition at line 105 of file polyMeshFilter.C.
References edgeCollapser::checkMeshQuality(), PackedList::count(), Foam::decrIndent(), Foam::endl(), forAll, Foam::identity(), Foam::incrIndent(), Foam::indent(), Foam::Info, Foam::labelMax, Foam::nl, primitiveMesh::nPoints(), Foam::reduce(), and Foam::returnReduce().
|
private |
Definition at line 297 of file polyMeshFilter.C.
References polyTopoChange::changeMesh(), collapseEdge(), edgeCollapser::consistentCollapse(), Foam::endl(), mapPolyMesh::faceMap(), Pair::first(), forAll, mapPolyMesh::hasMotionPoints(), Foam::indent(), Foam::Info, edgeCollapser::markSmallSliverFaces(), polyMesh::movePoints(), primitiveMesh::nEdges(), Foam::nl, primitiveMesh::nPoints(), mapPolyMesh::pointMap(), mapPolyMesh::preMotionPoints(), Foam::reduce(), Foam::returnReduce(), mapPolyMesh::reversePointMap(), Pair::second(), edgeCollapser::setRefinement(), and polyMesh::updateMesh().
|
private |
Definition at line 413 of file polyMeshFilter.C.
References polyTopoChange::changeMesh(), collapseEdge(), edgeCollapser::consistentCollapse(), Foam::endl(), mapPolyMesh::hasMotionPoints(), Foam::indent(), Foam::Info, edgeCollapser::markMergeEdges(), edgeCollapser::markSmallEdges(), polyMesh::movePoints(), primitiveMesh::nEdges(), Foam::nl, primitiveMesh::nPoints(), mapPolyMesh::pointMap(), mapPolyMesh::preMotionPoints(), Foam::reduce(), mapPolyMesh::reversePointMap(), edgeCollapser::setRefinement(), and polyMesh::updateMesh().
|
private |
Increment pointErrorCount for points attached to a bad face.
Definition at line 530 of file polyMeshFilter.C.
References forAll.
|
private |
Given the new points that are part of bad faces, and a map from the.
old mesh points to the new mesh points, relax minEdgeLen_
Definition at line 547 of file polyMeshFilter.C.
References Foam::e, forAll, Foam::min(), and syncTools::syncEdgeList().
|
private |
Given the new points that are part of bad faces, and a map from the.
old mesh points to the new mesh points, relax faceFilterFactor_
Definition at line 624 of file polyMeshFilter.C.
References f(), forAll, Foam::min(), and syncTools::syncFaceList().
Definition at line 719 of file polyMeshFilter.C.
References forAll, Foam::labelMin, Foam::max(), primitiveMesh::nPoints(), and syncTools::syncPointList().
|
private |
Print min/mean/max data for a field.
Definition at line 748 of file polyMeshFilter.C.
References Foam::decrIndent(), Foam::endl(), fld(), forAll, Foam::incrIndent(), Foam::indent(), Foam::Info, Foam::max(), Foam::min(), Foam::nl, Foam::reduce(), Foam::returnReduce(), and Foam::sum().
|
private |
Update minEdgeLen_ for the new mesh based upon the movement of the.
old points to the new points
Definition at line 797 of file polyMeshFilter.C.
References primitiveMesh::edges(), edge::end(), forAll, Foam::min(), primitiveMesh::nEdges(), edge::start(), and syncTools::syncEdgeList().
|
private |
Update faceFilterFactor_ for the new mesh based upon the movement.
of the old faces to the new faces
Definition at line 833 of file polyMeshFilter.C.
References Foam::faceMap(), forAll, primitiveMesh::nFaces(), and syncTools::syncFaceList().
|
private |
Maintain a map of the original mesh points to the latest version of.
the filtered mesh.
Definition at line 860 of file polyMeshFilter.C.
References forAll.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "polyMeshFilter" | ) |
Runtime type information.
const Foam::autoPtr< Foam::fvMesh > & filteredMesh | ( | ) | const |
Return reference to the filtered mesh. Does not check if the.
mesh has actually been filtered.
Definition at line 1107 of file polyMeshFilter.C.
const Foam::autoPtr< Foam::labelList > & pointPriority | ( | ) | const |
Return the new pointPriority list.
Definition at line 1114 of file polyMeshFilter.C.
|
static |
Return a copy of an fvMesh.
Definition at line 67 of file polyMeshFilter.C.
References mapPolyMesh::hasMotionPoints(), polyTopoChange::makeMesh(), mesh, fvMesh::name(), IOobject::NO_READ, IOobject::NO_WRITE, mapPolyMesh::preMotionPoints(), and fvMesh::time().
Copy loaded topoSets from the old mesh to the new mesh.
Definition at line 56 of file polyMeshFilter.C.
|
static |
Update the loaded topoSets.
Definition at line 47 of file polyMeshFilter.C.
Foam::label filter | ( | const label | nOriginalBadFaces | ) |
Filter edges and faces.
Definition at line 958 of file polyMeshFilter.C.
Foam::label filter | ( | const faceSet & | fSet | ) |
Filter all faces that are in the face set.
Definition at line 967 of file polyMeshFilter.C.
References forAll, and HashTable::found().
Foam::label filterEdges | ( | const label | nOriginalBadFaces | ) |
Filter edges only.
Definition at line 985 of file polyMeshFilter.C.
References edgeCollapser::checkMeshQuality(), PackedList::count(), Foam::decrIndent(), Foam::endl(), Foam::identity(), Foam::incrIndent(), Foam::indent(), Foam::Info, Foam::labelMax, Foam::nl, primitiveMesh::nPoints(), and Foam::returnReduce().
|
private |
Reference to the original mesh.
Definition at line 69 of file polyMeshFilter.H.
Copy of the original mesh to perform the filtering on.
Definition at line 72 of file polyMeshFilter.H.
|
private |
Original point priorities. If a point has a higher priority than.
another point then the edge between them collapses towards the point with the higher priority. (e.g. 2 is a higher priority than 1)
Definition at line 77 of file polyMeshFilter.H.
Point priority associated with the new mesh.
Definition at line 80 of file polyMeshFilter.H.
|
private |
The minimum edge length for each edge.
Definition at line 83 of file polyMeshFilter.H.
|
private |
The face filter factor for each face.
Definition at line 86 of file polyMeshFilter.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.