mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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();
|
RigSingleWellResultsData* wellResults = well->wellResults();
|
||||||
|
|
||||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0)
|
if (wellResults->staticWellCells().m_wellResultBranches.size() == 0) return;
|
||||||
{
|
|
||||||
wellResults->computeStaticWellCellPath();
|
|
||||||
}
|
|
||||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0) return;
|
|
||||||
|
|
||||||
if (!wellResults->hasWellResult(frameIndex)) return;
|
if (!wellResults->hasWellResult(frameIndex)) return;
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ bool RimEclipseWell::intersectsStaticWellCellsFilteredCells() const
|
|||||||
if (this->wellResults() == nullptr) return false;
|
if (this->wellResults() == nullptr) return false;
|
||||||
|
|
||||||
// NOTE: Read out static well cells, union of well cells across all time steps
|
// 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
|
// NOTE: Use first time step for visibility evaluation
|
||||||
size_t frameIndex = 0;
|
size_t frameIndex = 0;
|
||||||
|
@ -93,13 +93,7 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellF
|
|||||||
|
|
||||||
if (timeStepIndex < 0)
|
if (timeStepIndex < 0)
|
||||||
{
|
{
|
||||||
// Make sure we have computed the static representation of the well
|
wellFramePtr = &wellResults->staticWellCells();
|
||||||
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0)
|
|
||||||
{
|
|
||||||
wellResults->computeStaticWellCellPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
wellFramePtr = &wellResults->m_staticWellCells;
|
|
||||||
}
|
}
|
||||||
else
|
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;
|
bool isOpen(size_t resultTimeStepIndex) const;
|
||||||
RigWellResultFrame::WellProductionType wellProductionType(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);
|
void computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector<QDateTime>& resultTimes);
|
||||||
|
|
||||||
public: // Todo: Clean up this regarding public members and constness etc.
|
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;
|
std::vector< RigWellResultFrame > m_wellCellsTimeSteps;
|
||||||
mutable RigWellResultFrame m_staticWellCells;
|
mutable RigWellResultFrame m_staticWellCells;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void computeStaticWellCellPath() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_isMultiSegmentWell;
|
bool m_isMultiSegmentWell;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user