mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Clamp time step index
This commit is contained in:
parent
ec239f9643
commit
d132accd1d
@ -52,7 +52,8 @@ private:
|
||||
template <typename StatisticsAccumulator>
|
||||
void traverseCells( StatisticsAccumulator& accumulator, size_t timeStepIndex )
|
||||
{
|
||||
const std::vector<double>& values = m_caseData->cellScalarResults( m_resultAddress, timeStepIndex );
|
||||
size_t clampedTimeStepIndex = std::min( timeStepIndex, m_caseData->timeStepCount( m_resultAddress ) - 1 );
|
||||
const std::vector<double>& values = m_caseData->cellScalarResults( m_resultAddress, clampedTimeStepIndex );
|
||||
|
||||
if ( values.empty() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user