Go to the documentation of this file.
37 <<
"losort already calculated"
50 nNbrOfFace[nbr[nbrI]]++;
56 forAll(cellNbrFaces, cellI)
58 cellNbrFaces[cellI].
setSize(nNbrOfFace[cellI]);
67 cellNbrFaces[nbr[nbrI]][nNbrOfFace[nbr[nbrI]]] = nbrI;
69 nNbrOfFace[nbr[nbrI]]++;
80 forAll(cellNbrFaces, cellI)
82 const labelList& curNbr = cellNbrFaces[cellI];
86 lst[lstI] = curNbr[curNbrI];
98 <<
"owner start already calculated"
115 label curOwn = own[faceI];
117 if (curOwn > nOwnStart)
121 ownStart[i++] = faceI;
135 <<
"losort start already calculated"
139 losortStartPtr_ =
new labelList(size() + 1, 0);
149 label nLsrtStart = 0;
155 const label curNbr = nbr[lsrt[faceI]];
157 if (curNbr > nLsrtStart)
161 lsrtStart[i++] = faceI;
169 lsrtStart[size()] = nbr.
size();
203 return *ownerStartPtr_;
209 if (!losortStartPtr_)
214 return *losortStartPtr_;
225 label startLabel = ownerStartAddr()[own];
227 label endLabel = ownerStartAddr()[own + 1];
231 for (
label i = startLabel; i < endLabel; i++)
233 if (neighbour[i] == nbr)
242 <<
"neighbour " << nbr <<
" not found for owner " << own <<
". "
243 <<
"Problem with addressing"
259 label own = owner[faceI];
260 label nei = neighbour[faceI];
264 cellBandwidth[nei] =
max(cellBandwidth[nei],
diff);
267 label bandwidth =
max(cellBandwidth);
270 scalar profile = 0.0;
271 forAll(cellBandwidth, cellI)
273 profile += 1.0*cellBandwidth[cellI];
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
const labelUList & losortStartAddr() const
Return losort start addressing.
labelList * losortPtr_
Demand-driven data.
void calcOwnerStart() const
Calculate owner start.
void calcLosortStart() const
Calculate losort start.
const labelUList & ownerStartAddr() const
Return owner start addressing.
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
void calcLosort() const
Calculate losort.
const labelUList & losortAddr() const
Return losort addressing.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
errorManip< error > abort(error &err)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label triIndex(const label a, const label b) const
Return off-diagonal index given owner and neighbour label.
void size(const label)
Override size to be inconsistent with allocated storage.
A 2-tuple for storing two objects of different types.
label size() const
Return the number of elements in the UList.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual ~lduAddressing()
Destructor.
Tuple2< label, scalar > band() const
Calculate bandwidth and profile of addressing.