Added correction to segment number index for RSEG

Added correction to segment number index
for writing of RSEG data to eclipse compatible
restart file. AggregateMSWData.cpp
This commit is contained in:
Jostein Alvestad 2019-03-27 16:59:35 +01:00
parent ba1f9e882b
commit 0a730d949f

View File

@ -570,7 +570,7 @@ namespace {
// set the elements of the rSeg array
const auto& outSeg = welSegSet[segIndex].outletSegment();
const auto& ind_ofs = welSegSet.segmentNumberToIndex(outSeg);
const auto iS = segIndex*noElmSeg;
auto iS = (segNumber-1)*noElmSeg;
rSeg[iS + 0] = units.from_si(M::length, (welSegSet[segIndex].totalLength() - welSegSet[ind_ofs].totalLength()));
rSeg[iS + 1] = units.from_si(M::length, (welSegSet[segIndex].depth() - welSegSet[ind_ofs].depth()));
rSeg[iS + 2] = units.from_si(M::length, (welSegSet[segIndex].internalDiameter()));