31 void Foam::lduAddressing::calcLosort()
const
36 <<
"losort already calculated"
49 nNbrOfFace[nbr[nbrI]]++;
55 forAll (cellNbrFaces, cellI)
57 cellNbrFaces[cellI].setSize(nNbrOfFace[cellI]);
66 cellNbrFaces[nbr[nbrI]][nNbrOfFace[nbr[nbrI]]] = nbrI;
68 nNbrOfFace[nbr[nbrI]]++;
72 losortPtr_ =
new labelList(nbr.size(), -1);
79 forAll (cellNbrFaces, cellI)
81 const labelList& curNbr = cellNbrFaces[cellI];
85 lst[lstI] = curNbr[curNbrI];
92 void Foam::lduAddressing::calcOwnerStart()
const
97 <<
"owner start already calculated"
103 ownerStartPtr_ =
new labelList(size() + 1, own.size());
114 label curOwn = own[faceI];
116 if (curOwn > nOwnStart)
120 ownStart[i++] = faceI;
129 void Foam::lduAddressing::calcLosortStart()
const
134 <<
"losort start already calculated"
138 losortStartPtr_ =
new labelList(size() + 1, 0);
148 label nLsrtStart = 0;
154 const label curNbr = nbr[lsrt[faceI]];
156 if (curNbr > nLsrtStart)
160 lsrtStart[i++] = faceI;
168 lsrtStart[size()] = nbr.size();
202 return *ownerStartPtr_;
208 if (!losortStartPtr_)
213 return *losortStartPtr_;
220 label own =
min(a, b);
222 label nbr =
max(a, b);
224 label startLabel = ownerStartAddr()[own];
226 label endLabel = ownerStartAddr()[own + 1];
230 for (label i = startLabel; i < endLabel; i++)
232 if (neighbour[i] == nbr)
242 "lduAddressing::triIndex(const label owner, const label nbr) const"
243 ) <<
"neighbour " << nbr <<
" not found for owner " << own <<
". "
244 <<
"Problem with addressing"