Combines boundary faces into single face. The faces get the patch of the first face ('the master') More...
Public Member Functions | |
ClassName ("combineFaces") | |
Runtime type information. More... | |
combineFaces (const polyMesh &mesh, const bool undoable=false) | |
Construct from mesh. More... | |
const labelList & | masterFace () const |
If undoable: masterface for every set. More... | |
const labelList & | savedPointLabels () const |
If undoable: set of original point labels of stored points. More... | |
labelListList | getMergeSets (const scalar featureCos, const scalar minConcaveCos, const labelHashSet &boundaryCells, const bool mergeAcrossPatches=false) const |
Extract lists of all (non-coupled) boundary faces on selected. More... | |
labelListList | getMergeSets (const scalar featureCos, const scalar minConcaveCos, const bool mergeAcrossPatches=false) const |
Extract lists of all (non-coupled) boundary faces that can. More... | |
void | setRefinement (const labelListList &, polyTopoChange &) |
Play commands into polyTopoChange to combine faces. Gets. More... | |
void | updateMesh (const mapPolyMesh &) |
Force recalculation of locally stored data on topological change. More... | |
void | setUnrefinement (const labelList &masterFaces, polyTopoChange &meshMod, Map< label > &restoredPoints, Map< label > &restoredFaces, Map< label > &restoredCells) |
Play commands into polyTopoChange to reinsert original faces. More... | |
Static Public Member Functions | |
static face | getOutsideFace (const indirectPrimitivePatch &) |
Gets outside of patch as a face (in mesh point labels) More... | |
Combines boundary faces into single face. The faces get the patch of the first face ('the master')
Definition at line 54 of file combineFaces.H.
|
explicit |
Construct from mesh.
Definition at line 276 of file combineFaces.C.
ClassName | ( | "combineFaces" | ) |
Runtime type information.
|
inline |
If undoable: masterface for every set.
Definition at line 171 of file combineFaces.H.
Referenced by meshRefinement::mergePatchFacesUndo().
|
inline |
If undoable: set of original point labels of stored points.
Definition at line 179 of file combineFaces.H.
Referenced by meshRefinement::mergePatchFacesUndo().
Foam::labelListList getMergeSets | ( | const scalar | featureCos, |
const scalar | minConcaveCos, | ||
const labelHashSet & | boundaryCells, | ||
const bool | mergeAcrossPatches = false |
||
) | const |
Extract lists of all (non-coupled) boundary faces on selected.
cells that can be merged. Uses getFaceRegions. Optionally allow faces-on-different-patches to be merged (into the largest area face - could be improved). Note: causes a problem in undoing - all restored faces get the patch/zone from the master face.
Definition at line 293 of file combineFaces.C.
References forAllConstIters(), forAllIters, Foam::magSqr(), Foam::maxMagSqr(), List< T >::setSize(), UList< T >::size(), and HashTable< T, Key, Hash >::size().
Referenced by meshRefinement::mergePatchFaces(), and meshRefinement::mergePatchFacesUndo().
Foam::labelListList getMergeSets | ( | const scalar | featureCos, |
const scalar | minConcaveCos, | ||
const bool | mergeAcrossPatches = false |
||
) | const |
Extract lists of all (non-coupled) boundary faces that can.
be merged. Uses getFaceRegions. See note above about mergeAcrossPatches.
Definition at line 410 of file combineFaces.C.
References forAll, HashSet< Key, Hash >::insert(), Foam::foamVersion::patch, and patches.
|
static |
Gets outside of patch as a face (in mesh point labels)
Definition at line 448 of file combineFaces.C.
References Foam::abort(), Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edgeLoops(), PrimitivePatch< FaceList, PointField >::edges(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), UList< T >::find(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::meshPoints(), face::nextLabel(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), Foam::renumber(), Foam::reverse(), and UList< T >::size().
void setRefinement | ( | const labelListList & | faceSets, |
polyTopoChange & | meshMod | ||
) |
Play commands into polyTopoChange to combine faces. Gets.
labelListList of sets of faces to combine. Does no check for whether resulting face is legal.
Definition at line 576 of file combineFaces.C.
References Foam::abort(), coupled(), Foam::ensightOutput::debug, f(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, HashTable< T, Key, Hash >::insert(), n, Foam::nl, patches, polyTopoChange::setAction(), UList< T >::size(), syncTools::syncPointList(), faceZone::whichFace(), polyBoundaryMesh::whichPatch(), and Foam::Zero.
Referenced by meshRefinement::mergePatchFaces(), and meshRefinement::mergePatchFacesUndo().
void updateMesh | ( | const mapPolyMesh & | map | ) |
Force recalculation of locally stored data on topological change.
Definition at line 801 of file combineFaces.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::inplaceRenumber(), Foam::nl, mapPolyMesh::reverseFaceMap(), and mapPolyMesh::reversePointMap().
Referenced by meshRefinement::mergePatchFaces(), and meshRefinement::mergePatchFacesUndo().
void setUnrefinement | ( | const labelList & | masterFaces, |
polyTopoChange & | meshMod, | ||
Map< label > & | restoredPoints, | ||
Map< label > & | restoredFaces, | ||
Map< label > & | restoredCells | ||
) |
Play commands into polyTopoChange to reinsert original faces.
No other topo changes can be done inbetween setRefinement and setUnrefinement. Can be called multiple times to undo parts of the last setRefinement call. Gets the master face labels whose sets need to be restored. Returns maps from added restored point to original point label (i.e. content of savedPointLabels_). (only restoredPoints are actually set; rest are just for generalness). See note above about restoring faces from different patches (mergeAcrossPatches)
Definition at line 850 of file combineFaces.C.
References Foam::abort(), UList< T >::empty(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, HashTable< T, Key, Hash >::insert(), polyTopoChange::setAction(), UList< T >::size(), and faceZone::whichFace().
Referenced by meshRefinement::mergePatchFacesUndo().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.