mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#1266 If not computed, compute staticWellCellPath when needed
This commit is contained in:
parent
da416409aa
commit
68ff093c61
@ -84,11 +84,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
|
||||
RigSingleWellResultsData* wellResults = well->wellResults();
|
||||
|
||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0)
|
||||
{
|
||||
wellResults->computeStaticWellCellPath();
|
||||
}
|
||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0) return;
|
||||
if (wellResults->staticWellCells().m_wellResultBranches.size() == 0) return;
|
||||
|
||||
if (!wellResults->hasWellResult(frameIndex)) return;
|
||||
|
||||
|
@ -243,7 +243,7 @@ bool RimEclipseWell::intersectsStaticWellCellsFilteredCells() const
|
||||
if (this->wellResults() == nullptr) return false;
|
||||
|
||||
// NOTE: Read out static well cells, union of well cells across all time steps
|
||||
const RigWellResultFrame& wrsf = this->wellResults()->m_staticWellCells;
|
||||
const RigWellResultFrame& wrsf = this->wellResults()->staticWellCells();
|
||||
|
||||
// NOTE: Use first time step for visibility evaluation
|
||||
size_t frameIndex = 0;
|
||||
|
@ -93,13 +93,7 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellF
|
||||
|
||||
if (timeStepIndex < 0)
|
||||
{
|
||||
// Make sure we have computed the static representation of the well
|
||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0)
|
||||
{
|
||||
wellResults->computeStaticWellCellPath();
|
||||
}
|
||||
|
||||
wellFramePtr = &wellResults->m_staticWellCells;
|
||||
wellFramePtr = &wellResults->staticWellCells();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -278,6 +278,20 @@ RigWellResultFrame::WellProductionType RigSingleWellResultsData::wellProductionT
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellResultFrame& RigSingleWellResultsData::staticWellCells() const
|
||||
{
|
||||
// Make sure we have computed the static representation of the well
|
||||
if (m_staticWellCells.m_wellResultBranches.size() == 0)
|
||||
{
|
||||
computeStaticWellCellPath();
|
||||
}
|
||||
|
||||
return m_staticWellCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -149,7 +149,8 @@ public:
|
||||
bool isOpen(size_t resultTimeStepIndex) const;
|
||||
RigWellResultFrame::WellProductionType wellProductionType(size_t resultTimeStepIndex) const;
|
||||
|
||||
void computeStaticWellCellPath() const ;
|
||||
const RigWellResultFrame& staticWellCells() const;
|
||||
|
||||
void computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector<QDateTime>& resultTimes);
|
||||
|
||||
public: // Todo: Clean up this regarding public members and constness etc.
|
||||
@ -159,6 +160,9 @@ public: // Todo: Clean up this regarding public members and constness etc.
|
||||
std::vector< RigWellResultFrame > m_wellCellsTimeSteps;
|
||||
mutable RigWellResultFrame m_staticWellCells;
|
||||
|
||||
private:
|
||||
void computeStaticWellCellPath() const;
|
||||
|
||||
private:
|
||||
bool m_isMultiSegmentWell;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user