mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add activeCellReservoirIndices
All global reservoir cell indices for active cells can now be accessed from RigActiveCellInfo. This can make the extraction of data much easier and faster.
This commit is contained in:
@@ -81,6 +81,14 @@ void RigActiveCellInfo::setCellResultIndex( size_t reservoirCellIndex, size_t re
|
||||
m_cellIndexToResultIndex[reservoirCellIndex] = reservoirCellResultIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RigActiveCellInfo::activeReservoirCellIndices() const
|
||||
{
|
||||
return m_activeCellIndices;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -110,6 +118,14 @@ void RigActiveCellInfo::computeDerivedData()
|
||||
{
|
||||
m_reservoirActiveCellCount += m_perGridActiveCellInfo[i].activeCellCount();
|
||||
}
|
||||
|
||||
for ( size_t i = 0; i < m_cellIndexToResultIndex.size(); i++ )
|
||||
{
|
||||
if ( m_cellIndexToResultIndex[i] != cvf::UNDEFINED_SIZE_T )
|
||||
{
|
||||
m_activeCellIndices.push_back( i );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user