Added an interface to retreive the simulation well centerline

This commit is contained in:
Jacob Støren 2015-11-17 17:19:25 +01:00
parent 57f7c1229a
commit 5840f165ea
4 changed files with 22 additions and 3 deletions

View File

@ -139,3 +139,16 @@ void RivReservoirPipesPartMgr::updatePipeResultColor(size_t frameIndex)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector< std::vector <cvf::Vec3d> >* RivReservoirPipesPartMgr::centerLineOfWellBranches(int wellIdx)
{
if (wellIdx < m_wellPipesPartMgrs.size())
{
return &(m_wellPipesPartMgrs[wellIdx]->centerLineOfWellBranches());
}
return NULL;
}

View File

@ -21,6 +21,7 @@
#include "RimEclipseWellCollection.h"
#include "cvfCollection.h"
#include "cvfVector3.h"
namespace cvf
{
@ -46,6 +47,8 @@ public:
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex);
void updatePipeResultColor(size_t frameIndex);
const std::vector< std::vector <cvf::Vec3d> >* centerLineOfWellBranches(int wellIdx);
private:
caf::PdmPointer<RimEclipseView> m_reservoirView;
cvf::ref<cvf::Transform> m_scaleTransform;

View File

@ -97,10 +97,10 @@ void RivWellPipesPartMgr::buildWellPipeParts()
m_wellBranches.clear();
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
m_pipeBranchesCLCoords.clear();
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
calculateWellPipeCenterline(pipeBranchesCLCoords, pipeBranchesCellIds);
calculateWellPipeCenterline(m_pipeBranchesCLCoords, pipeBranchesCellIds);
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize();
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
@ -119,7 +119,7 @@ void RivWellPipesPartMgr::buildWellPipeParts()
pbd.m_pipeGeomGenerator->setPipeColor( m_rimWell->wellPipeColor());
cvf::ref<cvf::Vec3dArray> cvfCoords = new cvf::Vec3dArray;
cvfCoords->assign(pipeBranchesCLCoords[brIdx]);
cvfCoords->assign(m_pipeBranchesCLCoords[brIdx]);
// Scale the centerline coordinates using the Z-scale transform of the grid and correct for the display offset.
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid();

View File

@ -53,6 +53,7 @@ public:
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex);
void updatePipeResultColor(size_t frameIndex);
const std::vector< std::vector <cvf::Vec3d> >& centerLineOfWellBranches() { return m_pipeBranchesCLCoords;}
private:
caf::PdmPointer<RimEclipseView> m_rimReservoirView;
@ -89,4 +90,6 @@ private:
cvf::ref<cvf::ScalarMapper> m_scalarMapper;
cvf::ref<cvf::Effect> m_scalarMapperSurfaceEffect;
cvf::ref<cvf::Effect> m_scalarMapperMeshEffect;
std::vector< std::vector <cvf::Vec3d> > m_pipeBranchesCLCoords;
};