49void Foam::cellSplitter::getFaceInfo
59 if (!mesh_.isInternalFace(facei))
61 patchID = mesh_.boundaryMesh().whichPatch(facei);
64 zoneID = mesh_.faceZones().whichZone(facei);
70 const faceZone& fZone = mesh_.faceZones()[zoneID];
72 zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
79Foam::label Foam::cellSplitter::newOwner
85 const label old = mesh_.faceOwner()[facei];
87 const auto iter = cellToCells.cfind(old);
100 const cell& cFaces = mesh_.cells()[old];
102 return newCells[cFaces.find(facei)];
106Foam::label Foam::cellSplitter::newNeighbour
112 const label old = mesh_.faceNeighbour()[facei];
114 const auto iter = cellToCells.cfind(old);
127 const cell& cFaces = mesh_.cells()[old];
129 return newCells[cFaces.find(facei)];
146 const Map<point>& cellToMidPoint,
147 polyTopoChange& meshMod
150 addedPoints_.clear();
151 addedPoints_.reserve(cellToMidPoint.size());
160 const label celli = iter.key();
162 label anchorPoint = mesh_.cellPoints()[celli][0];
175 addedPoints_.insert(celli, addedPointi);
187 Map<labelList> cellToCells(2*cellToMidPoint.size());
191 const label celli = iter.key();
193 const cell& cFaces = mesh_.cells()[celli];
202 for (label i = 1; i < cFaces.size(); i++)
217 newCells[i] = addedCelli;
220 cellToCells.insert(celli, newCells);
236 const label celli = iter.key();
238 label midPointi = addedPoints_[celli];
240 const cell& cFaces = mesh_.cells()[celli];
242 const labelList& cEdges = mesh_.cellEdges()[celli];
246 label edgeI = cEdges[i];
247 const edge&
e = mesh_.edges()[edgeI];
255 const labelList& newCells = cellToCells[celli];
257 label cell0 = newCells[cFaces.find(face0)];
258 label cell1 = newCells[cFaces.find(face1)];
265 const face& f0 = mesh_.faces()[face0];
267 label index = f0.find(
e[0]);
269 bool edgeInFaceOrder = (f0[f0.fcIndex(index)] ==
e[1]);
274 if (edgeInFaceOrder == (mesh_.faceOwner()[face0] == celli))
311 const face& f1 = mesh_.faces()[face1];
313 label index = f1.find(
e[0]);
315 bool edgeInFaceOrder = (f1[f1.fcIndex(index)] ==
e[1]);
320 if (edgeInFaceOrder == (mesh_.faceOwner()[face1] == celli))
362 bitSet faceUpToDate(mesh_.nFaces(),
true);
366 const label celli = iter.key();
368 const cell& cFaces = mesh_.cells()[celli];
370 faceUpToDate.unset(cFaces);
373 forAll(faceUpToDate, facei)
375 if (!faceUpToDate.test(facei))
377 faceUpToDate.set(facei);
379 const face&
f = mesh_.faces()[facei];
381 if (mesh_.isInternalFace(facei))
383 label newOwn = newOwner(facei, cellToCells);
384 label newNbr = newNeighbour(facei, cellToCells);
426 label newOwn = newOwner(facei, cellToCells);
428 label
patchID, zoneID, zoneFlip;
429 getFaceInfo(facei,
patchID, zoneID, zoneFlip);
435 mesh_.faces()[facei],
456 Map<label> newAddedPoints(addedPoints_.size());
460 const label oldCelli = iter.key();
461 const label oldPointi = iter.val();
463 const label newCelli = morphMap.reverseCellMap()[oldCelli];
464 const label
newPointi = morphMap.reversePointMap()[oldPointi];
468 newAddedPoints.insert(newCelli,
newPointi);
473 addedPoints_.transfer(newAddedPoints);
A HashTable to objects of type <T> with a label key.
Does pyramidal decomposition of selected cells. So all faces will become base of pyramid with as top ...
void setRefinement(const Map< point > &cellToMidPoint, polyTopoChange &meshMod)
Insert mesh changes into meshMod.
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
A cell is defined as a list of faces with extra functionality.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Mesh consisting of general polyhedral cells.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.