54 for (
const label pointi : boundaryPoints)
56 bool updatePoint =
false;
59 for (
const label celli : pCells[pointi])
70 syncPoints.
insert(pointi,
true);
86 void Foam::zoneCPCStencil::calcPointBoundaryData
91 Map<labelList>& neiGlobal
94 neiGlobal.reserve(boundaryPoints.size());
98 for (
const label pointi : boundaryPoints)
106 mesh_.pointFaces()[pointi],
116 ListOps::unionEqOp(),
124 Foam::zoneCPCStencil::zoneCPCStencil(
const fvMesh&
mesh)
126 MeshObject_type(
mesh),
128 nonEmptyBoundaryPoints_(nonEmptyFacesPatch()().meshPoints()),
129 uptodate_(
mesh.nCells(), false)
132 validBoundaryFaces(isValidBFace_);
149 void Foam::zoneCPCStencil::calculateStencil
156 Map<bool> syncPoints = syncCoupledBoundaryPoints
159 nonEmptyBoundaryPoints_
162 labelList boundaryPoints(syncPoints.toc());
164 Map<labelList> neiGlobal;
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;
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 ...
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< labelList > labelListList
List of labelList.
Various functions to operate on Lists.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
bool insert(const label &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Type * getObjectPtr(const word &name, const bool recursive=false) const
Return non-const pointer to the object of the given Type, using a const-cast to have it behave like a...
static zoneCPCStencil & New(const fvMesh &)
const fvMesh & mesh_
Reference to the mesh.
const labelListList & pointCells() const
defineTypeNameAndDebug(combustionModel, 0)
Mesh data needed to do the Finite Volume discretisation.
base class for cell stencil in a narrow band
List< label > labelList
A List of labels.
List< bool > boolList
A List of bools.
A HashTable to objects of type <T> with a label key.