49 void Foam::cellSplitter::getFaceInfo
70 const faceZone& fZone = mesh_.
faceZones()[zoneID];
72 zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
79 Foam::label Foam::cellSplitter::newOwner
82 const Map<labelList>& cellToCells
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)];
106 Foam::label Foam::cellSplitter::newNeighbour
109 const Map<labelList>& cellToCells
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)];
135 Foam::cellSplitter::cellSplitter(
const polyMesh&
mesh)
146 const Map<point>& cellToMidPoint,
147 polyTopoChange& meshMod
150 addedPoints_.
clear();
151 addedPoints_.
resize(cellToMidPoint.size());
160 const label celli = iter.key();
162 label anchorPoint = mesh_.
cellPoints()[celli][0];
175 addedPoints_.
insert(celli, addedPointi);
187 Map<labelList> cellToCells(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];
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];
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);
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const labelListList & cellEdges() const
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type unset(const label i)
Unset the bool entry at specified position, always false for out-of-range access. ...
label find(const T &val, label pos=0) const
Find index of the first occurrence of the value.
void setRefinement(const Map< point > &cellToMidPoint, polyTopoChange &meshMod)
Insert mesh changes into meshMod.
const cellList & cells() const
label nFaces() const noexcept
Number of mesh faces.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
void resize(const label sz)
Resize the hash table for efficiency.
#define forAll(list, i)
Loop across all elements in list.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
const dimensionedScalar e
Elementary charge.
void clear()
Clear all entries from table.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
defineTypeNameAndDebug(combustionModel, 0)
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label whichPatch(const label faceIndex) const
Return patch index for a given mesh face index.
List< label > labelList
A List of labels.
const labelListList & cellPoints() const
forAllConstIters(mixture.phases(), phase)