mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use hasWellResult instead of firstResultTimeStep
This commit is contained in:
parent
8ee7229f60
commit
9493a1dfc0
@ -205,7 +205,7 @@ void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
|
||||
RigSingleWellResultsData* wRes = m_rimWell->wellResults();
|
||||
if (wRes == NULL) return;
|
||||
|
||||
if (frameIndex < wRes->firstResultTimeStep()) return; // Or reset colors or something
|
||||
if (!wRes->hasWellResult(frameIndex)) return; // Or reset colors or something
|
||||
|
||||
const double closed = -0.1, producing = 1.5, water = 2.5, hcInjection = 3.5; // Closed set to -0.1 instead of 0.5 to workaround bug in the scalar mapper.
|
||||
|
||||
|
@ -95,20 +95,6 @@ bool RigSingleWellResultsData::hasWellResult(size_t resultTimeStepIndex) const
|
||||
return wellTimeStepIndex != cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigSingleWellResultsData::firstResultTimeStep() const
|
||||
{
|
||||
size_t i = 0;
|
||||
for(i = 0; i < m_resultTimeStepIndexToWellTimeStepIndex.size(); ++i)
|
||||
{
|
||||
if (m_resultTimeStepIndexToWellTimeStepIndex[i] != cvf::UNDEFINED_SIZE_T) return i;
|
||||
}
|
||||
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
bool operator== (const RigWellResultPoint& p1, const RigWellResultPoint& p2)
|
||||
{
|
||||
return
|
||||
|
@ -135,7 +135,6 @@ public:
|
||||
bool isMultiSegmentWell() const;
|
||||
|
||||
bool hasWellResult(size_t resultTimeStepIndex) const;
|
||||
size_t firstResultTimeStep() const;
|
||||
|
||||
const RigWellResultFrame& wellResultFrame(size_t resultTimeStepIndex) const;
|
||||
|
||||
|
@ -729,7 +729,7 @@ QString RiuResultTextBuilder::wellResultText()
|
||||
{
|
||||
RigSingleWellResultsData* singleWellResultData = wellResults.at(i);
|
||||
|
||||
if (m_timeStepIndex < singleWellResultData->firstResultTimeStep())
|
||||
if (!singleWellResultData->hasWellResult(m_timeStepIndex))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user