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:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user