diff --git a/ApplicationCode/FileInterface/RifActiveCellsReader.cpp b/ApplicationCode/FileInterface/RifActiveCellsReader.cpp index 25c48c3902..7aeeb9d5cb 100644 --- a/ApplicationCode/FileInterface/RifActiveCellsReader.cpp +++ b/ApplicationCode/FileInterface/RifActiveCellsReader.cpp @@ -89,19 +89,22 @@ std::vector> RifActiveCellsReader::activeCellsFromPorvKeyword( if ( porvValues[poreValueIndex] > 0.0 ) { - if ( !dualPorosity || poreValueIndex < porvValues.size() / 2 ) + if ( dualPorosity ) { - activeCellsOneGrid[indexToCell] = CELL_ACTIVE_MATRIX; + if ( poreValueIndex < activeCellCount ) + { + activeCellsOneGrid[indexToCell] += CELL_ACTIVE_MATRIX; + } + else + { + activeCellsOneGrid[indexToCell] += CELL_ACTIVE_FRACTURE; + } } else { - activeCellsOneGrid[indexToCell] += CELL_ACTIVE_FRACTURE; + activeCellsOneGrid[indexToCell] = CELL_ACTIVE_MATRIX; } } - else - { - activeCellsOneGrid[indexToCell] = 0; - } } activeCellsAllGrids.push_back( activeCellsOneGrid );