#1996 Rename RigSingleWellResultsData -> RigSimWellData

This commit is contained in:
Rebecca Cox
2017-10-13 13:44:53 +02:00
parent e3ac94a940
commit 44be1bfd6b
39 changed files with 203 additions and 217 deletions

View File

@@ -20,7 +20,7 @@
#include "RigCell.h"
#include "RigMainGrid.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimEclipseView.h"
#include "RimEllipseFractureTemplate.h"

View File

@@ -26,7 +26,7 @@
#include "RigEclipseCaseData.h"
#include "RigFlowDiagResults.h"
#include "RigMainGrid.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
@@ -128,12 +128,12 @@ std::vector<QString> RimFlowDiagSolution::tracerNames() const
if (eclCase)
{
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = eclCase->eclipseCaseData()->wellResults();
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
for (size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx)
{
tracerNameSet.push_back(wellResults[wIdx]->m_wellName);
tracerNameSet.push_back(addCrossFlowEnding(wellResults[wIdx]->m_wellName));
tracerNameSet.push_back(simWellData[wIdx]->m_wellName);
tracerNameSet.push_back(addCrossFlowEnding(simWellData[wIdx]->m_wellName));
}
}
@@ -168,20 +168,20 @@ std::map<std::string, std::vector<int> > RimFlowDiagSolution::allTracerActiveCel
if ( eclCase )
{
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = eclCase->eclipseCaseData()->wellResults();
RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid();
RigActiveCellInfo* activeCellInfo = eclCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL); //Todo: Must come from the results definition
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
if (!wellResults[wIdx]->hasWellResult(timeStepIndex) ) continue;
const RigWellResultFrame& wellResFrame = wellResults[wIdx]->wellResultFrame(timeStepIndex);
if (!simWellData[wIdx]->hasWellResult(timeStepIndex) ) continue;
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame(timeStepIndex);
bool isInjectorWell = ( wellResFrame.m_productionType != RigWellResultFrame::PRODUCER
&& wellResFrame.m_productionType != RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE);
std::string wellName = wellResults[wIdx]->m_wellName.toStdString();
std::string wellNameXf = addCrossFlowEnding(wellResults[wIdx]->m_wellName).toStdString();
std::string wellName = simWellData[wIdx]->m_wellName.toStdString();
std::string wellNameXf = addCrossFlowEnding(simWellData[wIdx]->m_wellName).toStdString();
std::vector<int>& tracerCells = tracersWithCells[wellName];
std::vector<int>& tracerCellsCrossFlow = tracersWithCells[wellNameXf];
@@ -228,16 +228,16 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusOverall(c
TracerStatusType tracerStatus = UNDEFINED;
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = eclCase->eclipseCaseData()->wellResults();
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
QString wellName = removeCrossFlowEnding(tracerName);
if ( wellResults[wIdx]->m_wellName != wellName ) continue;
if ( simWellData[wIdx]->m_wellName != wellName ) continue;
tracerStatus = CLOSED;
for ( const RigWellResultFrame& wellResFrame : wellResults[wIdx]->m_wellCellsTimeSteps )
for ( const RigWellResultFrame& wellResFrame : simWellData[wIdx]->m_wellCellsTimeSteps )
{
if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR
|| wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR
@@ -274,16 +274,16 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeSte
RimEclipseResultCase* eclCase;
this->firstAncestorOrThisOfTypeAsserted(eclCase);
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = eclCase->eclipseCaseData()->wellResults();
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
QString wellName = removeCrossFlowEnding(tracerName);
if ( wellResults[wIdx]->m_wellName != wellName ) continue;
if (!wellResults[wIdx]->hasWellResult(timeStepIndex)) return CLOSED;
if ( simWellData[wIdx]->m_wellName != wellName ) continue;
if (!simWellData[wIdx]->hasWellResult(timeStepIndex)) return CLOSED;
const RigWellResultFrame& wellResFrame = wellResults[wIdx]->wellResultFrame(timeStepIndex);
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame(timeStepIndex);
if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR
|| wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR

View File

@@ -24,7 +24,7 @@
#include "RimEclipseWellCollection.h"
#include "RimWellAllocationPlot.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RigTofAccumulatedPhaseFractionsCalculator.h"
#include "RimWellLogPlot.h"

View File

@@ -23,7 +23,7 @@
#include "RimEclipseView.h"
#include "RimEclipseWellCollection.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"

View File

@@ -26,7 +26,7 @@
#include "RigFlowDiagResults.h"
#include "RigSimulationWellCenterLineCalculator.h"
#include "RigSimulationWellCoordsAndMD.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
@@ -135,7 +135,7 @@ void RimWellAllocationPlot::setFromSimulationWell(RimSimWellInView* simWell)
simWell->firstAncestorOrThisOfType(eclCase);
m_case = eclCase;
m_wellName = simWell->wellResults()->m_wellName;
m_wellName = simWell->simWellData()->m_wellName;
m_timeStep = eclView->currentTimeStep();
// Use the active flow diag solutions, or the first one as default
@@ -187,9 +187,9 @@ void RimWellAllocationPlot::updateFromWell()
if (!m_case) return;
const RigSingleWellResultsData* wellResults = m_case->eclipseCaseData()->findWellResult(m_wellName);
const RigSimWellData* simWellData = m_case->eclipseCaseData()->findSimWellData(m_wellName);
if (!wellResults) return;
if (!simWellData) return;
// Set up the Accumulated Well Flow Calculator
@@ -197,14 +197,14 @@ void RimWellAllocationPlot::updateFromWell()
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(m_case->eclipseCaseData(),
wellResults,
simWellData,
m_timeStep,
true,
true,
pipeBranchesCLCoords,
pipeBranchesCellIds);
std::map<QString, const std::vector<double>* > tracerFractionCellValues = findRelevantTracerCellFractions(wellResults);
std::map<QString, const std::vector<double>* > tracerFractionCellValues = findRelevantTracerCellFractions(simWellData);
std::unique_ptr< RigAccWellFlowCalculator > wfCalculator;
@@ -213,8 +213,8 @@ void RimWellAllocationPlot::updateFromWell()
if ( tracerFractionCellValues.size() )
{
bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|| wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
bool isProducer = ( simWellData->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|| simWellData->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL));
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
pipeBranchesCellIds,
@@ -327,15 +327,15 @@ void RimWellAllocationPlot::updateFromWell()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findRelevantTracerCellFractions(const RigSingleWellResultsData* wellResults)
std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findRelevantTracerCellFractions(const RigSimWellData* simWellData)
{
std::map<QString, const std::vector<double> *> tracerCellFractionValues;
if ( m_flowDiagSolution && wellResults->hasWellResult(m_timeStep) )
if ( m_flowDiagSolution && simWellData->hasWellResult(m_timeStep) )
{
RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED;
const RigWellResultFrame::WellProductionType prodType = wellResults->wellProductionType(m_timeStep);
const RigWellResultFrame::WellProductionType prodType = simWellData->wellProductionType(m_timeStep);
if ( prodType == RigWellResultFrame::PRODUCER
|| prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE )
{
@@ -465,13 +465,13 @@ QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName
if (eclipseResultCase)
{
const RigSingleWellResultsData* wellResults = eclipseResultCase->eclipseCaseData()->findWellResult(wellName);
const RigSimWellData* simWellData = eclipseResultCase->eclipseCaseData()->findSimWellData(wellName);
if (wellResults)
if (simWellData)
{
if (wellResults->hasWellResult(timeStep))
if (simWellData->hasWellResult(timeStep))
{
const RigWellResultFrame& wellResultFrame = wellResults->wellResultFrame(timeStep);
const RigWellResultFrame& wellResultFrame = simWellData->wellResultFrame(timeStep);
RigWellResultFrame::WellProductionType prodType = wellResultFrame.m_productionType;
@@ -718,11 +718,11 @@ std::set<QString> RimWellAllocationPlot::findSortedWellNames()
std::set<QString> sortedWellNames;
if ( m_case && m_case->eclipseCaseData() )
{
const cvf::Collection<RigSingleWellResultsData>& wellRes = m_case->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = m_case->eclipseCaseData()->wellResults();
for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
sortedWellNames.insert(wellRes[wIdx]->m_wellName);
sortedWellNames.insert(simWellData[wIdx]->m_wellName);
}
}

View File

@@ -27,7 +27,7 @@
#include <QPointer>
class RigSingleWellResultsData;
class RigSimWellData;
class RimEclipseResultCase;
class RimFlowDiagSolution;
class RimSimWellInView;
@@ -100,7 +100,7 @@ protected:
private:
void updateFromWell();
std::map<QString, const std::vector<double> *> findRelevantTracerCellFractions(const RigSingleWellResultsData* wellResults);
std::map<QString, const std::vector<double> *> findRelevantTracerCellFractions(const RigSimWellData* simWellData);
void updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack);

View File

@@ -29,18 +29,7 @@
#include <QDate>
#include <QMetaType>
class RigSingleWellResultsData;
class RimEclipseResultCase;
class RimFlowDiagSolution;
class RimTofAccumulatedPhaseFractionsPlot;
class RimTotalWellAllocationPlot;
class RimWellLogFile;
class RimWellLogFileChannel;
class RimWellLogPlot;
class RimWellLogTrack;
class RiuWellRftPlot;
//==================================================================================================
///

View File

@@ -24,7 +24,7 @@
#include "RifReaderEclipseRft.h"
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RigWellPath.h"
#include "RimEclipseCase.h"
#include "RimEclipseCaseCollection.h"

View File

@@ -33,17 +33,12 @@
#include <set>
#include <map>
class RigSingleWellResultsData;
class RigWellPath;
class RimEclipseCase;
class RimEclipseResultCase;
class RimFlowDiagSolution;
class RimTofAccumulatedPhaseFractionsPlot;
class RimTotalWellAllocationPlot;
class RimWellLogCurve;
class RimWellLogFileChannel;
class RimWellLogPlot;
class RimWellLogTrack;
class RimWellPath;
class RiuWellRftPlot;

View File

@@ -28,7 +28,7 @@
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
#include "RigMainGrid.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimCaseCollection.h"
#include "RimCellEdgeColors.h"
@@ -162,15 +162,15 @@ cvf::Color3f RimEclipseCase::defaultWellColor(const QString& wellName)
cvf::Color3ubArray wellColors = colorTable.color3ubArray();
cvf::Color3ubArray interpolatedWellColors = wellColors;
const cvf::Collection<RigSingleWellResultsData>& wellResults = this->eclipseCaseData()->wellResults();
if ( wellResults.size() > 1 )
const cvf::Collection<RigSimWellData>& simWellData = this->eclipseCaseData()->wellResults();
if ( simWellData.size() > 1 )
{
interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, wellResults.size());
interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, simWellData.size());
}
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
m_wellToColorMap[wellResults[wIdx]->m_wellName] = cvf::Color3f::BLACK;
m_wellToColorMap[simWellData[wIdx]->m_wellName] = cvf::Color3f::BLACK;
}
size_t wIdx = 0;

View File

@@ -24,7 +24,7 @@
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimCaseCollection.h"
#include "RimEclipseCellColors.h"
@@ -511,13 +511,13 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang
// Propagate well info to statistics case
if (sourceResultCase->eclipseCaseData())
{
const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults = sourceResultCase->eclipseCaseData()->wellResults();
setWellResultsAndUpdateViews(sourceCaseWellResults);
const cvf::Collection<RigSimWellData>& sourceCaseSimWellData = sourceResultCase->eclipseCaseData()->wellResults();
setWellResultsAndUpdateViews(sourceCaseSimWellData);
}
}
else
{
cvf::Collection<RigSingleWellResultsData> sourceCaseWellResults;
cvf::Collection<RigSimWellData> sourceCaseWellResults;
setWellResultsAndUpdateViews(sourceCaseWellResults);
}
}
@@ -526,9 +526,9 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults)
void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection<RigSimWellData>& sourceCaseSimWellData)
{
this->eclipseCaseData()->setWellResults(sourceCaseWellResults);
this->eclipseCaseData()->setSimWellData(sourceCaseSimWellData);
caf::ProgressInfo progInfo(reservoirViews().size() + 1, "Updating Well Data for Views");

View File

@@ -35,7 +35,7 @@ class RimIdenticalGridCaseGroup;
class RimEclipseResultDefinition;
class RimEclipseStatisticsCaseCollection;
class RigMainGrid;
class RigSingleWellResultsData;
class RigSimWellData;
//==================================================================================================
@@ -91,7 +91,7 @@ private:
void updatePercentileUiVisibility();
void setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults);
void setWellResultsAndUpdateViews(const cvf::Collection<RigSimWellData>& sourceCaseSimWellData);
// Pdm system overrides
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) ;

