33 template<
class BinaryOp>
34 void Foam::domainDecomposition::processInterCyclics
36 const polyBoundaryMesh&
patches,
37 List<DynamicList<DynamicList<label>>>& interPatchFaces,
38 List<Map<label>>& procNbrToInterPatch,
39 List<labelListList>& subPatchIDs,
40 List<labelListList>& subPatchStarts,
49 const auto* cpp = isA<cyclicPolyPatch>(
pp);
51 if (cpp && cpp->owner() ==
owner)
54 const auto& cycPatch = *cpp;
55 const auto& nbrPatch = cycPatch.neighbPatch();
59 const labelUList& nbrPatchFaceCells = nbrPatch.faceCells();
64 forAll(oldInterfaceSizes, proci)
66 labelList& curOldSizes = oldInterfaceSizes[proci];
69 forAll(curOldSizes, interI)
72 interPatchFaces[proci][interI].size();
77 forAll(patchFaceCells, facei)
79 const label ownerProc = cellToProc_[patchFaceCells[facei]];
80 const label nbrProc = cellToProc_[nbrPatchFaceCells[facei]];
81 if (bop(ownerProc, nbrProc))
96 forAll(oldInterfaceSizes, proci)
98 const labelList& curOldSizes = oldInterfaceSizes[proci];
100 forAll(curOldSizes, interI)
102 label oldSz = curOldSizes[interI];
103 if (interPatchFaces[proci][interI].
size() > oldSz)
106 append(subPatchIDs[proci][interI], patchi);
107 append(subPatchStarts[proci][interI], oldSz);
113 forAll(subPatchIDs, proci)
115 label nIntfcs = interPatchFaces[proci].size();
116 subPatchIDs[proci].setSize(nIntfcs,
labelList(1, patchi));
List< labelList > labelListList
List of labelList.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
label size() const noexcept
The number of elements in table.
void setSize(const label n)
Alias for resize()
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
const polyBoundaryMesh & patches
List< label > labelList
A List of labels.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)