Go to the documentation of this file.
45 const label nFineCells = fineAddressing.
size();
56 nNbrs[upperAddr[facei]]++;
61 nNbrs[lowerAddr[facei]]++;
65 cellCellOffsets.
setSize(nFineCells + 1);
66 cellCells.
setSize(2*nFineFaces);
67 faceWeights.
setSize(2*nFineFaces);
70 cellCellOffsets[0] = 0;
73 cellCellOffsets[celli+1] = cellCellOffsets[celli] + nNbrs[celli];
81 label own = upperAddr[facei];
82 label nei = lowerAddr[facei];
84 label l1 = cellCellOffsets[own] + nNbrs[own]++;
85 label l2 = cellCellOffsets[nei] + nNbrs[nei]++;
90 faceWeights[l1] = magSi[facei];
91 faceWeights[l2] = magSi[facei];
107 const label nFineCells = fineAddressing.
size();
117 makeCompactCellFaceAddressingAndFaceWeights
131 options[3] = fvMesh_.nGeometricD();
141 cellCellOffsets.begin(),
142 const_cast<scalar*
>(V.begin()),
143 const_cast<scalar*
>(magSb.begin()),
155 label nNewCoarseCells = 0;
157 bool ok = checkRestriction
168 nCoarseCells = nNewCoarseCells;
169 finalAgglom.
transfer(newRestrictAddr);
The class contains the addressing required by the lduMatrix: upper, lower and losort.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void MGridGen(int, int *, Foam::scalar *, Foam::scalar *, int *, Foam::scalar *, int, int, int *, int *, int *, int *)
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
Field< label > labelField
Specialisation of Field<T> for label.
tmp< labelField > agglomerate(label &nCoarseCells, const label minSize, const label maxSize, const lduAddressing &fineAddressing, const scalarField &V, const scalarField &magSf, const scalarField &magSb)
Calculate and return agglomeration.
void makeCompactCellFaceAddressingAndFaceWeights(const lduAddressing &fineAddressing, List< idxtype > &cellCells, List< idxtype > &cellCellOffsets, const scalarField &magSi, List< scalar > &faceWeights)
Construct the CSR format addressing.
void setSize(const label)
Reset size of List.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
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 size() const
Return the number of elements in the UList.