Given list of faces to remove insert all the topology changes. Contains helper function to get consistent set of faces to remove. More...
Public Member Functions | |
ClassName ("removeFaces") | |
Runtime type information. More... | |
removeFaces (const polyMesh &, const scalar minCos) | |
Construct from mesh and min cos of angle for boundary faces. More... | |
label | compatibleRemoves (const labelList &inPiercedFaces, labelList &cellRegion, labelList &cellRegionMaster, labelList &outPiercedFaces) const |
Find faces including those with cells which have the same mastercell. More... | |
void | setRefinement (const labelList &piercedFaces, const labelList &cellRegion, const labelList &cellRegionMaster, polyTopoChange &) const |
Play commands into polyTopoChange to remove faces. More... | |
void | updateMesh (const mapPolyMesh &) |
Force recalculation of locally stored data on topological change. More... | |
void | distribute (const mapDistributePolyMesh &) |
Force recalculation of locally stored data for mesh distribution. More... | |
Private Member Functions | |
void | changeCellRegion (const label cellI, const label oldRegion, const label newRegion, labelList &cellRegion) const |
Change elements in cellRegion that are oldRegion to newRegion. More... | |
label | changeFaceRegion (const labelList &cellRegion, const boolList &removedFace, const labelList &nFacesPerEdge, const label faceI, const label newRegion, const labelList &fEdges, labelList &faceRegion) const |
Changes region of connected set of faces. More... | |
boolList | getFacesAffected (const labelList &cellRegion, const labelList &cellRegionMaster, const labelList &facesToRemove, const labelHashSet &edgesToRemove, const labelHashSet &pointsToRemove) const |
Get all affected faces (including faces marked for removal) More... | |
void | mergeFaces (const labelList &cellRegion, const labelList &cellRegionMaster, const labelHashSet &pointsToRemove, const labelList &faceLabels, polyTopoChange &meshMod) const |
Merge faceLabels into single face. More... | |
void | getFaceInfo (const label faceI, label &patchID, label &zoneID, label &zoneFlip) const |
Get patch, zone info for faceI. More... | |
face | filterFace (const labelHashSet &, const label) const |
Return face with all pointsToRemove removed. More... | |
void | modFace (const face &f, const label masterFaceID, const label own, const label nei, const bool flipFaceFlux, const label newPatchID, const bool removeFromZone, const label zoneID, const bool zoneFlip, polyTopoChange &meshMod) const |
Wrapper for meshMod.modifyFace. Reverses face if own>nei. More... | |
removeFaces (const removeFaces &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const removeFaces &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
static void | writeOBJ (const indirectPrimitivePatch &, const fileName &) |
Debug: write set of faces to file in obj format. More... | |
Private Attributes | |
const polyMesh & | mesh_ |
Reference to mesh. More... | |
const scalar | minCos_ |
Cosine of angles between boundary faces. Boundary faces can be. More... | |
Given list of faces to remove insert all the topology changes. Contains helper function to get consistent set of faces to remove.
Not very well tested in parallel.
Definition at line 62 of file removeFaces.H.
|
private |
Disallow default bitwise copy construct.
removeFaces | ( | const polyMesh & | mesh, |
const scalar | minCos | ||
) |
Construct from mesh and min cos of angle for boundary faces.
to be considered aligned. Set to >= 1 to disable checking and always merge (if on same patch)
Definition at line 562 of file removeFaces.C.
|
private |
Change elements in cellRegion that are oldRegion to newRegion.
Recurses to cell neighbours.
Definition at line 54 of file removeFaces.C.
References forAll.
|
private |
Changes region of connected set of faces.
Definition at line 79 of file removeFaces.C.
References forAll.
|
private |
Get all affected faces (including faces marked for removal)
Definition at line 140 of file removeFaces.C.
References forAll, forAllConstIter(), and pFaces.
|
staticprivate |
Debug: write set of faces to file in obj format.
Definition at line 200 of file removeFaces.C.
References Foam::endl(), f(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), OFstream::name(), Foam::nl, Foam::Pout, and writeOBJ().
|
private |
Merge faceLabels into single face.
Definition at line 235 of file removeFaces.C.
References Foam::abort(), DynamicList::append(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeLoops(), f(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, HashTable::found(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), pFaces, PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), Foam::reverse(), polyTopoChange::setAction(), List::size(), List::transfer(), and writeOBJ().
|
private |
Get patch, zone info for faceI.
Definition at line 416 of file removeFaces.C.
References faceZone::flipMap(), and faceZone::whichFace().
|
private |
Return face with all pointsToRemove removed.
Definition at line 446 of file removeFaces.C.
References f(), forAll, HashTable::found(), and List::setSize().
|
private |
Wrapper for meshMod.modifyFace. Reverses face if own>nei.
Definition at line 475 of file removeFaces.C.
References f(), and polyTopoChange::setAction().
|
private |
Disallow default bitwise assignment.
ClassName | ( | "removeFaces" | ) |
Runtime type information.
Foam::label compatibleRemoves | ( | const labelList & | inPiercedFaces, |
labelList & | cellRegion, | ||
labelList & | cellRegionMaster, | ||
labelList & | outPiercedFaces | ||
) | const |
Find faces including those with cells which have the same mastercell.
Given set of faces to pierce calculates:
Definition at line 581 of file removeFaces.C.
References Foam::abort(), DynamicList::append(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::min(), List::setSize(), List::size(), and List::transfer().
Referenced by main().
void setRefinement | ( | const labelList & | piercedFaces, |
const labelList & | cellRegion, | ||
const labelList & | cellRegionMaster, | ||
polyTopoChange & | meshMod | ||
) | const |
Play commands into polyTopoChange to remove faces.
Definition at line 762 of file removeFaces.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::endl(), f(), f1, PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), HashSet< Key, Hash >::insert(), Foam::invertOneToMany(), Foam::labelI, Foam::labelMin, Foam::mag(), OFstream::name(), IOobject::name(), Foam::nl, patches, Foam::Pout, polyTopoChange::setAction(), List::size(), polyPatch::start(), WarningInFunction, regIOobject::write(), and writeOBJ().
Referenced by main().
|
inline |
Force recalculation of locally stored data on topological change.
Definition at line 207 of file removeFaces.H.
Referenced by main().
|
inline |
Force recalculation of locally stored data for mesh distribution.
Definition at line 211 of file removeFaces.H.
|
private |
Reference to mesh.
Definition at line 67 of file removeFaces.H.
|
private |
Cosine of angles between boundary faces. Boundary faces can be.
merged only if angle between faces > minCos.
Definition at line 71 of file removeFaces.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.