mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure we only loop over active grids local cells when calculating visibility
This commit is contained in:
committed by
Magne Sjaastad
parent
db20065e1e
commit
036ed8b70e
@@ -112,14 +112,16 @@ size_t RigActiveCellGrid::totalActiveCellCount() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RigActiveCellGrid::activeReservoirCellIndices() const
|
||||
std::vector<size_t> RigActiveCellGrid::activeLocalCellIndices() const
|
||||
{
|
||||
std::vector<size_t> indices;
|
||||
indices.reserve( m_nativeCells.size() );
|
||||
const auto maxCellIdx = cellCount();
|
||||
|
||||
for ( const auto& [index, cell] : m_nativeCells )
|
||||
{
|
||||
indices.emplace_back( index );
|
||||
// only add cells indexes that belongs to our grid, not subgrids
|
||||
if ( index < maxCellIdx ) indices.emplace_back( index );
|
||||
}
|
||||
|
||||
return indices;
|
||||
|
||||
Reference in New Issue
Block a user