mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support for loading only active cell geometry (#11624)
* Only load active cells for main grid, skip LGRs for now * Handle wells with inactive cells * Validate mapaxes transform before using it. * Add log message * Additional guarding when trying to find the geometrical location of a simulation cell * Add extra safeguarding for init/restart file access in opm common. Only support unified restart files.
This commit is contained in:
@@ -132,6 +132,11 @@ size_t RifReaderEclipseWell::localGridCellIndexFromErtConnection( const RigGridB
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
if ( ( cellI < 0 ) || ( cellJ < 0 ) )
|
||||
{
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
return grid->cellIndexFromIJK( cellI, cellJ, cellK );
|
||||
}
|
||||
|
||||
@@ -158,6 +163,17 @@ RigWellResultPoint RifReaderEclipseWell::createWellResultPoint( const RigEclipse
|
||||
|
||||
RigWellResultPoint resultPoint;
|
||||
|
||||
if ( ( grid->cellCount() == 0 ) || ( gridCellIndex > grid->cellCount() - 1 ) )
|
||||
{
|
||||
return resultPoint;
|
||||
}
|
||||
|
||||
const RigCell& c = grid->cell( gridCellIndex );
|
||||
if ( c.isInvalid() )
|
||||
{
|
||||
return resultPoint;
|
||||
}
|
||||
|
||||
if ( gridCellIndex != cvf::UNDEFINED_SIZE_T )
|
||||
{
|
||||
int branchId = -1, segmentId = -1, outletBranchId = -1, outletSegmentId = -1;
|
||||
@@ -857,11 +873,17 @@ void RifReaderEclipseWell::readWellCells( RifEclipseRestartDataAccess* restartDa
|
||||
{
|
||||
prevResPoint = wellResFrame.wellHead();
|
||||
}
|
||||
else
|
||||
else if ( rpIdx > 0 )
|
||||
{
|
||||
prevResPoint = wellResultBranch.branchResultPoints()[rpIdx - 1];
|
||||
}
|
||||
|
||||
if ( !prevResPoint.isCell() )
|
||||
{
|
||||
// When importing only active cells, this situation can occur if the well head is a inactive cell.
|
||||
continue;
|
||||
}
|
||||
|
||||
cvf::Vec3d lastConnectionPos = grids[prevResPoint.gridIndex()]->cell( prevResPoint.cellIndex() ).center();
|
||||
|
||||
SegmentPositionContribution
|
||||
|
||||
Reference in New Issue
Block a user