mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Avoid include of header file in header
This commit is contained in:
parent
3fca5f15ae
commit
9d58769f89
@ -43,6 +43,7 @@
|
||||
#include "RigEquil.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellLogExtractor.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -269,7 +270,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
||||
|
||||
if ( simWellData && simWellData->hasWellResult( frameIndex ) )
|
||||
{
|
||||
const RigWellResultFrame& wResFrame = simWellData->wellResultFrame( frameIndex );
|
||||
const RigWellResultFrame* wResFrame = simWellData->wellResultFrame( frameIndex );
|
||||
|
||||
std::vector<CompletionVizData> completionVizDataItems;
|
||||
|
||||
@ -290,7 +291,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
||||
{
|
||||
size_t globalCellIndex = intersectionInfo.globCellIndex;
|
||||
const RigWellResultPoint* wResCell =
|
||||
wResFrame.findResultCellWellHeadIncluded( 0, globalCellIndex );
|
||||
wResFrame->findResultCellWellHeadIncluded( 0, globalCellIndex );
|
||||
|
||||
if ( !wResCell || !wResCell->isValid() )
|
||||
{
|
||||
@ -373,7 +374,7 @@ void RivSimWellPipesPartMgr::updatePipeResultColor( size_t frameIndex )
|
||||
const double hcInjectorState = 3.5;
|
||||
const double closedState = 4.5;
|
||||
|
||||
const RigWellResultFrame& wResFrame = simWellData->wellResultFrame( frameIndex );
|
||||
const RigWellResultFrame* wResFrame = simWellData->wellResultFrame( frameIndex );
|
||||
|
||||
// Setup a scalar mapper
|
||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> scalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||
@ -423,8 +424,8 @@ void RivSimWellPipesPartMgr::updatePipeResultColor( size_t frameIndex )
|
||||
|
||||
if ( cellIds[wcIdx].isCell() )
|
||||
{
|
||||
wResCell = wResFrame.findResultCellWellHeadExcluded( cellIds[wcIdx].m_gridIndex,
|
||||
cellIds[wcIdx].m_gridCellIndex );
|
||||
wResCell = wResFrame->findResultCellWellHeadExcluded( cellIds[wcIdx].m_gridIndex,
|
||||
cellIds[wcIdx].m_gridCellIndex );
|
||||
}
|
||||
|
||||
if ( wResCell )
|
||||
@ -433,7 +434,7 @@ void RivSimWellPipesPartMgr::updatePipeResultColor( size_t frameIndex )
|
||||
|
||||
if ( wResCell->m_isOpen )
|
||||
{
|
||||
switch ( wResFrame.m_productionType )
|
||||
switch ( wResFrame->m_productionType )
|
||||
{
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
cellState = producerState;
|
||||
@ -478,7 +479,7 @@ void RivSimWellPipesPartMgr::updatePipeResultColor( size_t frameIndex )
|
||||
wellBranch.m_surfaceDrawable->setTextureCoordArray( surfTexCoords.p() );
|
||||
wellBranch.m_largeSurfaceDrawable->setTextureCoordArray( surfTexCoords.p() );
|
||||
|
||||
if ( wResFrame.m_isOpen )
|
||||
if ( wResFrame->m_isOpen )
|
||||
{
|
||||
// Use slightly larger geometry for open wells to avoid z-fighting when two wells are located at the
|
||||
// same position
|
||||
|
@ -43,6 +43,7 @@ class RivPipeGeometryGenerator;
|
||||
class Rim3dView;
|
||||
class RimSimWellInView;
|
||||
class RivWellConnectionFactorGeometryGenerator;
|
||||
struct RigWellResultPoint;
|
||||
|
||||
class RivSimWellPipesPartMgr : public cvf::Object
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
#include "cafEffectGenerator.h"
|
||||
@ -62,12 +63,12 @@ void RivWellConnectionsPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBas
|
||||
if ( !m_rimReservoirView->eclipseCase() ) return;
|
||||
if ( !m_rimWell->showWell() ) return;
|
||||
if ( !m_rimWell->simWellData()->hasWellResult( frameIndex ) ) return;
|
||||
if ( !m_rimWell->simWellData()->wellResultFrame( frameIndex ).m_isOpen ) return;
|
||||
if ( m_rimWell->simWellData()->wellResultFrame( frameIndex ).m_productionType ==
|
||||
if ( !m_rimWell->simWellData()->wellResultFrame( frameIndex )->m_isOpen ) return;
|
||||
if ( m_rimWell->simWellData()->wellResultFrame( frameIndex )->m_productionType ==
|
||||
RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
return;
|
||||
|
||||
bool isProducer = ( m_rimWell->simWellData()->wellResultFrame( frameIndex ).m_productionType ==
|
||||
bool isProducer = ( m_rimWell->simWellData()->wellResultFrame( frameIndex )->m_productionType ==
|
||||
RiaDefines::WellProductionType::PRODUCER );
|
||||
double pipeRadius = m_rimWell->pipeRadius();
|
||||
|
||||
@ -131,12 +132,12 @@ void RivWellConnectionsPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBas
|
||||
{
|
||||
if ( otherWell == m_rimWell ) continue;
|
||||
if ( !otherWell->simWellData()->hasWellResult( frameIndex ) ) continue;
|
||||
if ( !otherWell->simWellData()->wellResultFrame( frameIndex ).m_isOpen ) continue;
|
||||
if ( otherWell->simWellData()->wellResultFrame( frameIndex ).m_productionType ==
|
||||
if ( !otherWell->simWellData()->wellResultFrame( frameIndex )->m_isOpen ) continue;
|
||||
if ( otherWell->simWellData()->wellResultFrame( frameIndex )->m_productionType ==
|
||||
RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
continue;
|
||||
|
||||
bool isOtherProducer = ( otherWell->simWellData()->wellResultFrame( frameIndex ).m_productionType ==
|
||||
bool isOtherProducer = ( otherWell->simWellData()->wellResultFrame( frameIndex )->m_productionType ==
|
||||
RiaDefines::WellProductionType::PRODUCER );
|
||||
|
||||
{
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -98,7 +99,7 @@ void RivWellDiskPartMgr::buildWellDiskParts( size_t frameIndex, const caf::Displ
|
||||
|
||||
if ( !well->simWellData()->hasWellResult( frameIndex ) ) return;
|
||||
|
||||
auto productionType = well->simWellData()->wellResultFrame( frameIndex ).m_productionType;
|
||||
auto productionType = well->simWellData()->wellResultFrame( frameIndex )->m_productionType;
|
||||
|
||||
double pipeRadius = m_rimWell->pipeRadius();
|
||||
unsigned int numSectors = 100;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -107,12 +108,12 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
||||
|
||||
if ( !well->simWellData()->hasWellResult( frameIndex ) ) return;
|
||||
|
||||
const RigWellResultFrame& wellResultFrame = well->simWellData()->wellResultFrame( frameIndex );
|
||||
const RigWellResultFrame* wellResultFrame = well->simWellData()->wellResultFrame( frameIndex );
|
||||
|
||||
double pipeRadius = m_rimWell->pipeRadius();
|
||||
int pipeCrossSectionVxCount = m_rimWell->pipeCrossSectionVertexCount();
|
||||
|
||||
if ( wellResultFrame.m_isOpen )
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
{
|
||||
// Use slightly larger well head arrow when well is open
|
||||
pipeRadius *= 1.1;
|
||||
@ -181,7 +182,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
||||
double arrowLength =
|
||||
characteristicCellSize * simWellInViewCollection()->wellHeadScaleFactor() * m_rimWell->wellHeadScaleFactor();
|
||||
|
||||
if ( wellResultFrame.m_isOpen )
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
{
|
||||
// Use slightly larger well head arrow when well is open
|
||||
arrowLength = 1.1 * arrowLength;
|
||||
@ -191,13 +192,13 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
||||
textPosition.z() += 1.2 * arrowLength;
|
||||
|
||||
cvf::Mat4f matr;
|
||||
if ( wellResultFrame.m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
matr = cvf::Mat4f::fromRotation( cvf::Vec3f( 1.0f, 0.0f, 0.0f ), cvf::Math::toRadians( 180.0f ) );
|
||||
}
|
||||
|
||||
double ijScaleFactor = arrowLength / 6;
|
||||
if ( wellResultFrame.m_isOpen )
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
{
|
||||
ijScaleFactor *= 1.1;
|
||||
}
|
||||
@ -205,7 +206,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
||||
matr( 1, 1 ) *= ijScaleFactor;
|
||||
matr( 2, 2 ) *= arrowLength;
|
||||
|
||||
if ( wellResultFrame.m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
arrowPosition.z() += arrowLength;
|
||||
}
|
||||
@ -251,21 +252,21 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
||||
|
||||
if ( wellColl && wellColl->showConnectionStatusColors() )
|
||||
{
|
||||
if ( wellResultFrame.m_isOpen )
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
{
|
||||
if ( wellResultFrame.m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::GREEN );
|
||||
}
|
||||
else if ( wellResultFrame.m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR )
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::ORANGE );
|
||||
}
|
||||
else if ( wellResultFrame.m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR )
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::RED );
|
||||
}
|
||||
else if ( wellResultFrame.m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::BLUE );
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -79,11 +80,11 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicLi
|
||||
|
||||
if ( !rigWellResult->hasWellResult( frameIndex ) ) return;
|
||||
|
||||
const RigWellResultFrame& wellResultFrame = rigWellResult->wellResultFrame( frameIndex );
|
||||
const RigWellResultFrame* wellResultFrame = rigWellResult->wellResultFrame( frameIndex );
|
||||
|
||||
std::vector<std::pair<cvf::Vec3f, cvf::Color3f>> centerColorPairs;
|
||||
|
||||
for ( const RigWellResultBranch& wellResultBranch : wellResultFrame.m_wellResultBranches )
|
||||
for ( const RigWellResultBranch& wellResultBranch : wellResultFrame->m_wellResultBranches )
|
||||
{
|
||||
for ( const RigWellResultPoint& wellResultPoint : wellResultBranch.m_branchResultPoints )
|
||||
{
|
||||
@ -108,7 +109,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicLi
|
||||
}
|
||||
}
|
||||
|
||||
cvf::ref<cvf::Part> part = createPart( centerColorPairs, wellResultFrame.m_isOpen );
|
||||
cvf::ref<cvf::Part> part = createPart( centerColorPairs, wellResultFrame->m_isOpen );
|
||||
|
||||
model->addPart( part.p() );
|
||||
}
|
||||
@ -190,7 +191,7 @@ cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart( std::vector<std::pair<cvf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RivWellSpheresPartMgr::wellCellColor( const RigWellResultFrame& wellResultFrame,
|
||||
cvf::Color3f RivWellSpheresPartMgr::wellCellColor( const RigWellResultFrame* wellResultFrame,
|
||||
const RigWellResultPoint& wellResultPoint )
|
||||
{
|
||||
// Colours should be synchronized with RivWellPipesPartMgr::updatePipeResultColor
|
||||
@ -207,7 +208,7 @@ cvf::Color3f RivWellSpheresPartMgr::wellCellColor( const RigWellResultFrame& wel
|
||||
{
|
||||
if ( wellResultPoint.m_isOpen )
|
||||
{
|
||||
switch ( wellResultFrame.m_productionType )
|
||||
switch ( wellResultFrame->m_productionType )
|
||||
{
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
cellColor = cvf::Color3f::GREEN;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model, size_t frameIndex );
|
||||
|
||||
private:
|
||||
cvf::Color3f wellCellColor( const RigWellResultFrame& wellResultFrame, const RigWellResultPoint& wellResultPoint );
|
||||
cvf::Color3f wellCellColor( const RigWellResultFrame* wellResultFrame, const RigWellResultPoint& wellResultPoint );
|
||||
cvf::ref<cvf::Part> createPart( std::vector<std::pair<cvf::Vec3f, cvf::Color3f>>& centerColorPairs, bool isWellOpen );
|
||||
|
||||
private:
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEllipseFractureTemplate.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -177,11 +178,11 @@ std::map<std::string, std::vector<int>> RimFlowDiagSolution::allTracerActiveCell
|
||||
for ( size_t wIdx = 0; wIdx < simWellData.size(); ++wIdx )
|
||||
{
|
||||
if ( !simWellData[wIdx]->hasWellResult( timeStepIndex ) ) continue;
|
||||
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
const RigWellResultFrame* wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
|
||||
bool isInjectorWell =
|
||||
( wellResFrame.m_productionType != RiaDefines::WellProductionType::PRODUCER &&
|
||||
wellResFrame.m_productionType != RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
||||
( wellResFrame->m_productionType != RiaDefines::WellProductionType::PRODUCER &&
|
||||
wellResFrame->m_productionType != RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
||||
|
||||
std::string wellName = simWellData[wIdx]->m_wellName.toStdString();
|
||||
std::string wellNameXf = addCrossFlowEnding( simWellData[wIdx]->m_wellName ).toStdString();
|
||||
@ -189,7 +190,7 @@ std::map<std::string, std::vector<int>> RimFlowDiagSolution::allTracerActiveCell
|
||||
std::vector<int>& tracerCells = tracersWithCells[wellName];
|
||||
std::vector<int>& tracerCellsCrossFlow = tracersWithCells[wellNameXf];
|
||||
|
||||
for ( const RigWellResultBranch& wBr : wellResFrame.m_wellResultBranches )
|
||||
for ( const RigWellResultBranch& wBr : wellResFrame->m_wellResultBranches )
|
||||
{
|
||||
for ( const RigWellResultPoint& wrp : wBr.m_branchResultPoints )
|
||||
{
|
||||
@ -297,18 +298,18 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeSte
|
||||
if ( simWellData[wIdx]->m_wellName != wellName ) continue;
|
||||
if ( !simWellData[wIdx]->hasWellResult( timeStepIndex ) ) return TracerStatusType::CLOSED;
|
||||
|
||||
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
const RigWellResultFrame* wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
|
||||
if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
if ( wellResFrame->m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellResFrame->m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellResFrame->m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
if ( hasCrossFlowEnding( tracerName ) ) return TracerStatusType::PRODUCER;
|
||||
|
||||
return TracerStatusType::INJECTOR;
|
||||
}
|
||||
else if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::PRODUCER ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
else if ( wellResFrame->m_productionType == RiaDefines::WellProductionType::PRODUCER ||
|
||||
wellResFrame->m_productionType == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
{
|
||||
if ( hasCrossFlowEnding( tracerName ) ) return TracerStatusType::INJECTOR;
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RigSimulationWellCoordsAndMD.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@ -592,9 +593,9 @@ QString RimWellAllocationPlot::wellStatusTextForTimeStep( const QString&
|
||||
{
|
||||
if ( simWellData->hasWellResult( timeStep ) )
|
||||
{
|
||||
const RigWellResultFrame& wellResultFrame = simWellData->wellResultFrame( timeStep );
|
||||
const RigWellResultFrame* wellResultFrame = simWellData->wellResultFrame( timeStep );
|
||||
|
||||
RiaDefines::WellProductionType prodType = wellResultFrame.m_productionType;
|
||||
RiaDefines::WellProductionType prodType = wellResultFrame->m_productionType;
|
||||
|
||||
switch ( prodType )
|
||||
{
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellLogExtractor.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimDataSourceForRftPlt.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@ -425,14 +426,14 @@ public:
|
||||
|
||||
if ( !simWell->hasWellResult( tsIdx ) ) return;
|
||||
|
||||
const RigWellResultFrame& resFrame = simWell->wellResultFrame( tsIdx );
|
||||
const RigWellResultFrame* resFrame = simWell->wellResultFrame( tsIdx );
|
||||
|
||||
const RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid();
|
||||
|
||||
for ( size_t brIdx = 0; brIdx < resFrame.m_wellResultBranches.size(); ++brIdx )
|
||||
for ( size_t brIdx = 0; brIdx < resFrame->m_wellResultBranches.size(); ++brIdx )
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& branchResPoints =
|
||||
resFrame.m_wellResultBranches[brIdx].m_branchResultPoints;
|
||||
resFrame->m_wellResultBranches[brIdx].m_branchResultPoints;
|
||||
for ( size_t wrpIdx = 0; wrpIdx < branchResPoints.size(); wrpIdx++ )
|
||||
{
|
||||
const RigGridBase* grid = mainGrid->gridByIndex( branchResPoints[wrpIdx].m_gridIndex );
|
||||
@ -469,7 +470,7 @@ public:
|
||||
m_pipeBranchMeasuredDepths.push_back( intersections[wpExIdx].endMD );
|
||||
|
||||
const RigWellResultPoint& resPoint =
|
||||
resFrame.m_wellResultBranches[it->second.first].m_branchResultPoints[it->second.second];
|
||||
resFrame->m_wellResultBranches[it->second.first].m_branchResultPoints[it->second.second];
|
||||
|
||||
m_pipeBranchWellResultPoints.push_back( resPoint );
|
||||
if ( wpExIdx < intersections.size() - 1 )
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "RimCaseCollection.h"
|
||||
@ -414,7 +415,7 @@ const RigVirtualPerforationTransmissibilities* RimEclipseCase::computeAndGetVirt
|
||||
|
||||
if ( wellRes->hasWellResult( i ) )
|
||||
{
|
||||
for ( const auto& wellResultBranch : wellRes->wellResultFrame( i ).m_wellResultBranches )
|
||||
for ( const auto& wellResultBranch : wellRes->wellResultFrame( i )->m_wellResultBranches )
|
||||
{
|
||||
for ( const auto& r : wellResultBranch.m_branchResultPoints )
|
||||
{
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimCellFilterCollection.h"
|
||||
@ -231,12 +232,12 @@ void RimSimWellInView::wellHeadTopBottomPosition( int frameIndex, cvf::Vec3d* to
|
||||
{
|
||||
if ( !this->simWellData()->hasAnyValidCells( frameIndex ) ) return;
|
||||
|
||||
wellResultFramePtr = &( this->simWellData()->wellResultFrame( frameIndex ) );
|
||||
wellResultFramePtr = this->simWellData()->wellResultFrame( frameIndex );
|
||||
whCellPtr = &( rigReservoir->cellFromWellResultCell( wellResultFramePtr->wellHeadOrStartCell() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
wellResultFramePtr = &( this->simWellData()->staticWellCells() );
|
||||
wellResultFramePtr = this->simWellData()->staticWellCells();
|
||||
whCellPtr = &( rigReservoir->cellFromWellResultCell( wellResultFramePtr->wellHeadOrStartCell() ) );
|
||||
}
|
||||
|
||||
@ -321,7 +322,7 @@ bool RimSimWellInView::intersectsDynamicWellCellsFilteredCells( size_t frameInde
|
||||
|
||||
if ( !simWellData()->hasWellResult( frameIndex ) ) return false;
|
||||
|
||||
const RigWellResultFrame& wrsf = this->simWellData()->wellResultFrame( frameIndex );
|
||||
const RigWellResultFrame* wrsf = this->simWellData()->wellResultFrame( frameIndex );
|
||||
|
||||
return intersectsWellCellsFilteredCells( wrsf, frameIndex );
|
||||
}
|
||||
@ -329,7 +330,7 @@ bool RimSimWellInView::intersectsDynamicWellCellsFilteredCells( size_t frameInde
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSimWellInView::intersectsWellCellsFilteredCells( const RigWellResultFrame& wrsf, size_t frameIndex ) const
|
||||
bool RimSimWellInView::intersectsWellCellsFilteredCells( const RigWellResultFrame* wrsf, size_t frameIndex ) const
|
||||
{
|
||||
RimEclipseView* reservoirView = nullptr;
|
||||
this->firstAncestorOrThisOfType( reservoirView );
|
||||
@ -350,8 +351,8 @@ bool RimSimWellInView::intersectsWellCellsFilteredCells( const RigWellResultFram
|
||||
|
||||
// First check the wellhead:
|
||||
|
||||
size_t gridIndex = wrsf.m_wellHead.m_gridIndex;
|
||||
size_t gridCellIndex = wrsf.m_wellHead.m_gridCellIndex;
|
||||
size_t gridIndex = wrsf->m_wellHead.m_gridIndex;
|
||||
size_t gridCellIndex = wrsf->m_wellHead.m_gridCellIndex;
|
||||
|
||||
if ( gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T )
|
||||
{
|
||||
@ -364,7 +365,7 @@ bool RimSimWellInView::intersectsWellCellsFilteredCells( const RigWellResultFram
|
||||
|
||||
// Then check the rest of the well, with all the branches
|
||||
|
||||
const std::vector<RigWellResultBranch>& wellResSegments = wrsf.m_wellResultBranches;
|
||||
const std::vector<RigWellResultBranch>& wellResSegments = wrsf->m_wellResultBranches;
|
||||
for ( const RigWellResultBranch& branchSegment : wellResSegments )
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& wsResCells = branchSegment.m_branchResultPoints;
|
||||
@ -408,7 +409,7 @@ bool RimSimWellInView::intersectsStaticWellCellsFilteredCells() const
|
||||
if ( this->simWellData() == nullptr ) return false;
|
||||
|
||||
// NOTE: Read out static well cells, union of well cells across all time steps
|
||||
const RigWellResultFrame& wrsf = this->simWellData()->staticWellCells();
|
||||
const RigWellResultFrame* wrsf = this->simWellData()->staticWellCells();
|
||||
|
||||
// NOTE: Use first time step for visibility evaluation
|
||||
size_t frameIndex = 0;
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
bool intersectsDynamicWellCellsFilteredCells( size_t frameIndex ) const;
|
||||
bool intersectsStaticWellCellsFilteredCells() const;
|
||||
|
||||
bool intersectsWellCellsFilteredCells( const RigWellResultFrame& wrsf, size_t frameIndex ) const;
|
||||
bool intersectsWellCellsFilteredCells( const RigWellResultFrame* wrsf, size_t frameIndex ) const;
|
||||
|
||||
private:
|
||||
cvf::ref<RigSimWellData> m_simWellData;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseContourMapView.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
@ -100,11 +101,11 @@ bool RimSimWellInViewTools::isInjector( RimSimWellInView* well )
|
||||
|
||||
if ( wRes->hasWellResult( currentTimeStep ) )
|
||||
{
|
||||
const RigWellResultFrame& wrf = wRes->wellResultFrame( currentTimeStep );
|
||||
const RigWellResultFrame* wrf = wRes->wellResultFrame( currentTimeStep );
|
||||
|
||||
if ( wrf.m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wrf.m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wrf.m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
if ( wrf->m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wrf->m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wrf->m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimStreamlineInViewCollection.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
@ -27,6 +28,7 @@
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigTracerPoint.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseInputCase.h"
|
||||
@ -400,20 +402,20 @@ void RimStreamlineInViewCollection::findStartCells( int
|
||||
{
|
||||
if ( !swdata->hasWellResult( timeIdx ) || !swdata->hasAnyValidCells( timeIdx ) ) continue;
|
||||
|
||||
RigWellResultFrame frame = swdata->wellResultFrame( timeIdx );
|
||||
auto frame = swdata->wellResultFrame( timeIdx );
|
||||
|
||||
for ( auto& branch : frame.m_wellResultBranches )
|
||||
for ( auto& branch : frame->m_wellResultBranches )
|
||||
{
|
||||
for ( const auto& point : branch.m_branchResultPoints )
|
||||
{
|
||||
if ( point.isValid() && point.m_isOpen )
|
||||
{
|
||||
RigCell cell = grids[point.m_gridIndex]->cell( point.m_gridCellIndex );
|
||||
if ( frame.m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( frame->m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
outProducerCells.push_back( std::pair<QString, RigCell>( swdata->m_wellName, cell ) );
|
||||
}
|
||||
else if ( frame.m_productionType != RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
else if ( frame->m_productionType != RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
{
|
||||
outInjectorCells.push_back( std::pair<QString, RigCell>( swdata->m_wellName, cell ) );
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigSimulationWellCoordsAndMD.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "RigSimulationWellCoordsAndMD.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "RigSimWellData.h"
|
||||
|
||||
/* rand example: guess the number */
|
||||
#include "RigWellResultPoint.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -28,19 +29,20 @@
|
||||
RigSimWellData::RigSimWellData()
|
||||
: m_isMultiSegmentWell( false )
|
||||
{
|
||||
m_staticWellCells = std::make_unique<RigWellResultFrame>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellResultFrame& RigSimWellData::wellResultFrame( size_t resultTimeStepIndex ) const
|
||||
const RigWellResultFrame* RigSimWellData::wellResultFrame( size_t resultTimeStepIndex ) const
|
||||
{
|
||||
CVF_ASSERT( resultTimeStepIndex < m_resultTimeStepIndexToWellTimeStepIndex.size() );
|
||||
|
||||
size_t wellTimeStepIndex = m_resultTimeStepIndexToWellTimeStepIndex[resultTimeStepIndex];
|
||||
CVF_ASSERT( wellTimeStepIndex < m_wellCellsTimeSteps.size() );
|
||||
|
||||
return m_wellCellsTimeSteps[wellTimeStepIndex];
|
||||
return &( m_wellCellsTimeSteps[wellTimeStepIndex] );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -118,9 +120,9 @@ bool RigSimWellData::hasAnyValidCells( size_t resultTimeStepIndex ) const
|
||||
|
||||
if ( wellTimeStepIndex == cvf::UNDEFINED_SIZE_T ) return false;
|
||||
|
||||
if ( wellResultFrame( resultTimeStepIndex ).m_wellHead.isCell() ) return true;
|
||||
if ( wellResultFrame( resultTimeStepIndex )->m_wellHead.isCell() ) return true;
|
||||
|
||||
const std::vector<RigWellResultBranch>& resBranches = wellResultFrame( resultTimeStepIndex ).m_wellResultBranches;
|
||||
const std::vector<RigWellResultBranch>& resBranches = wellResultFrame( resultTimeStepIndex )->m_wellResultBranches;
|
||||
|
||||
for ( size_t i = 0; i < resBranches.size(); ++i )
|
||||
{
|
||||
@ -272,8 +274,8 @@ void RigSimWellData::computeStaticWellCellPath() const
|
||||
|
||||
std::map<int, std::list<RigWellResultPoint>>::iterator bIt;
|
||||
|
||||
m_staticWellCells.m_wellResultBranches.clear();
|
||||
m_staticWellCells.m_wellHead = m_wellCellsTimeSteps[0].m_wellHead;
|
||||
m_staticWellCells->m_wellResultBranches.clear();
|
||||
m_staticWellCells->m_wellHead = m_wellCellsTimeSteps[0].m_wellHead;
|
||||
|
||||
for ( bIt = staticWellBranches.begin(); bIt != staticWellBranches.end(); ++bIt )
|
||||
{
|
||||
@ -288,7 +290,7 @@ void RigSimWellData::computeStaticWellCellPath() const
|
||||
rigBranch.m_branchResultPoints.push_back( *cIt );
|
||||
}
|
||||
|
||||
m_staticWellCells.m_wellResultBranches.push_back( rigBranch );
|
||||
m_staticWellCells->m_wellResultBranches.push_back( rigBranch );
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,8 +317,8 @@ RiaDefines::WellProductionType RigSimWellData::wellProductionType( size_t result
|
||||
{
|
||||
if ( hasWellResult( resultTimeStepIndex ) )
|
||||
{
|
||||
const RigWellResultFrame& wResFrame = wellResultFrame( resultTimeStepIndex );
|
||||
return wResFrame.m_productionType;
|
||||
const RigWellResultFrame* wResFrame = wellResultFrame( resultTimeStepIndex );
|
||||
return wResFrame->m_productionType;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,15 +329,15 @@ RiaDefines::WellProductionType RigSimWellData::wellProductionType( size_t result
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellResultFrame& RigSimWellData::staticWellCells() const
|
||||
const RigWellResultFrame* RigSimWellData::staticWellCells() const
|
||||
{
|
||||
// Make sure we have computed the static representation of the well
|
||||
if ( m_staticWellCells.m_wellResultBranches.size() == 0 )
|
||||
if ( m_staticWellCells->m_wellResultBranches.size() == 0 )
|
||||
{
|
||||
computeStaticWellCellPath();
|
||||
}
|
||||
|
||||
return m_staticWellCells;
|
||||
return m_staticWellCells.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -345,8 +347,8 @@ bool RigSimWellData::isOpen( size_t resultTimeStepIndex ) const
|
||||
{
|
||||
if ( hasWellResult( resultTimeStepIndex ) )
|
||||
{
|
||||
const RigWellResultFrame& wResFrame = wellResultFrame( resultTimeStepIndex );
|
||||
return wResFrame.m_isOpen;
|
||||
const RigWellResultFrame* wResFrame = wellResultFrame( resultTimeStepIndex );
|
||||
return wResFrame->m_isOpen;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -18,15 +18,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "cvfObject.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
enum class WellProductionType : short;
|
||||
}
|
||||
|
||||
class RigWellResultFrame;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@ -41,11 +46,11 @@ public:
|
||||
bool hasWellResult( size_t resultTimeStepIndex ) const;
|
||||
bool hasAnyValidCells( size_t resultTimeStepIndex ) const;
|
||||
|
||||
const RigWellResultFrame& wellResultFrame( size_t resultTimeStepIndex ) const;
|
||||
const RigWellResultFrame* wellResultFrame( size_t resultTimeStepIndex ) const;
|
||||
bool isOpen( size_t resultTimeStepIndex ) const;
|
||||
RiaDefines::WellProductionType wellProductionType( size_t resultTimeStepIndex ) const;
|
||||
|
||||
const RigWellResultFrame& staticWellCells() const;
|
||||
const RigWellResultFrame* staticWellCells() const;
|
||||
|
||||
void computeMappingFromResultTimeIndicesToWellTimeIndices( const std::vector<QDateTime>& resultTimes );
|
||||
|
||||
@ -56,7 +61,7 @@ public: // Todo: Clean up this regarding public members and constness etc.
|
||||
std::vector<RigWellResultFrame> m_wellCellsTimeSteps;
|
||||
|
||||
private:
|
||||
mutable RigWellResultFrame m_staticWellCells;
|
||||
std::unique_ptr<RigWellResultFrame> m_staticWellCells;
|
||||
|
||||
void computeStaticWellCellPath() const;
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "RigCellFaceGeometryTools.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -95,11 +97,11 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellF
|
||||
|
||||
if ( timeStepIndex < 0 )
|
||||
{
|
||||
wellFramePtr = &wellResults->staticWellCells();
|
||||
wellFramePtr = wellResults->staticWellCells();
|
||||
}
|
||||
else
|
||||
{
|
||||
wellFramePtr = &( wellResults->wellResultFrame( timeStepIndex ) );
|
||||
wellFramePtr = wellResults->wellResultFrame( timeStepIndex );
|
||||
}
|
||||
|
||||
bool isMultiSegmentWell = wellResults->isMultiSegmentWell();
|
||||
|
@ -19,14 +19,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RigSimWellData.h"
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigEclipseCaseData;
|
||||
class RimSimWellInView;
|
||||
class RigSimWellData;
|
||||
struct RigWellResultPoint;
|
||||
struct RigWellResultBranch;
|
||||
class RigWellResultFrame;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
|
||||
@ -174,7 +175,7 @@ public:
|
||||
qint32 wellStatus = 0;
|
||||
if ( currentWellResult->hasWellResult( tsIdx ) )
|
||||
{
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx ).m_productionType )
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx )->m_productionType )
|
||||
{
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
wellType = "Producer";
|
||||
@ -190,7 +191,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx ).m_isOpen ? 1 : 0;
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx )->m_isOpen ? 1 : 0;
|
||||
}
|
||||
|
||||
wellTypes.push_back( wellType );
|
||||
@ -281,14 +282,14 @@ public:
|
||||
std::vector<qint32> segmentIds;
|
||||
|
||||
// Fetch results
|
||||
const RigWellResultFrame& wellResFrame = currentWellResult->wellResultFrame( timeStepIdx );
|
||||
const RigWellResultFrame* wellResFrame = currentWellResult->wellResultFrame( timeStepIdx );
|
||||
std::vector<RigGridBase*> grids;
|
||||
rimCase->eclipseCaseData()->allGrids( &grids );
|
||||
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame.m_wellResultBranches.size(); ++bIdx )
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame->m_wellResultBranches.size(); ++bIdx )
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& branchResPoints =
|
||||
wellResFrame.m_wellResultBranches[bIdx].m_branchResultPoints;
|
||||
wellResFrame->m_wellResultBranches[bIdx].m_branchResultPoints;
|
||||
for ( size_t rpIdx = 0; rpIdx < branchResPoints.size(); ++rpIdx )
|
||||
{
|
||||
const RigWellResultPoint& resPoint = branchResPoints[rpIdx];
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "RigResultAccessor.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -1019,9 +1020,9 @@ QString RiuResultTextBuilder::wellResultText()
|
||||
continue;
|
||||
}
|
||||
|
||||
const RigWellResultFrame& wellResultFrame = singleWellResultData->wellResultFrame( m_timeStepIndex );
|
||||
const RigWellResultFrame* wellResultFrame = singleWellResultData->wellResultFrame( m_timeStepIndex );
|
||||
const RigWellResultPoint* wellResultCell =
|
||||
wellResultFrame.findResultCellWellHeadIncluded( m_gridIndex, m_cellIndex );
|
||||
wellResultFrame->findResultCellWellHeadIncluded( m_gridIndex, m_cellIndex );
|
||||
if ( wellResultCell )
|
||||
{
|
||||
text += QString( "-- Well-cell connection info --\n Well Name: %1\n Branch Id: %2\n Segment Id: %3\n" )
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@ -57,23 +58,23 @@ grpc::Status RiaGrpcSimulationWellService::GetSimulationWellStatus( grpc::Server
|
||||
bool wellStatus = false;
|
||||
if ( currentWellResult->hasWellResult( tsIdx ) )
|
||||
{
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx ).m_productionType )
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx )->m_productionType )
|
||||
{
|
||||
case RigWellResultFrame::PRODUCER:
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
wellType = "Producer";
|
||||
break;
|
||||
case RigWellResultFrame::OIL_INJECTOR:
|
||||
case RiaDefines::WellProductionType::OIL_INJECTOR:
|
||||
wellType = "OilInjector";
|
||||
break;
|
||||
case RigWellResultFrame::WATER_INJECTOR:
|
||||
case RiaDefines::WellProductionType::WATER_INJECTOR:
|
||||
wellType = "WaterInjector";
|
||||
break;
|
||||
case RigWellResultFrame::GAS_INJECTOR:
|
||||
case RiaDefines::WellProductionType::GAS_INJECTOR:
|
||||
wellType = "GasInjector";
|
||||
break;
|
||||
}
|
||||
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx ).m_isOpen;
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx )->m_isOpen;
|
||||
}
|
||||
|
||||
reply->set_well_type( wellType.toStdString() );
|
||||
@ -106,14 +107,14 @@ grpc::Status RiaGrpcSimulationWellService::GetSimulationWellCells( grpc::ServerC
|
||||
if ( currentWellResult->hasWellResult( tsIdx ) )
|
||||
{
|
||||
// Fetch results
|
||||
const RigWellResultFrame& wellResFrame = currentWellResult->wellResultFrame( tsIdx );
|
||||
const RigWellResultFrame* wellResFrame = currentWellResult->wellResultFrame( tsIdx );
|
||||
std::vector<RigGridBase*> grids;
|
||||
eclipseCase->eclipseCaseData()->allGrids( &grids );
|
||||
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame.m_wellResultBranches.size(); ++bIdx )
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame->m_wellResultBranches.size(); ++bIdx )
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& branchResPoints =
|
||||
wellResFrame.m_wellResultBranches[bIdx].m_branchResultPoints;
|
||||
wellResFrame->m_wellResultBranches[bIdx].m_branchResultPoints;
|
||||
for ( size_t rpIdx = 0; rpIdx < branchResPoints.size(); ++rpIdx )
|
||||
{
|
||||
const RigWellResultPoint& resPoint = branchResPoints[rpIdx];
|
||||
|
Loading…
Reference in New Issue
Block a user