32 void Foam::lduAddressing::calcLosort()
const 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]]++;
73 losortPtr_ =
new labelList(nbr.size(), -1);
80 forAll(cellNbrFaces, celli)
82 const labelList& curNbr = cellNbrFaces[celli];
86 lst[lstI] = curNbr[curNbrI];
93 void Foam::lduAddressing::calcOwnerStart()
const 98 <<
"owner start already calculated" 115 label curOwn = own[facei];
117 if (curOwn > nOwnStart)
121 ownStart[i++] = facei;
130 void Foam::lduAddressing::calcLosortStart()
const 135 <<
"losort start already calculated" 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_;
230 for (
label i=startLabel; i<endLabel; i++)
232 if (neighbour[i] == nbr)
241 <<
"neighbour " << nbr <<
" not found for owner " << own <<
". " 242 <<
"Problem with addressing" 258 label own = owner[facei];
259 label nei = neighbour[facei];
263 cellBandwidth[nei] =
max(cellBandwidth[nei], diff);
266 label bandwidth =
max(cellBandwidth);
269 scalar profile = 0.0;
270 forAll(cellBandwidth, celli)
272 profile += 1.0*cellBandwidth[celli];
List< labelList > labelListList
A List of labelList.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label triIndex(const label a, const label b) const
Return off-diagonal index given owner and neighbour label.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 2-tuple for storing two objects of different types.
const labelUList & losortStartAddr() const
Return losort start addressing.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
UList< label > labelUList
virtual const labelUList & upperAddr() const =0
Return upper addressing.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Tuple2< label, scalar > band() const
Calculate bandwidth and profile of addressing.
virtual ~lduAddressing()
Destructor.
Template functions to aid in the implementation of demand driven data.
const labelUList & losortAddr() const
Return losort addressing.
void deleteDemandDrivenData(DataPtr &dataPtr)
const labelUList & ownerStartAddr() const
Return owner start addressing.
label size() const
Return number of equations.