From ec825145dffa9fb53227f311632d58f6e4182af9 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 7 Mar 2013 13:13:34 +0100 Subject: [PATCH] Fixed invalid active global index p4#: 20816 --- ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index a410e56d20..838921b441 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -436,6 +436,7 @@ bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, //-------------------------------------------------------------------------------------------------- /// +/// See also RigStatistics::computeActiveCellUnion() //-------------------------------------------------------------------------------------------------- bool RifReaderEclipseOutput::readActiveCellInfo() { @@ -474,6 +475,8 @@ bool RifReaderEclipseOutput::readActiveCellInfo() activeCellInfo->setGridCount(actnumKeywordCount); size_t cellIdx = 0; + size_t globalActiveMatrixIndex = 0; + size_t globalActiveFractureIndex = 0; for (size_t gridIdx = 0; gridIdx < static_cast(actnumKeywordCount); gridIdx++) { size_t activeMatrixIndex = 0; @@ -485,12 +488,14 @@ bool RifReaderEclipseOutput::readActiveCellInfo() { if (actnumValues[i] == 1 || actnumValues[i] == 3) { - activeCellInfo->setActiveIndexInMatrixModel(cellIdx, activeMatrixIndex++); + activeCellInfo->setActiveIndexInMatrixModel(cellIdx, globalActiveMatrixIndex++); + activeMatrixIndex++; } if (actnumValues[i] == 2 || actnumValues[i] == 3) { - activeCellInfo->setActiveIndexInFractureModel(cellIdx, activeFractureIndex++); + activeCellInfo->setActiveIndexInFractureModel(cellIdx, globalActiveFractureIndex++); + activeFractureIndex++; } cellIdx++;