54 nNonEmpty +=
pp.size();
64 label facei =
pp.start();
68 nonEmptyFaces[nNonEmpty++] = facei++;
96 nCoupled +=
pp.size();
106 label facei =
pp.start();
110 coupledFaces[nCoupled++] = facei++;
131 isValidBFace.
setSize(meshRef_.nBoundaryFaces());
139 label bFacei =
pp.start() - meshRef_.nInternalFaces();
142 isValidBFace[bFacei++] =
false;
157 for (
const label celli : cCells)
159 if (celli != globalI)
165 for (
const label celli : pGlobals)
167 if (celli != globalI)
173 cCells.setSize(
set.size()+1);
175 cCells[
n++] = globalI;
177 for (
const label seti :
set)
186 const label exclude0,
187 const label exclude1,
193 const labelList& own = meshRef_.faceOwner();
194 const labelList& nei = meshRef_.faceNeighbour();
198 const label globalOwn = globalNumbering().toGlobal(own[facei]);
199 if (globalOwn != exclude0 && globalOwn != exclude1)
201 globals.insert(globalOwn);
204 if (meshRef_.isInternalFace(facei))
206 const label globalNei = globalNumbering().toGlobal(nei[facei]);
207 if (globalNei != exclude0 && globalNei != exclude1)
209 globals.insert(globalNei);
214 const label bFacei = facei - meshRef_.nInternalFaces();
216 if (isValidBFace[bFacei])
218 label globalI = globalNumbering().toGlobal
224 if (globalI != exclude0 && globalI != exclude1)
226 globals.insert(globalI);
252 return globals.toc();
263 globalNumbering_(meshRef_.nCells() + meshRef_.nBoundaryFaces())
labelList faceLabels(nFaceLabels)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
void clear()
Remove all entries from table.
A List with indirect addressing.
bool set(const label i, bool val=true)
void setSize(label n)
Alias for resize().
void clear()
Clear the list, i.e. set size to zero.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Mesh data needed to do the Finite Volume discretisation.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
base class for cell stencil in a narrow band
globalIndex globalNumbering_
Global numbering for cells and boundary faces.
const globalIndex & globalNumbering() const noexcept
Global numbering for cells and boundary faces.
labelHashSet needComm_
cells requiring processor communciation
autoPtr< indirectPrimitivePatch > allCoupledFacesPatch() const
Return patch of all coupled faces.
autoPtr< indirectPrimitivePatch > nonEmptyFacesPatch() const
Return patch of all coupled faces.
zoneCellStencils(const zoneCellStencils &)=delete
No copy construct.
static void merge(const label globalI, const labelList &pGlobals, labelList &cCells)
Merge two lists and guarantee globalI is first.
void validBoundaryFaces(boolList &isValidBFace) const
Valid boundary faces (not empty and not coupled).
void insertFaceCells(const label exclude0, const label exclude1, const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
const polyMesh & mesh() const noexcept
const fvMesh & meshRef_
const reference to fvMesh
labelList calcFaceCells(const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
void set(List< bool > &bools, const labelUList &locations)
Set the listed locations (assign 'true').
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.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
List< bool > boolList
A List of bools.
#define forAll(list, i)
Loop across all elements in list.