mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4494 Grid Statistics : Update and compute data when visible cell changes from toggling LGR grids
This commit is contained in:
@@ -346,6 +346,8 @@ void RimEclipseView::updateScaleTransform()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::createDisplayModel()
|
||||
{
|
||||
clearReservoirCellVisibilities();
|
||||
|
||||
if (m_viewer.isNull()) return;
|
||||
|
||||
#if 0 // Debug info
|
||||
@@ -581,6 +583,8 @@ void RimEclipseView::createDisplayModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::updateCurrentTimeStep()
|
||||
{
|
||||
clearReservoirCellVisibilities();
|
||||
|
||||
m_propertyFilterCollection()->updateFromCurrentTimeStep();
|
||||
|
||||
updateLegends(); // To make sure the scalar mappers are set up correctly
|
||||
@@ -1095,7 +1099,7 @@ void RimEclipseView::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||
}
|
||||
}
|
||||
|
||||
m_currentReservoirCellVisibility = nullptr;
|
||||
clearReservoirCellVisibilities();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1104,7 +1108,7 @@ void RimEclipseView::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||
void RimEclipseView::scheduleReservoirGridGeometryRegen()
|
||||
{
|
||||
m_reservoirGridPartManager->clearGeometryCache();
|
||||
m_currentReservoirCellVisibility = nullptr;
|
||||
clearReservoirCellVisibilities();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1888,13 +1892,14 @@ void RimEclipseView::setOverridePropertyFilterCollection(RimEclipsePropertyFilte
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep)
|
||||
{
|
||||
size_t gridCount = this->eclipseCase()->eclipseCaseData()->gridCount();
|
||||
size_t cellCount = this->mainGrid()->globalCellArray().size();
|
||||
|
||||
totalVisibility->resize(cellCount);
|
||||
totalVisibility->setAll(false);
|
||||
|
||||
for (size_t gridIdx = 0; gridIdx < gridCount; ++gridIdx)
|
||||
std::vector<size_t> gridIndices = this->indicesToVisibleGrids();
|
||||
|
||||
for (auto gridIdx : gridIndices)
|
||||
{
|
||||
RigGridBase* grid = this->eclipseCase()->eclipseCaseData()->grid(gridIdx);
|
||||
int gridCellCount = static_cast<int>(grid->cellCount());
|
||||
|
||||
@@ -764,7 +764,7 @@ void RimGeoMechView::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||
viewLinker->scheduleGeometryRegenForDepViews(geometryType);
|
||||
}
|
||||
}
|
||||
m_currentReservoirCellVisibility = nullptr;
|
||||
clearReservoirCellVisibilities();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -427,6 +427,14 @@ RimGridCollection* RimGridView::gridCollection() const
|
||||
return m_gridCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::clearReservoirCellVisibilities()
|
||||
{
|
||||
m_currentReservoirCellVisibility = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -79,6 +79,8 @@ protected:
|
||||
|
||||
RimGridCollection* gridCollection() const;
|
||||
|
||||
void clearReservoirCellVisibilities();
|
||||
|
||||
protected: // Fields
|
||||
caf::PdmChildField<RimIntersectionCollection*> m_crossSectionCollection;
|
||||
caf::PdmChildField<Rim3dOverlayInfoConfig*> m_overlayInfoConfig;
|
||||
@@ -87,10 +89,8 @@ protected: // Fields
|
||||
caf::PdmChildField<RimGridCollection*> m_gridCollection;
|
||||
caf::PdmChildField<RimAnnotationInViewCollection*> m_annotationCollection;
|
||||
|
||||
protected:
|
||||
cvf::ref<cvf::UByteArray> m_currentReservoirCellVisibility;
|
||||
|
||||
private:
|
||||
cvf::ref<cvf::UByteArray> m_currentReservoirCellVisibility;
|
||||
RimViewLinker* viewLinkerIfMasterView() const;
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user