Go to the documentation of this file.
36 Foam::fvMeshPrimitiveLduAddressing::fvMeshPrimitiveLduAddressing
50 upperAddr_(
mesh.faceNeighbour()),
51 patchAddr_(
mesh.boundary().size()),
52 patchSchedule_(
mesh.globalData().patchSchedule())
56 patchAddr_[patchI] = &
mesh.boundary()[patchI].faceCells();
61 Foam::fvMeshPrimitiveLduAddressing::fvMeshPrimitiveLduAddressing
71 lowerAddr_(std::move(lowerAddr)),
72 upperAddr_(std::move(upperAddr)),
73 patchAddr_(patchAddr),
87 label own =
min(a,
b);
89 label nbr =
max(a,
b);
97 for (label i = startLabel; i < endLabel; i++)
99 if (neighbour[i] == nbr)
122 label nCells = addr.
size();
133 if (nbrs[nbrI] < nCells)
136 if (triIndex(addr, cellI, nbrs[nbrI]) == -1)
143 label globalNbr = globalCellIDs[nbrs[nbrI]];
144 label procI = globalNumbering.
whichProcID(globalNbr);
151 newLowerAddr.
setSize(nFaces + nExtraFaces);
152 newUpperAddr.
setSize(nFaces + nExtraFaces);
160 localFaceCells.
setSize(Pstream::nProcs());
161 remoteFaceCells.
setSize(Pstream::nProcs());
164 localFaceCells[procI].
setSize(nProcFaces[procI]);
165 remoteFaceCells[procI].
setSize(nProcFaces[procI]);
169 nbrCellFaces.
setSize(nbrCells.size());
178 label nbrCellI = nbrs[nbrI];
180 if (nbrCellI < nCells)
183 label faceI = triIndex(addr, cellI, nbrCellI);
187 newLowerAddr[faceI] =
min(cellI, nbrCellI);
188 newUpperAddr[faceI] =
max(cellI, nbrCellI);
197 label globalNbr = globalCellIDs[nbrCellI];
198 label procI = globalNumbering.
whichProcID(globalNbr);
199 label remoteCellI = globalNumbering.
toLocal(procI, globalNbr);
201 label procFaceI = nProcFaces[procI]++;
202 localFaceCells[procI][procFaceI] = cellI;
203 remoteFaceCells[procI][procFaceI] = remoteCellI;
211 lduPrimitiveMesh::upperTriOrder
223 forAll(nbrCellFaces, cellI)
The class contains the addressing required by the lduMatrix: upper, lower and losort.
static constexpr const zero Zero
Global zero (0)
A List obtained as a section of another List.
const labelUList & ownerStartAddr() const
Return owner start addressing.
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
static labelList addAddressing(const lduAddressing &addr, const labelListList &nbrCells, label &nExtraFaces, labelList &lower, labelList &upper, labelListList &nbrCellFaces, const globalIndex &, const labelList &globalCellIDs, labelListList &localFaceCells, labelListList &remoteFaceCells)
Given additional addressing (in the form of additional neighbour.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void inplaceRenumber(const labelUList &oldToNew, IntListType &lists)
Inplace renumber the values (not the indices) of a list of lists.
Mesh data needed to do the Finite Volume discretisation.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toLocal(const label i) const
From global to local on current processor.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
label whichProcID(const label i) const
Which processor does global come from? Binary search.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
void setSize(const label newSize)
Alias for resize(const label)
static label triIndex(const lduAddressing &, const label, const label)
Return off-diagonal index given owner and neighbour label. Return.