mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4355 Dual Porosity : Guard data access for fracture data values
This commit is contained in:
parent
60153b20ec
commit
efc7cca5c7
@ -2302,6 +2302,7 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(RiaDefines:
|
||||
actCellInfo->gridActiveCellCounts(i, matrixActiveCellCount);
|
||||
fracActCellInfo->gridActiveCellCounts(i, fractureActiveCellCount);
|
||||
|
||||
|
||||
if (matrixOrFracture == RiaDefines::MATRIX_MODEL)
|
||||
{
|
||||
destinationResultValues->insert(destinationResultValues->end(),
|
||||
@ -2310,9 +2311,16 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(RiaDefines:
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((matrixActiveCellCount + fractureActiveCellCount) > sourceResultValues.size())
|
||||
{
|
||||
// Special handling of the situation where we only have data for one fracture mode
|
||||
matrixActiveCellCount = 0;
|
||||
}
|
||||
|
||||
destinationResultValues->insert(destinationResultValues->end(),
|
||||
sourceResultValues.begin() + sourceStartPosition + matrixActiveCellCount,
|
||||
sourceResultValues.begin() + sourceStartPosition + matrixActiveCellCount + fractureActiveCellCount);
|
||||
sourceResultValues.begin() + sourceStartPosition + matrixActiveCellCount +
|
||||
fractureActiveCellCount);
|
||||
}
|
||||
|
||||
sourceStartPosition += (matrixActiveCellCount + fractureActiveCellCount);
|
||||
|
Loading…
Reference in New Issue
Block a user