mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve draw performance for active cell grid
* Show timing for geoBuilder.generateSurface() * Check state of element vector result before geometry is created * Improve performance for isFaceVisible Avoid calling costly function cell() when possible Remove check on fault geometry as this does not affect the visualization * Performance: Avoid traversal of all cells when computing visibility When we have an active cell grid, we can skip checking for inactive and invalid state. Use the list of active grid cells when looping through cells.
This commit is contained in:
@@ -109,6 +109,22 @@ size_t RigActiveCellGrid::totalActiveCellCount() const
|
||||
return m_totalActiveCellCount;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RigActiveCellGrid::activeReservoirCellIndices() const
|
||||
{
|
||||
std::vector<size_t> indices;
|
||||
indices.reserve( m_nativeCells.size() );
|
||||
|
||||
for ( const auto& [index, cell] : m_nativeCells )
|
||||
{
|
||||
indices.emplace_back( index );
|
||||
}
|
||||
|
||||
return indices;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user