47 void Foam::cellSplitter::getFaceInfo
57 if (!mesh_.isInternalFace(facei))
59 patchID = mesh_.boundaryMesh().whichPatch(facei);
62 zoneID = mesh_.faceZones().whichZone(facei);
68 const faceZone& fZone = mesh_.faceZones()[zoneID];
70 zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
80 const Map<labelList>& cellToCells
83 label oldOwn = mesh_.faceOwner()[facei];
87 if (fnd == cellToCells.end())
98 const cell& cFaces = mesh_.cells()[oldOwn];
100 return newCells[
findIndex(cFaces, facei)];
108 const Map<labelList>& cellToCells
111 label oldNbr = mesh_.faceNeighbour()[facei];
115 if (fnd == cellToCells.end())
126 const cell& cFaces = mesh_.cells()[oldNbr];
128 return newCells[
findIndex(cFaces, facei)];
153 const Map<point>& cellToMidPoint,
154 polyTopoChange& meshMod
157 addedPoints_.clear();
158 addedPoints_.resize(cellToMidPoint.size());
167 label celli = iter.key();
169 label anchorPoint = mesh_.cellPoints()[celli][0];
182 addedPoints_.insert(celli, addedPointi);
194 Map<labelList> cellToCells(cellToMidPoint.size());
198 label celli = iter.key();
200 const cell& cFaces = mesh_.cells()[celli];
209 for (
label i = 1; i < cFaces.size(); i++)
224 newCells[i] = addedCelli;
227 cellToCells.insert(celli, newCells);
243 label celli = iter.key();
245 label midPointi = addedPoints_[celli];
247 const cell& cFaces = mesh_.cells()[celli];
249 const labelList& cEdges = mesh_.cellEdges()[celli];
253 label edgeI = cEdges[i];
254 const edge& e = mesh_.edges()[edgeI];
262 const labelList& newCells = cellToCells[celli];
272 const face& f0 = mesh_.faces()[face0];
276 bool edgeInFaceOrder = (f0[f0.fcIndex(index)] == e[1]);
281 if (edgeInFaceOrder == (mesh_.faceOwner()[face0] == celli))
318 const face& f1 = mesh_.faces()[face1];
322 bool edgeInFaceOrder = (f1[f1.fcIndex(index)] == e[1]);
327 if (edgeInFaceOrder == (mesh_.faceOwner()[face1] == celli))
369 boolList faceUpToDate(mesh_.nFaces(),
true);
373 label celli = iter.key();
375 const cell& cFaces = mesh_.cells()[celli];
379 label facei = cFaces[i];
381 faceUpToDate[facei] =
false;
385 forAll(faceUpToDate, facei)
387 if (!faceUpToDate[facei])
389 const face& f = mesh_.faces()[facei];
391 if (mesh_.isInternalFace(facei))
393 label newOwn = newOwner(facei, cellToCells);
394 label newNbr = newNeighbour(facei, cellToCells);
436 label newOwn = newOwner(facei, cellToCells);
438 label patchID, zoneID, zoneFlip;
439 getFaceInfo(facei, patchID, zoneID, zoneFlip);
445 mesh_.faces()[facei],
458 faceUpToDate[facei] =
true;
468 Map<label> newAddedPoints(addedPoints_.size());
472 label oldCelli = iter.key();
474 label newCelli = map.reverseCellMap()[oldCelli];
476 label oldPointi = iter();
478 label newPointi = map.reversePointMap()[oldPointi];
480 if (newCelli >= 0 && newPointi >= 0)
482 newAddedPoints.insert(newCelli, newPointi);
487 addedPoints_.transfer(newAddedPoints);
~cellSplitter()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
void topoChange(const polyTopoChangeMap &)
Force recalculation of locally stored data on topological change.
void setRefinement(const Map< point > &cellToMidPoint, polyTopoChange &meshMod)
Insert mesh changes into meshMod.
Holds information (coordinate and normal) regarding nearest wall point.
HashTable< T, label, Hash< label > >::const_iterator const_iterator
cellSplitter(const polyMesh &mesh)
Construct from mesh.
List< bool > boolList
Bool container classes.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
List< label > labelList
A List of labels.
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.