From 61db98ef04c8e2d51ca8f6542c0404a3c13d22fb Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 16 Oct 2019 11:11:01 +0200 Subject: [PATCH] #4874 Dual Porosity : Missing active cells in some cases --- .../FileInterface/RifActiveCellsReader.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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 );