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:
jonjenssen
2024-08-28 18:22:57 +02:00
committed by GitHub
parent 27c46a65fd
commit 0572069511
24 changed files with 670 additions and 78 deletions

View File

@@ -208,7 +208,7 @@ void RigGridBase::cellMinMaxCordinates( size_t cellIndex, cvf::Vec3d* minCoordin
//--------------------------------------------------------------------------------------------------
bool RigGridBase::ijkFromCellIndex( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const
{
CVF_TIGHT_ASSERT( cellIndex < cellCount() );
CVF_TIGHT_ASSERT( cellIndex < RigGridBase::cellCount() );
size_t index = cellIndex;
@@ -413,6 +413,27 @@ double RigGridBase::characteristicIJCellSize() const
return characteristicCellSize;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigGridBase::characteristicCellSizes( double* iSize, double* jSize, double* kSize ) const
{
CVF_ASSERT( iSize && jSize && kSize );
if ( !hasValidCharacteristicCellSizes() )
{
std::vector<size_t> reservoirCellIndices;
reservoirCellIndices.resize( cellCount() );
std::iota( reservoirCellIndices.begin(), reservoirCellIndices.end(), 0 );
computeCharacteristicCellSize( reservoirCellIndices );
}
*iSize = m_characteristicCellSizeI;
*jSize = m_characteristicCellSizeJ;
*kSize = m_characteristicCellSizeK;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------