#1068 Access mainGrid directly from RimEclipseView

This commit is contained in:
Magne Sjaastad
2017-01-09 10:51:06 +01:00
parent 45b581dc74
commit 0fd3bc8865
6 changed files with 19 additions and 20 deletions

View File

@@ -19,7 +19,6 @@
#include "RivIntersectionBoxPartMgr.h" #include "RivIntersectionBoxPartMgr.h"
#include "RigCaseCellResultsData.h" #include "RigCaseCellResultsData.h"
#include "RigCaseData.h"
#include "RigFemPartCollection.h" #include "RigFemPartCollection.h"
#include "RigFemPartResultsCollection.h" #include "RigFemPartResultsCollection.h"
#include "RigGeoMechCaseData.h" #include "RigGeoMechCaseData.h"
@@ -37,6 +36,7 @@
#include "RimTernaryLegendConfig.h" #include "RimTernaryLegendConfig.h"
#include "RivIntersectionBoxSourceInfo.h" #include "RivIntersectionBoxSourceInfo.h"
#include "RivIntersectionPartMgr.h"
#include "RivResultToTextureMapper.h" #include "RivResultToTextureMapper.h"
#include "RivScalarMapperUtils.h" #include "RivScalarMapperUtils.h"
#include "RivTernaryScalarMapper.h" #include "RivTernaryScalarMapper.h"
@@ -49,7 +49,7 @@
#include "cvfRenderState_FF.h" #include "cvfRenderState_FF.h"
#include "cvfRenderStateDepth.h" #include "cvfRenderStateDepth.h"
#include "cvfRenderStatePoint.h" #include "cvfRenderStatePoint.h"
#include "RivIntersectionPartMgr.h" #include "cvfStructGridGeometryGenerator.h"
@@ -353,7 +353,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
if (eclipseView) if (eclipseView)
{ {
RigMainGrid* grid = NULL; RigMainGrid* grid = NULL;
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells()); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells());
} }

View File

@@ -20,7 +20,6 @@
#include "RivIntersectionPartMgr.h" #include "RivIntersectionPartMgr.h"
#include "RigCaseCellResultsData.h" #include "RigCaseCellResultsData.h"
#include "RigCaseData.h"
#include "RigFemPartCollection.h" #include "RigFemPartCollection.h"
#include "RigFemPartResultsCollection.h" #include "RigFemPartResultsCollection.h"
#include "RigGeoMechCaseData.h" #include "RigGeoMechCaseData.h"
@@ -43,16 +42,18 @@
#include "RivTernaryScalarMapper.h" #include "RivTernaryScalarMapper.h"
#include "RivTernaryTextureCoordsCreator.h" #include "RivTernaryTextureCoordsCreator.h"
#include "RiuGeoMechXfTensorResultAccessor.h"
#include "cafTensor3.h"
#include "cvfDrawableGeo.h" #include "cvfDrawableGeo.h"
#include "cvfGeometryTools.h"
#include "cvfModelBasicList.h" #include "cvfModelBasicList.h"
#include "cvfPart.h" #include "cvfPart.h"
#include "cvfPrimitiveSetDirect.h" #include "cvfPrimitiveSetDirect.h"
#include "cvfRenderState_FF.h" #include "cvfRenderState_FF.h"
#include "cvfRenderStateDepth.h" #include "cvfRenderStateDepth.h"
#include "cvfRenderStatePoint.h" #include "cvfRenderStatePoint.h"
#include "cafTensor3.h" #include "cvfStructGridGeometryGenerator.h"
#include "cvfGeometryTools.h"
#include "RiuGeoMechXfTensorResultAccessor.h"
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -737,7 +738,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
if (eclipseView) if (eclipseView)
{ {
RigMainGrid* grid = NULL; RigMainGrid* grid = NULL;
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells());
} }

View File

@@ -19,7 +19,6 @@
#include "RivReservoirFaultsPartMgr.h" #include "RivReservoirFaultsPartMgr.h"
#include "RigCaseData.h"
#include "RigMainGrid.h" #include "RigMainGrid.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
@@ -169,7 +168,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
scalarResultIndex = cellResultColors->scalarResultIndex(); scalarResultIndex = cellResultColors->scalarResultIndex();
} }
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid(); RigMainGrid* mainGrid = m_reservoirView->mainGrid();
if (!(mainGrid && mainGrid->nncData()->hasScalarValues(scalarResultIndex))) if (!(mainGrid && mainGrid->nncData()->hasScalarValues(scalarResultIndex)))
{ {
showNncs = false; showNncs = false;

View File

@@ -104,7 +104,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(m_rimWell.p(), m_pipeBranchesCLCoords, pipeBranchesCellIds); RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(m_rimWell.p(), m_pipeBranchesCLCoords, pipeBranchesCellIds);
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize; double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
@@ -127,7 +127,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
cvfCoords->assign(m_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. // 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(); const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx) for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx)
{ {

View File

@@ -20,7 +20,6 @@
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RigCaseData.h"
#include "RigMainGrid.h" #include "RigMainGrid.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
@@ -73,7 +72,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
if (!m_rimReservoirView->eclipseCase()) return; if (!m_rimReservoirView->eclipseCase()) return;
if (!m_rimReservoirView->eclipseCase()->reservoirData()) return; if (!m_rimReservoirView->eclipseCase()->reservoirData()) return;
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid(); const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
CVF_ASSERT(mainGrid); CVF_ASSERT(mainGrid);
RigSingleWellResultsData* rigWellResult = m_rimWell->wellResults(); RigSingleWellResultsData* rigWellResult = m_rimWell->wellResults();
@@ -152,7 +151,7 @@ cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf:
vectorDrawable->setColors(colors.p()); vectorDrawable->setColors(colors.p());
cvf::GeometryBuilderTriangles builder; cvf::GeometryBuilderTriangles builder;
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
double cellRadius = m_rimReservoirView->wellCollection()->cellCenterSpheresScaleFactor() * characteristicCellSize; double cellRadius = m_rimReservoirView->wellCollection()->cellCenterSpheresScaleFactor() * characteristicCellSize;
cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder); cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder);

View File

@@ -331,19 +331,19 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
QString iSize, jSize, kSize; QString iSize, jSize, kSize;
QString zScale; QString zScale;
if (eclipseView->eclipseCase() && eclipseView->eclipseCase()->reservoirData() && eclipseView->eclipseCase()->reservoirData()->mainGrid()) if (eclipseView->mainGrid())
{ {
caseName = eclipseView->eclipseCase()->caseUserDescription(); caseName = eclipseView->eclipseCase()->caseUserDescription();
totCellCount = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->globalCellArray().size()); totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size());
size_t mxActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount(); size_t mxActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount();
size_t frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount(); size_t frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
if (frActCellCount > 0) activeCellCountText += "Matrix : "; if (frActCellCount > 0) activeCellCountText += "Matrix : ";
activeCellCountText += QString::number(mxActCellCount); activeCellCountText += QString::number(mxActCellCount);
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount); if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);
iSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountI()); iSize = QString::number(eclipseView->mainGrid()->cellCountI());
jSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountJ()); jSize = QString::number(eclipseView->mainGrid()->cellCountJ());
kSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountK()); kSize = QString::number(eclipseView->mainGrid()->cellCountK());
zScale = QString::number(eclipseView->scaleZ()); zScale = QString::number(eclipseView->scaleZ());