Direct mesh changes based on v1.3 polyTopoChange syntax. More...
Public Member Functions | |
ClassName ("polyTopoChange") | |
Runtime type information. More... | |
polyTopoChange (const label nPatches, const bool strict=true) | |
Construct without mesh. Either specify nPatches or use. More... | |
polyTopoChange (const polyMesh &mesh, const bool strict=true) | |
Construct from mesh. Adds all points/face/cells from mesh. More... | |
const DynamicList< point > & | points () const |
Points. Shrunk after constructing mesh (or calling of compact()) More... | |
const DynamicList< face > & | faces () const |
const DynamicList< label > & | region () const |
const DynamicList< label > & | faceOwner () const |
const DynamicList< label > & | faceNeighbour () const |
bool | pointRemoved (const label pointI) const |
Is point removed? More... | |
bool | faceRemoved (const label faceI) const |
Is face removed? More... | |
bool | cellRemoved (const label cellI) const |
Is cell removed? More... | |
void | clear () |
Clear all storage. More... | |
void | addMesh (const polyMesh &, const labelList &patchMap, const labelList &pointZoneMap, const labelList &faceZoneMap, const labelList &cellZoneMap) |
Add all points/faces/cells of mesh. Additional offset for patch. More... | |
void | setCapacity (const label nPoints, const label nFaces, const label nCells) |
Explicitly pre-size the dynamic storage for expected mesh. More... | |
void | movePoints (const pointField &newPoints) |
Move all points. Incompatible with other topology changes. More... | |
label | setAction (const topoAction &action) |
For compatibility with polyTopoChange: set topological action. More... | |
label | addPoint (const point &, const label masterPointID, const label zoneID, const bool inCell) |
Add point. Return new point label. More... | |
void | modifyPoint (const label, const point &, const label newZoneID, const bool inCell) |
Modify coordinate. More... | |
void | removePoint (const label, const label) |
Remove/merge point. More... | |
label | addFace (const face &f, const label own, const label nei, const label masterPointID, const label masterEdgeID, const label masterFaceID, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip) |
Add face to cells. Return new face label. More... | |
void | modifyFace (const face &f, const label faceI, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip) |
Modify vertices or cell of face. More... | |
void | removeFace (const label, const label) |
Remove/merge face. More... | |
label | addCell (const label masterPointID, const label masterEdgeID, const label masterFaceID, const label masterCellID, const label zoneID) |
Add cell. Return new cell label. More... | |
void | modifyCell (const label, const label zoneID) |
Modify zone of cell. More... | |
void | removeCell (const label, const label) |
Remove/merge cell. More... | |
void | setNumPatches (const label nPatches) |
Explicitly set the number of patches if construct-without-mesh. More... | |
autoPtr< mapPolyMesh > | changeMesh (polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
Inplace changes mesh without change of patches. More... | |
autoPtr< mapPolyMesh > | makeMesh (autoPtr< fvMesh > &newMesh, const IOobject &io, const polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
Create new mesh with old mesh patches. More... | |
Private Member Functions | |
bool | hasValidPoints (const face &) const |
Are all face vertices valid. More... | |
pointField | facePoints (const face &f) const |
Return face points. More... | |
void | checkFace (const face &, const label faceI, const label own, const label nei, const label patchI, const label zoneI) const |
Check inputs to modFace or addFace. More... | |
void | makeCells (const label nActiveFaces, labelList &cellFaces, labelList &cellFaceOffsets) const |
Construct cells (in packed storage) More... | |
void | makeCellCells (const label nActiveFaces, CompactListList< label, labelList > &cellCells) const |
Construct cellCells (in packed storage) More... | |
label | getCellOrder (const CompactListList< label, labelList > &, labelList &) const |
Cell ordering (bandCompression). Returns number of remaining cells. More... | |
void | getFaceOrder (const label nActiveFaces, const labelList &cellFaces, const labelList &cellFaceOffsets, labelList &oldToNew, labelList &patchSizes, labelList &patchStarts) const |
Do upper-triangular ordering and patch ordering. More... | |
void | reorderCompactFaces (const label newSize, const labelList &oldToNew) |
Compact and reorder faces according to map. More... | |
void | compact (const bool orderCells, const bool orderPoints, label &nInternalPoints, labelList &patchSizes, labelList &patchStarts) |
Remove all unused/removed points/faces/cells and update. More... | |
void | calcPatchPointMap (const List< Map< label > > &, const polyBoundaryMesh &, labelListList &) const |
Calculate mapping for patchpoints only. More... | |
void | calcFaceInflationMaps (const polyMesh &, List< objectMap > &, List< objectMap > &, List< objectMap > &) const |
void | calcCellInflationMaps (const polyMesh &, List< objectMap > &, List< objectMap > &, List< objectMap > &, List< objectMap > &) const |
void | resetZones (const polyMesh &, polyMesh &, labelListList &, labelListList &, labelListList &) const |
void | calcFaceZonePointMap (const polyMesh &, const List< Map< label > > &, labelListList &) const |
void | reorderCoupledFaces (const bool syncParallel, const polyBoundaryMesh &, const labelList &patchStarts, const labelList &patchSizes, const pointField &points) |
Do all coupled patch face reordering. More... | |
void | compactAndReorder (const polyMesh &, const bool syncParallel, const bool orderCells, const bool orderPoints, label &nInternalPoints, pointField &newPoints, labelList &patchSizes, labelList &patchStarts, List< objectMap > &pointsFromPoints, List< objectMap > &facesFromPoints, List< objectMap > &facesFromEdges, List< objectMap > &facesFromFaces, List< objectMap > &cellsFromPoints, List< objectMap > &cellsFromEdges, List< objectMap > &cellsFromFaces, List< objectMap > &cellsFromCells, List< Map< label > > &oldPatchMeshPointMaps, labelList &oldPatchNMeshPoints, labelList &oldPatchStarts, List< Map< label > > &oldFaceZoneMeshPointMaps) |
Static Private Member Functions | |
template<class T > | |
static void | reorder (const labelList &map, DynamicList< T > &) |
Reorder contents of container according to map. More... | |
template<class T > | |
static void | reorder (const labelList &map, List< DynamicList< T > > &) |
template<class T > | |
static void | renumberKey (const labelList &map, Map< T > &) |
static void | renumber (const labelList &, labelHashSet &) |
Renumber elements of container according to map. More... | |
static void | renumberReverseMap (const labelList &, DynamicList< label > &) |
Special handling of reverse maps which have <-1 in them. More... | |
static void | renumberCompact (const labelList &, labelList &) |
Renumber & compact elements of list according to map. More... | |
static labelHashSet | getSetIndices (const PackedBoolList &) |
Get all set elements as a labelHashSet. More... | |
static void | countMap (const labelList &map, const labelList &reverseMap, label &nAdd, label &nInflate, label &nMerge, label &nRemove) |
Count number of added and removed quantities from maps. More... | |
static void | writeMeshStats (const polyMesh &mesh, Ostream &) |
Print some stats about mesh. More... | |
static void | getMergeSets (const labelList &reverseCellMap, const labelList &cellMap, List< objectMap > &cellsFromCells) |
Calculate object maps. Requires reverseMap to have destination. More... | |
static labelList | selectFaces (const primitiveMesh &, const labelList &faceLabels, const bool internalFacesOnly) |
Select either internal or external faces out of faceLabels. More... | |
Private Attributes | |
bool | strict_ |
Whether to allow referencing illegal points/cells/faces. More... | |
label | nPatches_ |
Number of patches. More... | |
DynamicList< point > | points_ |
Current point set. More... | |
DynamicList< label > | pointMap_ |
Original point label (or masterpoint for added points) More... | |
DynamicList< label > | reversePointMap_ |
For all original and added points contains new point label. More... | |
Map< label > | pointZone_ |
Zone of point. More... | |
labelHashSet | retiredPoints_ |
Retired points. More... | |
DynamicList< face > | faces_ |
Current faceList. More... | |
DynamicList< label > | region_ |
Patch for every external face (-1 for internal faces) More... | |
DynamicList< label > | faceOwner_ |
Owner for all faces. More... | |
DynamicList< label > | faceNeighbour_ |
Neighbour for internal faces (-1 for external faces) More... | |
DynamicList< label > | faceMap_ |
Original face label. Or master face for added-from-faces;. More... | |
DynamicList< label > | reverseFaceMap_ |
For all original and added faces contains new face label. More... | |
Map< label > | faceFromPoint_ |
Faces added from point (corresponding faceMap_ will. More... | |
Map< label > | faceFromEdge_ |
Faces added from edge (corresponding faceMap_ will. More... | |
PackedBoolList | flipFaceFlux_ |
In mapping whether to reverse the flux. More... | |
Map< label > | faceZone_ |
Zone of face. More... | |
PackedBoolList | faceZoneFlip_ |
Orientation of face in zone. More... | |
label | nActiveFaces_ |
Active faces. More... | |
DynamicList< label > | cellMap_ |
Original cell label or master cell for added-from-cell;. More... | |
DynamicList< label > | reverseCellMap_ |
For all original and added cells contains new cell label. More... | |
Map< label > | cellFromPoint_ |
Cells added from point. More... | |
Map< label > | cellFromEdge_ |
Cells added from edge. More... | |
Map< label > | cellFromFace_ |
Cells added from face. More... | |
DynamicList< label > | cellZone_ |
Zone of cell. More... | |
Direct mesh changes based on v1.3 polyTopoChange syntax.
Instead of recording changes and executing them all in one go (as did v1.3 polyTopoChange) this class actually holds the current points/faces/cells and does the change immediately. It can be asked to compress out all unused points/faces/cells and renumber everything to be consistent.
Note:
Definition at line 97 of file polyTopoChange.H.
polyTopoChange | ( | const label | nPatches, |
const bool | strict = true |
||
) |
Construct without mesh. Either specify nPatches or use.
setNumPatches before trying to make a mesh (makeMesh, changeMesh)
Definition at line 2184 of file polyTopoChange.C.
polyTopoChange | ( | const polyMesh & | mesh, |
const bool | strict = true |
||
) |
Construct from mesh. Adds all points/face/cells from mesh.
Definition at line 2216 of file polyTopoChange.C.
References polyMesh::boundaryMesh(), polyMesh::cellZones(), polyMesh::faceZones(), Foam::identity(), mesh, polyMesh::pointZones(), and PtrList::size().
|
staticprivate |
Reorder contents of container according to map.
Definition at line 32 of file polyTopoChangeTemplates.C.
References forAll.
|
staticprivate |
Definition at line 54 of file polyTopoChangeTemplates.C.
References forAll, and DynamicList::transfer().
Definition at line 76 of file polyTopoChangeTemplates.C.
References forAllConstIter().
|
staticprivate |
Renumber elements of container according to map.
Definition at line 79 of file polyTopoChange.C.
References forAllConstIter(), HashSet< Key, Hash >::insert(), HashTable::size(), and HashTable::transfer().
|
staticprivate |
Special handling of reverse maps which have <-1 in them.
Definition at line 56 of file polyTopoChange.C.
References forAll.
Renumber & compact elements of list according to map.
Definition at line 102 of file polyTopoChange.C.
References forAll, and List::setSize().
|
staticprivate |
Get all set elements as a labelHashSet.
Definition at line 188 of file polyTopoChange.C.
References PackedList::count(), forAll, and HashSet< Key, Hash >::insert().
|
staticprivate |
Count number of added and removed quantities from maps.
Definition at line 123 of file polyTopoChange.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and forAll.
Print some stats about mesh.
Definition at line 204 of file polyTopoChange.C.
References Foam::endl(), forAll, mesh, Foam::nl, and patches.
|
staticprivate |
Calculate object maps. Requires reverseMap to have destination.
to be marked with <-1.
Definition at line 226 of file polyTopoChange.C.
References forAll, objectMap::index(), objectMap::masterObjects(), List::setSize(), and List::size().
|
private |
Are all face vertices valid.
Definition at line 306 of file polyTopoChange.C.
References f(), forAll, and List::size().
|
private |
Return face points.
Definition at line 319 of file polyTopoChange.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, points, and List::size().
|
private |
Check inputs to modFace or addFace.
Definition at line 336 of file polyTopoChange.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, Vector< scalar >::max, Foam::nl, and List::size().
|
private |
Construct cells (in packed storage)
Definition at line 465 of file polyTopoChange.C.
References Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Vector< scalar >::max, List::setSize(), and List::size().
|
private |
Construct cellCells (in packed storage)
Definition at line 552 of file polyTopoChange.C.
References CompactListList::index(), CompactListList::m(), and CompactListList::setSize().
|
private |
Cell ordering (bandCompression). Returns number of remaining cells.
Definition at line 597 of file polyTopoChange.C.
References LList::append(), DynamicList::append(), DynamicList::clear(), forAll, Foam::invert(), Foam::labelMax, LList::removeHead(), List::setSize(), CompactListList::size(), and Foam::sortedOrder().
|
private |
Do upper-triangular ordering and patch ordering.
Definition at line 717 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Vector< scalar >::max, Foam::nl, List::setSize(), List::size(), and Foam::sortedOrder().
Compact and reorder faces according to map.
Definition at line 883 of file polyTopoChange.C.
References Foam::inplaceReorder(), and Foam::reorder().
|
private |
Remove all unused/removed points/faces/cells and update.
face ordering (always), cell ordering (bandcompression, orderCells=true), point ordering (sorted into internal and boundary points, orderPoints=true)
Definition at line 921 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), getFaceOrder(), Foam::Pout, Foam::renumber(), Foam::reorder(), List::setSize(), List::size(), and Foam::Swap().
|
staticprivate |
Select either internal or external faces out of faceLabels.
Definition at line 1283 of file polyTopoChange.C.
References forAll, primitiveMesh::isInternalFace(), mesh, and List::setSize().
|
private |
Calculate mapping for patchpoints only.
Definition at line 1333 of file polyTopoChange.C.
References boundary(), forAll, List::setSize(), and List::size().
|
private |
Definition at line 1380 of file polyTopoChange.C.
References primitiveMesh::edgeFaces(), forAllConstIter(), mesh, primitiveMesh::pointFaces(), and List::setSize().
|
private |
Definition at line 1492 of file polyTopoChange.C.
References primitiveMesh::edgeCells(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAllConstIter(), primitiveMesh::isInternalFace(), mesh, primitiveMesh::pointCells(), and List::setSize().
|
private |
Definition at line 1584 of file polyTopoChange.C.
References Foam::abort(), polyMesh::cellZones(), ZoneMesh::clearAddressing(), Foam::endl(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), mesh, nPoints, polyMesh::points(), polyMesh::pointZones(), Foam::Pout, List::setSize(), List::size(), Foam::sortedOrder(), Foam::stableSort(), List::transfer(), cellZone::whichCell(), faceZone::whichFace(), and pointZone::whichPoint().
|
private |
Definition at line 1883 of file polyTopoChange.C.
References polyMesh::faceZones(), forAll, mesh, List::setSize(), and List::size().
|
private |
Do all coupled patch face reordering.
Definition at line 1934 of file polyTopoChange.C.
References boundary(), PstreamBuffers::finishedSends(), forAll, Foam::identity(), UPstream::nonBlocking, points, Foam::reduce(), and List::size().
|
private |
Definition at line 2051 of file polyTopoChange.C.
References Foam::abort(), boundary(), polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, List::setSize(), PtrList::setSize(), List::size(), and PtrList::size().
ClassName | ( | "polyTopoChange" | ) |
Runtime type information.
|
inline |
Points. Shrunk after constructing mesh (or calling of compact())
Definition at line 421 of file polyTopoChange.H.
References polyTopoChange::points_.
Referenced by hexRef8::checkBoundaryOrientation(), hexRef8::checkInternalOrientation(), duplicatePoints::setRefinement(), addPatchCellLayer::setRefinement(), and meshRefinement::splitFacesUndo().
|
inline |
Definition at line 426 of file polyTopoChange.H.
References polyTopoChange::faces_.
Referenced by meshRefinement::splitFacesUndo().
|
inline |
Definition at line 431 of file polyTopoChange.H.
References polyTopoChange::region_.
|
inline |
Definition at line 436 of file polyTopoChange.H.
References polyTopoChange::faceOwner_.
|
inline |
Definition at line 441 of file polyTopoChange.H.
References polyTopoChange::faceNeighbour_.
|
inline |
Is point removed?
Definition at line 30 of file polyTopoChangeI.H.
References Vector< scalar >::max, polyTopoChange::points_, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by slidingInterface::coupleInterface(), and slidingInterface::decoupleInterface().
|
inline |
Is face removed?
Definition at line 41 of file polyTopoChangeI.H.
Referenced by attachDetach::attachInterface(), and slidingInterface::decoupleInterface().
|
inline |
Is cell removed?
Definition at line 47 of file polyTopoChangeI.H.
void clear | ( | ) |
Clear all storage.
Definition at line 2260 of file polyTopoChange.C.
void addMesh | ( | const polyMesh & | mesh, |
const labelList & | patchMap, | ||
const labelList & | pointZoneMap, | ||
const labelList & | faceZoneMap, | ||
const labelList & | cellZoneMap | ||
) |
Add all points/faces/cells of mesh. Additional offset for patch.
or zone ids.
Definition at line 2291 of file polyTopoChange.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), mesh, patchIdentifier::name(), primitiveMesh::nCells(), primitiveMesh::nInternalFaces(), primitiveMesh::nPoints(), patches, pointLabels(), points, polyMesh::points(), polyMesh::pointZones(), List::size(), polyPatch::start(), and WarningInFunction.
Explicitly pre-size the dynamic storage for expected mesh.
size for if construct-without-mesh
Definition at line 2498 of file polyTopoChange.C.
References nPoints.
Referenced by meshRefinement::splitFacesUndo().
void movePoints | ( | const pointField & | newPoints | ) |
Move all points. Incompatible with other topology changes.
Definition at line 2738 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and forAll.
Foam::label setAction | ( | const topoAction & | action | ) |
For compatibility with polyTopoChange: set topological action.
Definition at line 2530 of file polyTopoChange.C.
References Foam::abort(), polyRemoveCell::cellID(), polyModifyCell::cellID(), polyRemoveFace::faceID(), polyModifyFace::faceID(), Foam::FatalError, FatalErrorInFunction, polyModifyFace::flipFaceFlux(), polyAddFace::flipFaceFlux(), polyModifyPoint::inCell(), polyAddPoint::inCell(), polyAddCell::masterCellID(), polyAddCell::masterEdgeID(), polyAddFace::masterEdgeID(), polyAddCell::masterFaceID(), polyAddFace::masterFaceID(), polyAddPoint::masterPointID(), polyAddCell::masterPointID(), polyAddFace::masterPointID(), polyRemoveCell::mergeCellID(), polyRemoveFace::mergeFaceID(), polyRemovePoint::mergePointID(), polyModifyFace::neighbour(), polyAddFace::neighbour(), polyModifyFace::newFace(), polyAddFace::newFace(), polyAddPoint::newPoint(), polyModifyPoint::newPoint(), polyModifyFace::owner(), polyAddFace::owner(), polyModifyFace::patchID(), polyAddFace::patchID(), polyRemovePoint::pointID(), polyModifyPoint::pointID(), polyModifyCell::removeFromZone(), polyModifyFace::zoneFlip(), polyAddFace::zoneFlip(), polyModifyCell::zoneID(), polyModifyPoint::zoneID(), polyAddPoint::zoneID(), polyAddCell::zoneID(), polyModifyFace::zoneID(), and polyAddFace::zoneID().
Referenced by layerAdditionRemoval::addCellLayer(), boundaryCutter::addFace(), hexRef8::addFace(), meshCutAndRemove::addFace(), meshCutter::addFace(), hexRef8::addInternalFace(), addPatchCellLayer::addSideFace(), attachDetach::attachInterface(), changePatchID(), slidingInterface::clearCouple(), slidingInterface::coupleInterface(), meshRefinement::createBaffle(), slidingInterface::decoupleInterface(), attachDetach::detachInterface(), faceCollapser::filterFace(), insertDuplicateMerge(), meshRefinement::mergeBaffles(), removeFaces::mergeFaces(), polyMeshAdder::mergePoints(), meshCutAndRemove::modFace(), hexRef8::modFace(), removeFaces::modFace(), meshCutter::modFace(), removePoints::modifyFace(), layerAdditionRemoval::removeCellLayer(), fvMeshDistribute::repatch(), removeCells::setRefinement(), perfectInterface::setRefinement(), faceCollapser::setRefinement(), boundaryCutter::setRefinement(), removePoints::setRefinement(), combineFaces::setRefinement(), removeFaces::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), addPatchCellLayer::setRefinement(), hexRef8::setRefinement(), removePoints::setUnrefinement(), combineFaces::setUnrefinement(), and meshRefinement::zonify().
Foam::label addPoint | ( | const point & | pt, |
const label | masterPointID, | ||
const label | zoneID, | ||
const bool | inCell | ||
) |
Add point. Return new point label.
Notes:
Definition at line 2659 of file polyTopoChange.C.
Referenced by duplicatePoints::setRefinement(), createShellMesh::setRefinement(), and tetDecomposer::setRefinement().
Modify coordinate.
Notes:
Definition at line 2687 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by edgeCollapser::setRefinement().
Remove/merge point.
Definition at line 2757 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Vector< scalar >::max, and Foam::nl.
Referenced by polyMeshAdder::mergePoints(), and edgeCollapser::setRefinement().
Foam::label addFace | ( | const face & | f, |
const label | own, | ||
const label | nei, | ||
const label | masterPointID, | ||
const label | masterEdgeID, | ||
const label | masterFaceID, | ||
const bool | flipFaceFlux, | ||
const label | patchID, | ||
const label | zoneID, | ||
const bool | zoneFlip | ||
) |
Add face to cells. Return new face label.
own,nei<0, zoneID>=0 : add inactive face (to end of face list)
Definition at line 2805 of file polyTopoChange.C.
References f().
Referenced by tetDecomposer::addFace(), meshRefinement::doSplitFaces(), and createShellMesh::setRefinement().
void modifyFace | ( | const face & | f, |
const label | faceI, | ||
const label | own, | ||
const label | nei, | ||
const bool | flipFaceFlux, | ||
const label | patchID, | ||
const label | zoneID, | ||
const bool | zoneFlip | ||
) |
Modify vertices or cell of face.
Definition at line 2869 of file polyTopoChange.C.
References f().
Referenced by meshRefinement::doSplitFaces(), main(), tetDecomposer::modifyFace(), duplicatePoints::setRefinement(), edgeCollapser::setRefinement(), and meshRefinement::splitFacesUndo().
Remove/merge face.
Definition at line 2914 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by edgeCollapser::setRefinement(), and meshRefinement::splitFacesUndo().
Foam::label addCell | ( | const label | masterPointID, |
const label | masterEdgeID, | ||
const label | masterFaceID, | ||
const label | masterCellID, | ||
const label | zoneID | ||
) |
Add cell. Return new cell label.
Definition at line 2958 of file polyTopoChange.C.
Referenced by createShellMesh::setRefinement(), and tetDecomposer::setRefinement().
Modify zone of cell.
Definition at line 2995 of file polyTopoChange.C.
Remove/merge cell.
Definition at line 3004 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by edgeCollapser::setRefinement().
|
inline |
Explicitly set the number of patches if construct-without-mesh.
used.
Definition at line 53 of file polyTopoChangeI.H.
References nPatches.
Foam::autoPtr< Foam::mapPolyMesh > changeMesh | ( | polyMesh & | mesh, |
const bool | inflate, | ||
const bool | syncParallel = true , |
||
const bool | orderCells = false , |
||
const bool | orderPoints = false |
||
) |
Inplace changes mesh without change of patches.
Adapts patch start/end and by default does parallel matching. Clears all data. Returns map. inflate = true : keep old mesh points. Put new points into the returned map (preMotionPoints) so we can use inflation. Any points out of nothing (appended points) are vector::zero. inflate = false: set mesh points directly. Empty preMotionPoints in the map. orderCells : whether to order the cells (see bandCompression.H) orderPoints : whether to order the points into internal first followed by boundary points. This is not fully consistent with upper-triangular ordering of points and edges so is only done when explicitly asked for.
Definition at line 3039 of file polyTopoChange.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceZones(), forAll, mesh, primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), polyMesh::pointZones(), Foam::Pout, polyMesh::resetPrimitives(), PtrList::size(), polyMesh::topoChanging(), Foam::xferMove(), and Vector< scalar >::zero.
Referenced by autoLayerDriver::addLayers(), meshRefinement::createBaffles(), fvMeshDistribute::doRemoveCells(), meshRefinement::doRemoveCells(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), meshRefinement::dupNonManifoldPoints(), extrudePatchMesh::extrudeMesh(), polyMeshFilter::filterEdges(), polyMeshFilter::filterFaces(), main(), meshRefinement::mergeBaffles(), meshRefinement::mergePatchFaces(), meshRefinement::mergePatchFacesUndo(), meshRefinement::mergePoints(), fvMeshDistribute::mergeSharedPoints(), mergeSharedPoints(), dynamicRefineFvMesh::refine(), meshRefinement::refine(), multiDirRefinement::refineHex8(), fvMeshDistribute::repatch(), refinementIterator::setRefinement(), meshRefinement::splitFacesUndo(), dynamicRefineFvMesh::unrefine(), and meshRefinement::zonify().
Foam::autoPtr< Foam::mapPolyMesh > makeMesh | ( | autoPtr< fvMesh > & | newMesh, |
const IOobject & | io, | ||
const polyMesh & | mesh, | ||
const bool | syncParallel = true , |
||
const bool | orderCells = false , |
||
const bool | orderPoints = false |
||
) |
Create new mesh with old mesh patches.
Definition at line 3305 of file polyTopoChange.C.
References fvMesh::addFvPatches(), polyMesh::addZones(), polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), polyMesh::cellZones(), IOobject::clone(), Foam::endl(), polyMesh::faceZones(), forAll, mesh, Foam::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, IOobject::NO_READ, primitiveMesh::nPoints(), polyMesh::pointZones(), Foam::Pout, IOobject::readOpt(), autoPtr::reset(), PtrList::size(), and Foam::xferMove().
Referenced by autoLayerDriver::addLayers(), polyMeshFilter::copyMesh(), and fvMeshSubset::setLargeCellSubset().
|
private |
Whether to allow referencing illegal points/cells/faces.
when adding/removing data.
Definition at line 103 of file polyTopoChange.H.
|
private |
Number of patches.
Definition at line 109 of file polyTopoChange.H.
|
private |
Current point set.
Definition at line 115 of file polyTopoChange.H.
Referenced by polyTopoChange::pointRemoved(), and polyTopoChange::points().
|
private |
Original point label (or masterpoint for added points)
Definition at line 118 of file polyTopoChange.H.
|
private |
For all original and added points contains new point label.
(used to map return value of addPoint to new mesh point)
Definition at line 122 of file polyTopoChange.H.
Zone of point.
Definition at line 125 of file polyTopoChange.H.
|
private |
Retired points.
Definition at line 128 of file polyTopoChange.H.
|
private |
Current faceList.
Definition at line 134 of file polyTopoChange.H.
Referenced by polyTopoChange::faces().
|
private |
Patch for every external face (-1 for internal faces)
Definition at line 137 of file polyTopoChange.H.
Referenced by polyTopoChange::region().
|
private |
Owner for all faces.
Definition at line 140 of file polyTopoChange.H.
Referenced by polyTopoChange::faceOwner().
|
private |
Neighbour for internal faces (-1 for external faces)
Definition at line 143 of file polyTopoChange.H.
Referenced by polyTopoChange::faceNeighbour().
|
private |
Original face label. Or master face for added-from-faces;.
-1 for faces added-from-edge or added-from-point)
Definition at line 147 of file polyTopoChange.H.
|
private |
For all original and added faces contains new face label.
(used to map return value of addFace to new mesh face)
Definition at line 151 of file polyTopoChange.H.
Faces added from point (corresponding faceMap_ will.
be -1)
Definition at line 155 of file polyTopoChange.H.
Faces added from edge (corresponding faceMap_ will.
be -1)
Definition at line 159 of file polyTopoChange.H.
|
private |
In mapping whether to reverse the flux.
Definition at line 162 of file polyTopoChange.H.
Zone of face.
Definition at line 165 of file polyTopoChange.H.
|
private |
Orientation of face in zone.
Definition at line 168 of file polyTopoChange.H.
|
private |
Active faces.
Definition at line 171 of file polyTopoChange.H.
|
private |
Original cell label or master cell for added-from-cell;.
-1 for cells added from face or edge.
Definition at line 178 of file polyTopoChange.H.
|
private |
For all original and added cells contains new cell label.
(used to map return value of addCell to new mesh cell)
Definition at line 182 of file polyTopoChange.H.
Cells added from point.
Definition at line 185 of file polyTopoChange.H.
Cells added from edge.
Definition at line 188 of file polyTopoChange.H.
Cells added from face.
Definition at line 191 of file polyTopoChange.H.
|
private |
Zone of cell.
Definition at line 194 of file polyTopoChange.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.