renumb->alloc(nbCellsInSplitMesh1D,1);
const mcIdType * renumbP(renumb->begin());
- mcIdType i, first=cSplitPtr[1];
+ mcIdType i, renumOffset = 0, first=cSplitPtr[1];
// Follow 1D line backward as long as it is connected:
- for (i=nbCellsInSplitMesh1D-1; cSplitPtr[ciSplitPtr[i]+2] == first; i--)
+ for (i=nbCellsInSplitMesh1D-1; cSplitPtr[ciSplitPtr[i]+2] == first; i--,renumOffset++)
first=cSplitPtr[ciSplitPtr[i]+1];
if (i < nbCellsInSplitMesh1D-1)
{
// Build circular permutation to shift consecutive edges together
- renumb->iota(i+1);
+ renumb->iota(renumOffset);
renumb->applyModulus(nbCellsInSplitMesh1D);
splitMesh1D->renumberCells(renumbP, false);