Skip to content

decompositionMethod calcCellCells with weighting looks odd

In calcCellCells, the weighting per cell is done by using the face area of some attached face. Eg,

// For internal faces is just offsetted owner and neighbour
for (label facei = 0; facei < mesh.nInternalFaces(); ++facei)
{
    const label own = agglom[faceOwner[facei]];
    const label nei = agglom[faceNeighbour[facei]];

    const label ownIndex = offsets[own] + nFacesPerCell[own]++;
    const label neiIndex = offsets[nei] + nFacesPerCell[nei]++;

    m[ownIndex] = globalAgglom.toGlobal(nei);
    w[ownIndex] = mag(mesh.faceAreas()[facei]);
    m[neiIndex] = globalAgglom.toGlobal(own);
    w[ownIndex] = mag(mesh.faceAreas()[facei]);
}

The fact that w[ownIndex] is specified twice (not w[neiIndex]) looks weird, but seems to have been in there forever. @Mattijs

Edited by Mark OLESEN