mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1068 Access mainGrid directly from RimEclipseView
This commit is contained in:
parent
45b581dc74
commit
0fd3bc8865
@ -19,7 +19,6 @@
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
@ -37,6 +36,7 @@
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "RivIntersectionBoxSourceInfo.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
#include "RivResultToTextureMapper.h"
|
||||
#include "RivScalarMapperUtils.h"
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
@ -49,7 +49,7 @@
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateDepth.h"
|
||||
#include "cvfRenderStatePoint.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
|
||||
|
||||
@ -353,7 +353,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
|
||||
if (eclipseView)
|
||||
{
|
||||
RigMainGrid* grid = NULL;
|
||||
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
grid = eclipseView->mainGrid();
|
||||
|
||||
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells());
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
@ -43,16 +42,18 @@
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
#include "RivTernaryTextureCoordsCreator.h"
|
||||
|
||||
#include "RiuGeoMechXfTensorResultAccessor.h"
|
||||
|
||||
#include "cafTensor3.h"
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfPrimitiveSetDirect.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateDepth.h"
|
||||
#include "cvfRenderStatePoint.h"
|
||||
#include "cafTensor3.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
#include "RiuGeoMechXfTensorResultAccessor.h"
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -737,7 +738,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
|
||||
if (eclipseView)
|
||||
{
|
||||
RigMainGrid* grid = NULL;
|
||||
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
grid = eclipseView->mainGrid();
|
||||
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells());
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "RivReservoirFaultsPartMgr.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -169,7 +168,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
scalarResultIndex = cellResultColors->scalarResultIndex();
|
||||
}
|
||||
|
||||
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* mainGrid = m_reservoirView->mainGrid();
|
||||
if (!(mainGrid && mainGrid->nncData()->hasScalarValues(scalarResultIndex)))
|
||||
{
|
||||
showNncs = false;
|
||||
|
@ -104,7 +104,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
|
||||
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();
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||
|
||||
for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -73,7 +72,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
||||
if (!m_rimReservoirView->eclipseCase()) return;
|
||||
if (!m_rimReservoirView->eclipseCase()->reservoirData()) return;
|
||||
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||
CVF_ASSERT(mainGrid);
|
||||
|
||||
RigSingleWellResultsData* rigWellResult = m_rimWell->wellResults();
|
||||
@ -152,7 +151,7 @@ cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf:
|
||||
vectorDrawable->setColors(colors.p());
|
||||
|
||||
cvf::GeometryBuilderTriangles builder;
|
||||
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize();
|
||||
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
|
||||
double cellRadius = m_rimReservoirView->wellCollection()->cellCenterSpheresScaleFactor() * characteristicCellSize;
|
||||
cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder);
|
||||
|
||||
|
@ -331,19 +331,19 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
QString iSize, jSize, kSize;
|
||||
QString zScale;
|
||||
|
||||
if (eclipseView->eclipseCase() && eclipseView->eclipseCase()->reservoirData() && eclipseView->eclipseCase()->reservoirData()->mainGrid())
|
||||
if (eclipseView->mainGrid())
|
||||
{
|
||||
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 frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
|
||||
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
|
||||
activeCellCountText += QString::number(mxActCellCount);
|
||||
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);
|
||||
|
||||
iSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountI());
|
||||
jSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountJ());
|
||||
kSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountK());
|
||||
iSize = QString::number(eclipseView->mainGrid()->cellCountI());
|
||||
jSize = QString::number(eclipseView->mainGrid()->cellCountJ());
|
||||
kSize = QString::number(eclipseView->mainGrid()->cellCountK());
|
||||
|
||||
zScale = QString::number(eclipseView->scaleZ());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user