47 const labelList& boundaryPoints
54 for (
const label pointi : boundaryPoints)
56 bool updatePoint =
false;
59 for (
const label celli : pCells[pointi])
70 syncPoints.insert(pointi,
true);
79 Foam::dummyTransform()
86void Foam::zoneCPCStencil::calcPointBoundaryData
94 neiGlobal.reserve(boundaryPoints.size());
98 for (
const label pointi : boundaryPoints)
106 mesh_.pointFaces()[pointi],
124Foam::zoneCPCStencil::zoneCPCStencil(
const fvMesh&
mesh)
126 MeshObject_type(
mesh),
129 uptodate_(
mesh.nCells(), false)
149void Foam::zoneCPCStencil::calculateStencil
156 Map<bool> syncPoints = syncCoupledBoundaryPoints
159 nonEmptyBoundaryPoints_
162 labelList boundaryPoints(syncPoints.toc());
165 calcPointBoundaryData
175 for (
const label pointi : boundaryPoints)
177 const labelList& pGlobals = neiGlobal[pointi];
180 const labelList& pCells = mesh_.pointCells(pointi);
182 for (
const label celli : pCells)
185 if (
zone[celli] && !uptodate_[celli])
189 globalNumbering().toGlobal(celli),
191 globalCellCells[celli]
194 for (
const label gblIdx : globalCellCells[celli])
196 if (!globalNumbering().isLocal(gblIdx))
198 needComm_.insert(celli);
213 if (
zone[celli] && !uptodate_[celli])
215 for (
const label pointi : cPoints[celli])
217 labelList pCells = mesh_.pointCells(pointi);
219 for (label& neiCelli : pCells)
221 neiCelli = globalNumbering().toGlobal(neiCelli);
224 if (!uptodate_[celli])
228 globalNumbering().toGlobal(celli),
230 globalCellCells[celli]
235 uptodate_[celli] =
true;
Various functions to operate on Lists.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
void clear()
Remove all entries from table.
A HashTable to objects of type <T> with a label key.
Mesh data needed to do the Finite Volume discretisation.
const labelListList & pointCells() const
bool store()
Register object with its registry and transfer ownership to the registry.
computes a cell point cell stencil in a narrow band. resizes in case of topological change
static zoneCPCStencil & New(const fvMesh &)
base class for cell stencil in a narrow band
autoPtr< indirectPrimitivePatch > nonEmptyFacesPatch() const
Return patch of all coupled faces.
zoneCellStencils(const zoneCellStencils &)=delete
No copy construct.
void validBoundaryFaces(boolList &isValidBFace) const
Valid boundary faces (not empty and not coupled).
const polyMesh & mesh() const noexcept
Base class for mesh zones.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< bool > boolList
A List of bools.
#define forAll(list, i)
Loop across all elements in list.
List helper to add y unique elements to x.