mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2715 Add direct access to RigFemPartCollection from a GeoMechView
This commit is contained in:
parent
8383ee12cf
commit
a0e4f71138
@ -261,11 +261,11 @@ void RivGeoMechVizLogic::calculateCurrentTotalCellVisibility(cvf::UByteArray* to
|
|||||||
{
|
{
|
||||||
if (!m_geomechView->geoMechCase()) return;
|
if (!m_geomechView->geoMechCase()) return;
|
||||||
|
|
||||||
size_t gridCount = m_geomechView->geoMechCase()->geoMechData()->femParts()->partCount();
|
size_t gridCount = m_geomechView->femParts()->partCount();
|
||||||
|
|
||||||
if (gridCount == 0) return;
|
if (gridCount == 0) return;
|
||||||
|
|
||||||
RigFemPart* part = m_geomechView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* part = m_geomechView->femParts()->part(0);
|
||||||
int elmCount = part->elementCount();
|
int elmCount = part->elementCount();
|
||||||
|
|
||||||
totalVisibility->resize(elmCount);
|
totalVisibility->resize(elmCount);
|
||||||
|
@ -371,7 +371,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
|
|||||||
m_rimIntersectionBox->firstAncestorOrThisOfType(geoView);
|
m_rimIntersectionBox->firstAncestorOrThisOfType(geoView);
|
||||||
if (geoView)
|
if (geoView)
|
||||||
{
|
{
|
||||||
RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* femPart = geoView->femParts()->part(0);
|
||||||
return new RivFemIntersectionGrid(femPart);
|
return new RivFemIntersectionGrid(femPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1021,7 +1021,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
|
|||||||
m_rimCrossSection->firstAncestorOrThisOfType(geoView);
|
m_rimCrossSection->firstAncestorOrThisOfType(geoView);
|
||||||
if (geoView)
|
if (geoView)
|
||||||
{
|
{
|
||||||
RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* femPart = geoView->femParts()->part(0);
|
||||||
return new RivFemIntersectionGrid(femPart);
|
return new RivFemIntersectionGrid(femPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void RivTensorResultPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLi
|
|||||||
|
|
||||||
if (!m_rimReservoirView->tensorResults()->showTensors()) return;
|
if (!m_rimReservoirView->tensorResults()->showTensors()) return;
|
||||||
|
|
||||||
RigFemPartCollection* femParts = m_rimReservoirView->geoMechCase()->geoMechData()->femParts();
|
RigFemPartCollection* femParts = m_rimReservoirView->femParts();
|
||||||
if (!femParts) return;
|
if (!femParts) return;
|
||||||
|
|
||||||
std::vector<TensorVisualization> tensorVisualizations;
|
std::vector<TensorVisualization> tensorVisualizations;
|
||||||
|
@ -220,7 +220,7 @@ void RimGeoMechView::createDisplayModel()
|
|||||||
|
|
||||||
// Well path model
|
// Well path model
|
||||||
|
|
||||||
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
cvf::BoundingBox femBBox = femParts()->boundingBox();
|
||||||
|
|
||||||
m_wellPathPipeVizModel->removeAllParts();
|
m_wellPathPipeVizModel->removeAllParts();
|
||||||
addWellPathsToModel(m_wellPathPipeVizModel.p(), femBBox);
|
addWellPathsToModel(m_wellPathPipeVizModel.p(), femBBox);
|
||||||
@ -285,7 +285,7 @@ void RimGeoMechView::updateCurrentTimeStep()
|
|||||||
cvf::ref<cvf::ModelBasicList> wellPathModelBasicList = new cvf::ModelBasicList;
|
cvf::ref<cvf::ModelBasicList> wellPathModelBasicList = new cvf::ModelBasicList;
|
||||||
wellPathModelBasicList->setName(name);
|
wellPathModelBasicList->setName(name);
|
||||||
|
|
||||||
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
cvf::BoundingBox femBBox = femParts()->boundingBox();
|
||||||
addDynamicWellPathsToModel(wellPathModelBasicList.p(), femBBox);
|
addDynamicWellPathsToModel(wellPathModelBasicList.p(), femBBox);
|
||||||
|
|
||||||
frameScene->addModel(wellPathModelBasicList.p());
|
frameScene->addModel(wellPathModelBasicList.p());
|
||||||
@ -530,6 +530,32 @@ std::vector<RimLegendConfig*> RimGeoMechView::legendConfigs() const
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const RigFemPartCollection* RimGeoMechView::femParts() const
|
||||||
|
{
|
||||||
|
if (m_geomechCase && m_geomechCase->geoMechData())
|
||||||
|
{
|
||||||
|
return m_geomechCase->geoMechData()->femParts();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RigFemPartCollection* RimGeoMechView::femParts()
|
||||||
|
{
|
||||||
|
if (m_geomechCase && m_geomechCase->geoMechData())
|
||||||
|
{
|
||||||
|
return m_geomechCase->geoMechData()->femParts();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -32,17 +32,18 @@
|
|||||||
#include "cvfObject.h"
|
#include "cvfObject.h"
|
||||||
|
|
||||||
class RigFemPart;
|
class RigFemPart;
|
||||||
|
class RigFemPartCollection;
|
||||||
class Rim3dOverlayInfoConfig;
|
class Rim3dOverlayInfoConfig;
|
||||||
class RimCellRangeFilterCollection;
|
class RimCellRangeFilterCollection;
|
||||||
class RimGeoMechCase;
|
class RimGeoMechCase;
|
||||||
class RimGeoMechCellColors;
|
class RimGeoMechCellColors;
|
||||||
class RimGeoMechResultDefinition;
|
|
||||||
class RimGeoMechPropertyFilterCollection;
|
class RimGeoMechPropertyFilterCollection;
|
||||||
|
class RimGeoMechResultDefinition;
|
||||||
|
class RimRegularLegendConfig;
|
||||||
class RimTensorResults;
|
class RimTensorResults;
|
||||||
class RiuViewer;
|
class RiuViewer;
|
||||||
class RivGeoMechPartMgr;
|
class RivGeoMechPartMgr;
|
||||||
class RivGeoMechVizLogic;
|
class RivGeoMechVizLogic;
|
||||||
class RimRegularLegendConfig;
|
|
||||||
class RivTensorResultPartMgr;
|
class RivTensorResultPartMgr;
|
||||||
|
|
||||||
namespace cvf {
|
namespace cvf {
|
||||||
@ -95,6 +96,9 @@ public:
|
|||||||
|
|
||||||
std::vector<RimLegendConfig*> legendConfigs() const override;
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
||||||
|
|
||||||
|
const RigFemPartCollection* femParts() const;
|
||||||
|
RigFemPartCollection* femParts();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||||
virtual void onLoadDataAndUpdate() override;
|
virtual void onLoadDataAndUpdate() override;
|
||||||
|
@ -590,15 +590,15 @@ const RigCaseToCaseCellMapper* RimViewController::cellMapper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (masterGeomechView && masterGeomechView->geoMechCase()->geoMechData()
|
if (masterGeomechView && masterGeomechView->geoMechCase()->geoMechData()
|
||||||
&& masterGeomechView->geoMechCase()->geoMechData()->femParts()->partCount())
|
&& masterGeomechView->femParts()->partCount())
|
||||||
{
|
{
|
||||||
masterFemPart = masterGeomechView->geoMechCase()->geoMechData()->femParts()->part(0);
|
masterFemPart = masterGeomechView->femParts()->part(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dependGeomechView && dependGeomechView->geoMechCase()->geoMechData()
|
if (dependGeomechView && dependGeomechView->geoMechCase()->geoMechData()
|
||||||
&& dependGeomechView->geoMechCase()->geoMechData()->femParts()->partCount())
|
&& dependGeomechView->femParts()->partCount())
|
||||||
{
|
{
|
||||||
dependFemPart = dependGeomechView->geoMechCase()->geoMechData()->femParts()->part(0);
|
dependFemPart = dependGeomechView->femParts()->part(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have the correct mapping already, return it.
|
// If we have the correct mapping already, return it.
|
||||||
@ -839,7 +839,7 @@ bool RimViewController::isRangeFilterControlPossible() const
|
|||||||
if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase()->geoMechData())
|
if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase()->geoMechData())
|
||||||
{
|
{
|
||||||
RigMainGrid* eclGrid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
RigMainGrid* eclGrid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||||
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* femPart = geomView->femParts()->part(0);
|
||||||
|
|
||||||
if (eclGrid && femPart)
|
if (eclGrid && femPart)
|
||||||
{
|
{
|
||||||
@ -871,7 +871,7 @@ bool RimViewController::isRangeFilterMappingApliccable() const
|
|||||||
if (eclipseView->eclipseCase()->eclipseCaseData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData())
|
if (eclipseView->eclipseCase()->eclipseCaseData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData())
|
||||||
{
|
{
|
||||||
RigMainGrid* eclGrid = eclipseView->mainGrid();
|
RigMainGrid* eclGrid = eclipseView->mainGrid();
|
||||||
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* femPart = geomView->femParts()->part(0);
|
||||||
|
|
||||||
if (eclGrid && femPart)
|
if (eclGrid && femPart)
|
||||||
{
|
{
|
||||||
@ -988,7 +988,7 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa
|
|||||||
if (eclipseMasterView->mainGrid())
|
if (eclipseMasterView->mainGrid())
|
||||||
{
|
{
|
||||||
RigMainGrid* srcEclGrid = eclipseMasterView->mainGrid();
|
RigMainGrid* srcEclGrid = eclipseMasterView->mainGrid();
|
||||||
RigFemPart* dstFemPart = depGeomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* dstFemPart = depGeomView->femParts()->part(0);
|
||||||
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
||||||
{
|
{
|
||||||
RimCellRangeFilter* srcRFilter = sourceFilterCollection->rangeFilters[rfIdx];
|
RimCellRangeFilter* srcRFilter = sourceFilterCollection->rangeFilters[rfIdx];
|
||||||
@ -1002,7 +1002,7 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa
|
|||||||
{
|
{
|
||||||
if (depEclView->mainGrid())
|
if (depEclView->mainGrid())
|
||||||
{
|
{
|
||||||
RigFemPart* srcFemPart = geoMasterView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* srcFemPart = geoMasterView->femParts()->part(0);
|
||||||
RigMainGrid* dstEclGrid = depEclView->mainGrid();
|
RigMainGrid* dstEclGrid = depEclView->mainGrid();
|
||||||
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
||||||
{
|
{
|
||||||
|
@ -616,7 +616,7 @@ public:
|
|||||||
{
|
{
|
||||||
const RiuGeoMechSelectionItem* geomechItem = static_cast<const RiuGeoMechSelectionItem*>(item);
|
const RiuGeoMechSelectionItem* geomechItem = static_cast<const RiuGeoMechSelectionItem*>(item);
|
||||||
|
|
||||||
geomechItem->m_view->geoMechCase()->geoMechData()->femParts()->part(geomechItem->m_gridIndex)->structGrid()->ijkFromCellIndex(geomechItem->m_cellIndex, &i, &j, &k);
|
geomechItem->m_view->femParts()->part(geomechItem->m_gridIndex)->structGrid()->ijkFromCellIndex(geomechItem->m_cellIndex, &i, &j, &k);
|
||||||
gridIndex = geomechItem->m_gridIndex;
|
gridIndex = geomechItem->m_gridIndex;
|
||||||
caseId = geomechItem->m_view->geoMechCase()->caseId;
|
caseId = geomechItem->m_view->geoMechCase()->caseId;
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ void RiuMohrsCirclePlot::queryData(RimGeoMechView* geoMechView, size_t gridIndex
|
|||||||
CVF_ASSERT(geoMechView);
|
CVF_ASSERT(geoMechView);
|
||||||
m_sourceGeoMechViewOfLastPlot = geoMechView;
|
m_sourceGeoMechViewOfLastPlot = geoMechView;
|
||||||
|
|
||||||
RigFemPart* femPart = geoMechView->geoMechCase()->geoMechData()->femParts()->part(gridIndex);
|
RigFemPart* femPart = geoMechView->femParts()->part(gridIndex);
|
||||||
if (femPart->elementType(elmIndex) != HEX8P) return;
|
if (femPart->elementType(elmIndex) != HEX8P) return;
|
||||||
|
|
||||||
int frameIdx = geoMechView->currentTimeStep();
|
int frameIdx = geoMechView->currentTimeStep();
|
||||||
|
@ -1045,7 +1045,7 @@ void RiuViewerCommands::ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size
|
|||||||
|
|
||||||
if (geomView && geomView->geoMechCase())
|
if (geomView && geomView->geoMechCase())
|
||||||
{
|
{
|
||||||
geomView->geoMechCase()->geoMechData()->femParts()->part(gridIdx)->structGrid()->ijkFromCellIndex(cellIndex, i, j, k);
|
geomView->femParts()->part(gridIdx)->structGrid()->ijkFromCellIndex(cellIndex, i, j, k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user