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 ); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp index 10954c49d7..fc6c3308ed 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -306,6 +306,15 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch { m_porosityModel = m_porosityModelUiField; m_resultVariableUiField = resultVariable(); + + RimEclipseView* eclipseView = nullptr; + this->firstAncestorOrThisOfType( eclipseView ); + if ( eclipseView ) + { + // Active cells can be different between matrix and fracture, make sure all geometry is recreated + eclipseView->scheduleReservoirGridGeometryRegen(); + } + loadDataAndUpdate(); }