View File

@@ -31,7 +31,7 @@
#include "RigMainGrid.h"
#include "RigResultAccessor.h"
#include "RigResultAccessorFactory.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "Rim3dOverlayInfoConfig.h"
#include "RimCellEdgeColors.h"
@@ -1192,7 +1192,7 @@ void RimEclipseView::syncronizeWellsWithResults()
{
if (!(m_eclipseCase && m_eclipseCase->eclipseCaseData()) ) return;
cvf::Collection<RigSingleWellResultsData> wellResults = m_eclipseCase->eclipseCaseData()->wellResults();
cvf::Collection<RigSimWellData> simWellData = m_eclipseCase->eclipseCaseData()->wellResults();
std::vector<caf::PdmPointer<RimSimWellInView> > newWells;
@@ -1201,27 +1201,27 @@ void RimEclipseView::syncronizeWellsWithResults()
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
{
RimSimWellInView* well = this->wellCollection()->wells()[wIdx];
well->setWellResults(NULL, -1);
well->setSimWellData(NULL, -1);
}
bool isAnyWellCreated = false;
// Find corresponding well from well result, or create a new
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
for (size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx)
{
RimSimWellInView* well = this->wellCollection()->findWell(wellResults[wIdx]->m_wellName);
RimSimWellInView* well = this->wellCollection()->findWell(simWellData[wIdx]->m_wellName);
if (!well)
{
well = new RimSimWellInView;
well->name = wellResults[wIdx]->m_wellName;
well->name = simWellData[wIdx]->m_wellName;
isAnyWellCreated = true;
}
newWells.push_back(well);
well->setWellResults(wellResults[wIdx].p(), wIdx);
well->setSimWellData(simWellData[wIdx].p(), wIdx);
}
// Delete all wells that does not have a result
@@ -1229,8 +1229,8 @@ void RimEclipseView::syncronizeWellsWithResults()
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
{
RimSimWellInView* well = this->wellCollection()->wells()[wIdx];
RigSingleWellResultsData* wellRes = well->wellResults();
if (wellRes == NULL)
RigSimWellData* simWellData = well->simWellData();
if (simWellData == NULL)
{
delete well;
}
@@ -1292,10 +1292,10 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC
RimSimWellInView* well = this->wellCollection()->wells()[wIdx];
if (well->isWellCellsVisible())
{
RigSingleWellResultsData* wres = well->wellResults();
if (!wres) continue;
RigSimWellData* simWellData = well->simWellData();
if (!simWellData) continue;
const std::vector< RigWellResultFrame >& wellResFrames = wres->m_wellCellsTimeSteps;
const std::vector< RigWellResultFrame >& wellResFrames = simWellData->m_wellCellsTimeSteps;
for (size_t wfIdx = 0; wfIdx < wellResFrames.size(); ++wfIdx)
{
// Add the wellhead cell if it is active

View File

@@ -25,7 +25,7 @@
#include "RiaPreferences.h"
#include "RigEclipseCaseData.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
@@ -287,11 +287,11 @@ bool RimEclipseWellCollection::hasVisibleWellCells()
for (size_t i = 0 ; !hasCells && i < this->wells().size(); ++i)
{
RimSimWellInView* well = this->wells()[i];
if ( well && well->wellResults() && ((well->showWell() && well->showWellCells())) )
if ( well && well->simWellData() && ((well->showWell() && well->showWellCells())) )
{
for (size_t tIdx = 0; !hasCells && tIdx < well->wellResults()->m_wellCellsTimeSteps.size(); ++tIdx )
for (size_t tIdx = 0; !hasCells && tIdx < well->simWellData()->m_wellCellsTimeSteps.size(); ++tIdx )
{
const RigWellResultFrame& wellResultFrame = well->wellResults()->m_wellCellsTimeSteps[tIdx];
const RigWellResultFrame& wellResultFrame = well->simWellData()->m_wellCellsTimeSteps[tIdx];
for (size_t wsIdx = 0; !hasCells && wsIdx < wellResultFrame.m_wellResultBranches.size(); ++wsIdx)
{
if (wellResultFrame.m_wellResultBranches[wsIdx].m_branchResultPoints.size() > 0 ) hasCells = true;
@@ -488,9 +488,9 @@ void RimEclipseWellCollection::assignDefaultWellColors()
for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx)
{
RimSimWellInView* well = wells[wIdx];
if (well && well->wellResults() )
if (well && well->simWellData() )
{
well->wellPipeColor = ownerCase->defaultWellColor(well->wellResults()->m_wellName);
well->wellPipeColor = ownerCase->defaultWellColor(well->simWellData()->m_wellName);
}
}

View File

@@ -21,7 +21,7 @@
#include "RimSimWellInView.h"
#include "RigSimulationWellCenterLineCalculator.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RimCellRangeFilterCollection.h"
#include "RimEclipseView.h"
@@ -192,9 +192,9 @@ void RimSimWellInView::wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d*
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData();
if (!this->wellResults()->hasWellResult(frameIndex)) return;
if (!this->simWellData()->hasWellResult(frameIndex)) return;
const RigWellResultFrame& wellResultFrame = this->wellResults()->wellResultFrame(frameIndex);
const RigWellResultFrame& wellResultFrame = this->simWellData()->wellResultFrame(frameIndex);
const RigCell& whCell = rigReservoir->cellFromWellResultCell(wellResultFrame.m_wellHead);
// Match this position with pipe start position in RivWellPipesPartMgr::calculateWellPipeCenterline()
@@ -261,11 +261,11 @@ double RimSimWellInView::pipeRadius()
//--------------------------------------------------------------------------------------------------
bool RimSimWellInView::intersectsDynamicWellCellsFilteredCells(size_t frameIndex) const
{
if (this->wellResults() == nullptr) return false;
if (this->simWellData() == nullptr) return false;
if (!wellResults()->hasWellResult(frameIndex)) return false;
if (!simWellData()->hasWellResult(frameIndex)) return false;
const RigWellResultFrame& wrsf = this->wellResults()->wellResultFrame(frameIndex);
const RigWellResultFrame& wrsf = this->simWellData()->wellResultFrame(frameIndex);
return intersectsWellCellsFilteredCells(wrsf, frameIndex);
}
@@ -341,10 +341,10 @@ bool RimSimWellInView::intersectsWellCellsFilteredCells(const RigWellResultFrame
//--------------------------------------------------------------------------------------------------
bool RimSimWellInView::intersectsStaticWellCellsFilteredCells() const
{
if (this->wellResults() == nullptr) return false;
if (this->simWellData() == nullptr) return false;
// NOTE: Read out static well cells, union of well cells across all time steps
const RigWellResultFrame& wrsf = this->wellResults()->staticWellCells();
const RigWellResultFrame& wrsf = this->simWellData()->staticWellCells();
// NOTE: Use first time step for visibility evaluation
size_t frameIndex = 0;
@@ -428,7 +428,7 @@ bool RimSimWellInView::isWellCellsVisible() const
this->firstAncestorOrThisOfType(reservoirView);
if (reservoirView == nullptr) return false;
if (this->wellResults() == nullptr) return false;
if (this->simWellData() == nullptr) return false;
if (!reservoirView->wellCollection()->isActive())
return false;
@@ -462,14 +462,14 @@ bool RimSimWellInView::isWellPipeVisible(size_t frameIndex) const
this->firstAncestorOrThisOfType(reservoirView);
if (reservoirView == nullptr) return false;
if (this->wellResults() == nullptr) return false;
if (this->simWellData() == nullptr) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
if (frameIndex >= this->simWellData()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
size_t wellTimeStepIndex = this->simWellData()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
@@ -508,14 +508,14 @@ bool RimSimWellInView::isWellSpheresVisible(size_t frameIndex) const
this->firstAncestorOrThisOfType(reservoirView);
if (reservoirView == nullptr) return false;
if (this->wellResults() == nullptr) return false;
if (this->simWellData() == nullptr) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
if (frameIndex >= this->simWellData()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
size_t wellTimeStepIndex = this->simWellData()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
@@ -562,26 +562,26 @@ bool RimSimWellInView::isUsingCellCenterForPipe() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellInView::setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex)
void RimSimWellInView::setSimWellData(RigSimWellData* simWellData, size_t resultWellIndex)
{
m_wellResults = wellResults;
m_simWellData = simWellData;
m_resultWellIndex = resultWellIndex;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigSingleWellResultsData* RimSimWellInView::wellResults()
RigSimWellData* RimSimWellInView::simWellData()
{
return m_wellResults.p();
return m_simWellData.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigSingleWellResultsData* RimSimWellInView::wellResults() const
const RigSimWellData* RimSimWellInView::simWellData() const
{
return m_wellResults.p();
return m_simWellData.p();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -32,7 +32,7 @@
#include "cvfObject.h"
#include "cvfVector3.h"
class RigSingleWellResultsData;
class RigSimWellData;
class RigWellResultFrame;
struct RigWellResultPoint;
@@ -53,9 +53,9 @@ public:
RimSimWellInView();
virtual ~RimSimWellInView();
void setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex);
RigSingleWellResultsData* wellResults();
const RigSingleWellResultsData* wellResults() const;
void setSimWellData(RigSimWellData* simWellData, size_t resultWellIndex);
RigSimWellData* simWellData();
const RigSimWellData* simWellData() const;
size_t resultWellIndex() const;
bool isWellCellsVisible() const;
@@ -110,6 +110,6 @@ private:
bool intersectsWellCellsFilteredCells(const RigWellResultFrame &wrsf, size_t frameIndex) const;
private:
cvf::ref<RigSingleWellResultsData> m_wellResults;
cvf::ref<RigSimWellData> m_simWellData;
size_t m_resultWellIndex;
};

View File

@@ -30,7 +30,7 @@
#include "RigResultAccessorFactory.h"
#include "RigSimulationWellCenterLineCalculator.h"
#include "RigSimulationWellCoordsAndMD.h"
#include "RigSingleWellResultsData.h"
#include "RigSimWellData.h"
#include "RigWellLogCurveData.h"
#include "RigWellPath.h"
@@ -420,11 +420,11 @@ std::set<QString> RimWellLogExtractionCurve::findSortedWellNames()
if ( eclipseCase && eclipseCase->eclipseCaseData() )
{
const cvf::Collection<RigSingleWellResultsData>& wellRes = eclipseCase->eclipseCaseData()->wellResults();
const cvf::Collection<RigSimWellData>& simWellData = eclipseCase->eclipseCaseData()->wellResults();
for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx )
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
{
sortedWellNames.insert(wellRes[wIdx]->m_wellName);
sortedWellNames.insert(simWellData[wIdx]->m_wellName);
}
}
@@ -448,15 +448,15 @@ void RimWellLogExtractionCurve::updateGeneratedSimulationWellpath()
}
RigEclipseCaseData* eclCaseData = eclipseCase->eclipseCaseData();
const RigSingleWellResultsData* wellResults = eclCaseData->findWellResult(m_simWellName());
const RigSimWellData* simWellData = eclCaseData->findSimWellData(m_simWellName());
if (!wellResults) return;
if (!simWellData) return;
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(eclCaseData,
wellResults,
simWellData,
-1,
true,
true,