mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#2545 Move fields from public to private
This commit is contained in:
parent
bb0f026644
commit
ef2179f1ba
@ -104,9 +104,9 @@ void RicfExportProperty::execute()
|
||||
m_eclipseKeyword = m_propertyName;
|
||||
}
|
||||
|
||||
view->cellResult->setResultType(m_type());
|
||||
view->cellResult->setResultVariable(m_propertyName());
|
||||
view->cellResult()->setResultType(m_type());
|
||||
view->cellResult()->setResultVariable(m_propertyName());
|
||||
view->loadDataAndUpdate();
|
||||
|
||||
RifEclipseInputFileTools::writeBinaryResultToTextFile(filePath, eclipseCase->eclipseCaseData(), m_timeStepIndex, view->cellResult, m_eclipseKeyword, m_undefinedValue);
|
||||
RifEclipseInputFileTools::writeBinaryResultToTextFile(filePath, eclipseCase->eclipseCaseData(), m_timeStepIndex, view->cellResult(), m_eclipseKeyword, m_undefinedValue);
|
||||
}
|
||||
|
@ -105,15 +105,15 @@ void RicfExportSimWellCompletions::execute()
|
||||
std::vector<RimSimWellInView*> simWells;
|
||||
if (m_wellPathNames().empty())
|
||||
{
|
||||
std::copy(view->wellCollection->wells.begin(),
|
||||
view->wellCollection->wells.end(),
|
||||
std::copy(view->wellCollection()->wells.begin(),
|
||||
view->wellCollection()->wells.end(),
|
||||
std::back_inserter(simWells));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QString& wellPathName : m_wellPathNames())
|
||||
{
|
||||
RimSimWellInView* simWell = view->wellCollection->findWell(wellPathName);
|
||||
RimSimWellInView* simWell = view->wellCollection()->findWell(wellPathName);
|
||||
if (simWell)
|
||||
{
|
||||
simWells.push_back(simWell);
|
||||
|
@ -119,7 +119,7 @@ void RicEclipsePropertyFilterFeatureImpl::setDefaults(RimEclipsePropertyFilter*
|
||||
propertyFilter->firstAncestorOrThisOfTypeAsserted(reservoirView);
|
||||
|
||||
propertyFilter->resultDefinition->setEclipseCase(reservoirView->eclipseCase());
|
||||
propertyFilter->resultDefinition->simpleCopy(reservoirView->cellResult);
|
||||
propertyFilter->resultDefinition->simpleCopy(reservoirView->cellResult());
|
||||
|
||||
propertyFilter->resultDefinition->loadResult();
|
||||
propertyFilter->setToDefaultValues();
|
||||
|
@ -45,7 +45,7 @@ bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled()
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(view);
|
||||
if (!eclView) return false;
|
||||
|
||||
RimEclipseCellColors* cellColors = eclView->cellResult().p();
|
||||
RimEclipseCellColors* cellColors = eclView->cellResult();
|
||||
if (!cellColors) return false;
|
||||
|
||||
if (RiaDefines::isPerCellFaceResult(cellColors->resultVariable())) return false;
|
||||
|
@ -62,7 +62,7 @@ bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(view);
|
||||
if (!eclView) return false;
|
||||
|
||||
RimSimWellInView* simWellFromWellPath = eclView->wellCollection->findWell(wellPathCollection[0]->associatedSimulationWellName());
|
||||
RimSimWellInView* simWellFromWellPath = eclView->wellCollection()->findWell(wellPathCollection[0]->associatedSimulationWellName());
|
||||
|
||||
if (simWellFromWellPath)
|
||||
{
|
||||
@ -96,7 +96,7 @@ void RicShowWellAllocationPlotFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(view);
|
||||
if (!eclView) return;
|
||||
|
||||
simWell = eclView->wellCollection->findWell(wellPathCollection[0]->associatedSimulationWellName());
|
||||
simWell = eclView->wellCollection()->findWell(wellPathCollection[0]->associatedSimulationWellName());
|
||||
if (!simWell) return;
|
||||
}
|
||||
else return;
|
||||
|
@ -75,7 +75,7 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (activeView)
|
||||
{
|
||||
activeView->fractureColors->setDefaultResultName();
|
||||
activeView->fractureColors()->setDefaultResultName();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (activeView)
|
||||
{
|
||||
activeView->fractureColors->setDefaultResultName();
|
||||
activeView->fractureColors()->setDefaultResultName();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void RicNewWellPathFractureFeature::addFracture(RimWellPath* wellPath, double me
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (activeView)
|
||||
{
|
||||
activeView->fractureColors->setDefaultResultName();
|
||||
activeView->fractureColors()->setDefaultResultName();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ RivWellFracturePartMgr::~RivWellFracturePartMgr()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* model, const RimEclipseView& eclView)
|
||||
{
|
||||
if (!m_rimFracture->isChecked() || !eclView.fractureColors->isChecked()) return;
|
||||
if (!m_rimFracture->isChecked() || !eclView.fractureColors()->isChecked()) return;
|
||||
|
||||
if (!m_rimFracture->fractureTemplate()) return;
|
||||
|
||||
@ -96,7 +96,7 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* mod
|
||||
|
||||
if (stimPlanFracTemplate)
|
||||
{
|
||||
if (eclView.fractureColors->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR)
|
||||
if (eclView.fractureColors()->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR)
|
||||
{
|
||||
auto part = createStimPlanElementColorSurfacePart(eclView);
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
@ -107,7 +107,7 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* mod
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
}
|
||||
|
||||
if (eclView.fractureColors->showStimPlanMesh())
|
||||
if (eclView.fractureColors()->showStimPlanMesh())
|
||||
{
|
||||
auto part = createStimPlanMeshPart(eclView);
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
@ -249,7 +249,7 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
|
||||
else if (stimPlanTemplate)
|
||||
{
|
||||
const RigFractureCell* cell = getFractureCellAtDomainCoord(domainIntersectionPoint);
|
||||
RimStimPlanColors* stimPlanColors = activeView.fractureColors;
|
||||
RimStimPlanColors* stimPlanColors = activeView.fractureColors();
|
||||
|
||||
QString condValueText = cell ? QString::number(cell->getConductivtyValue()) : "-";
|
||||
QString iText = cell ? QString::number(cell->getI()) : "-";
|
||||
@ -356,7 +356,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc
|
||||
surfacePart->setDrawable(geo.p());
|
||||
surfacePart->setSourceInfo(new RivObjectSourceInfo(m_rimFracture));
|
||||
|
||||
cvf::Color4f fractureColor = cvf::Color4f(activeView.fractureColors->defaultColor());
|
||||
cvf::Color4f fractureColor = cvf::Color4f(activeView.fractureColors()->defaultColor());
|
||||
|
||||
RimLegendConfig* legendConfig = nullptr;
|
||||
if (activeView.fractureColors() && activeView.fractureColors()->isChecked())
|
||||
@ -368,7 +368,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc
|
||||
{
|
||||
cvf::Color3ub resultColor = cvf::Color3ub(RiaColorTables::undefinedCellColor());
|
||||
|
||||
if (activeView.fractureColors->uiResultName() == RiaDefines::conductivityResultName())
|
||||
if (activeView.fractureColors()->uiResultName() == RiaDefines::conductivityResultName())
|
||||
{
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = dynamic_cast<RimEllipseFractureTemplate*>(m_rimFracture->fractureTemplate());
|
||||
if (ellipseFractureTemplate)
|
||||
@ -437,7 +437,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
||||
std::vector<double> perNodeResultValues(nodeCoords.size(), HUGE_VAL);
|
||||
{
|
||||
size_t idx = 0;
|
||||
const std::vector<std::vector<double> > dataToPlot = stimPlanFracTemplate->resultValues(activeView.fractureColors->uiResultName(), activeView.fractureColors->unit(), stimPlanFracTemplate->activeTimeStepIndex());
|
||||
const std::vector<std::vector<double> > dataToPlot = stimPlanFracTemplate->resultValues(activeView.fractureColors()->uiResultName(), activeView.fractureColors()->unit(), stimPlanFracTemplate->activeTimeStepIndex());
|
||||
for (const std::vector<double>& dataAtY : dataToPlot)
|
||||
{
|
||||
for (double val : dataAtY)
|
||||
@ -507,7 +507,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
||||
{
|
||||
// No result is mapped, show the entire StimPlan surface with default color
|
||||
|
||||
return createSingleColorSurfacePart(triangleIndices, nodeCoords, activeView.fractureColors->defaultColor());
|
||||
return createSingleColorSurfacePart(triangleIndices, nodeCoords, activeView.fractureColors()->defaultColor());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -564,8 +564,8 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
||||
|
||||
scalarMapper = legendConfig->scalarMapper();
|
||||
|
||||
QString resultNameFromColors = activeView.fractureColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors->unit();
|
||||
QString resultNameFromColors = activeView.fractureColors()->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors()->unit();
|
||||
|
||||
std::vector<double> prCellResults = stimPlanFracTemplate->fractureGridResults(resultNameFromColors,
|
||||
resultUnitFromColors,
|
||||
@ -651,7 +651,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
||||
{
|
||||
// No result is mapped, show the entire StimPlan surface with default color
|
||||
|
||||
return createSingleColorSurfacePart(triIndicesToInclude, nodeDisplayCoords, activeView.fractureColors->defaultColor());
|
||||
return createSingleColorSurfacePart(triIndicesToInclude, nodeDisplayCoords, activeView.fractureColors()->defaultColor());
|
||||
}
|
||||
}
|
||||
|
||||
@ -874,8 +874,8 @@ cvf::ref<cvf::DrawableGeo> RivWellFracturePartMgr::createStimPlanMeshDrawable(Ri
|
||||
std::vector<RigFractureCell> stimPlanCells = stimPlanFracTemplate->fractureGrid()->fractureCells();
|
||||
std::vector<cvf::Vec3f> stimPlanMeshVertices;
|
||||
|
||||
QString resultNameFromColors = activeView.fractureColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors->unit();
|
||||
QString resultNameFromColors = activeView.fractureColors()->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors()->unit();
|
||||
|
||||
std::vector<double> prCellResults = stimPlanFracTemplate->fractureGridResults(resultNameFromColors,
|
||||
resultUnitFromColors,
|
||||
|
@ -332,7 +332,7 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
{
|
||||
if (setAllShowMeshToFalseOnAllEclipseViews)
|
||||
{
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(false);
|
||||
eclipseView->fractureColors()->setShowStimPlanMesh(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -340,9 +340,9 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
std::map<RimStimPlanFractureTemplate*, bool> stimPlanFractureTemplatesInView;
|
||||
|
||||
std::vector<RimFracture*> fractures;
|
||||
if (eclipseView->wellCollection)
|
||||
if (eclipseView->wellCollection())
|
||||
{
|
||||
eclipseView->wellCollection->descendantsIncludingThisOfType(fractures);
|
||||
eclipseView->wellCollection()->descendantsIncludingThisOfType(fractures);
|
||||
}
|
||||
if (fractures.empty()) continue;
|
||||
|
||||
@ -361,7 +361,7 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
|
||||
if (stimPlanFractureTemplatesInView.size() == 1)
|
||||
{
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(templateIt->first->showStimPlanMesh());
|
||||
eclipseView->fractureColors()->setShowStimPlanMesh(templateIt->first->showStimPlanMesh());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -376,11 +376,11 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
}
|
||||
if (anySetShowStimPlanMeshIsSetToFalse)
|
||||
{
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(false);
|
||||
eclipseView->fractureColors()->setShowStimPlanMesh(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(true);
|
||||
eclipseView->fractureColors()->setShowStimPlanMesh(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
|
||||
// Todo: Must update all views using this fracture template
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (activeView) activeView->fractureColors->loadDataAndUpdate();
|
||||
if (activeView) activeView->fractureColors()->loadDataAndUpdate();
|
||||
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews()
|
||||
if (reservoirViews[i])
|
||||
{
|
||||
// As new result might have been introduced, update all editors connected
|
||||
reservoirViews[i]->cellResult->updateConnectedEditors();
|
||||
reservoirViews[i]->cellResult()->updateConnectedEditors();
|
||||
|
||||
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
|
||||
// a full display model rebuild is required
|
||||
|
@ -109,38 +109,38 @@ RimEclipseView::RimEclipseView()
|
||||
|
||||
CAF_PDM_InitObject("Reservoir View", ":/3DView16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&cellResult, "GridCellResult", "Cell Result", ":/CellResult.png", "", "");
|
||||
cellResult = new RimEclipseCellColors();
|
||||
cellResult.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_cellResult, "GridCellResult", "Cell Result", ":/CellResult.png", "", "");
|
||||
m_cellResult = new RimEclipseCellColors();
|
||||
m_cellResult.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&cellEdgeResult, "GridCellEdgeResult", "Cell Edge Result", ":/EdgeResult_1.png", "", "");
|
||||
cellEdgeResult = new RimCellEdgeColors();
|
||||
cellEdgeResult.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_cellEdgeResult, "GridCellEdgeResult", "Cell Edge Result", ":/EdgeResult_1.png", "", "");
|
||||
m_cellEdgeResult = new RimCellEdgeColors();
|
||||
m_cellEdgeResult.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&faultResultSettings, "FaultResultSettings", "Separate Fault Result", "", "", "");
|
||||
faultResultSettings = new RimEclipseFaultColors();
|
||||
faultResultSettings.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_faultResultSettings, "FaultResultSettings", "Separate Fault Result", "", "", "");
|
||||
m_faultResultSettings = new RimEclipseFaultColors();
|
||||
m_faultResultSettings.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fractureColors, "StimPlanColors", "Fracture", "", "", "");
|
||||
fractureColors = new RimStimPlanColors();
|
||||
fractureColors.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_fractureColors, "StimPlanColors", "Fracture", "", "", "");
|
||||
m_fractureColors = new RimStimPlanColors();
|
||||
m_fractureColors.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wellCollection, "WellCollection", "Simulation Wells", "", "", "");
|
||||
wellCollection = new RimSimWellInViewCollection;
|
||||
wellCollection.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellCollection, "WellCollection", "Simulation Wells", "", "", "");
|
||||
m_wellCollection = new RimSimWellInViewCollection;
|
||||
m_wellCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&faultCollection, "FaultCollection", "Faults", "", "", "");
|
||||
faultCollection = new RimFaultInViewCollection;
|
||||
faultCollection.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_faultCollection, "FaultCollection", "Faults", "", "", "");
|
||||
m_faultCollection = new RimFaultInViewCollection;
|
||||
m_faultCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_propertyFilterCollection, "PropertyFilters", "Property Filters", "", "", "");
|
||||
m_propertyFilterCollection = new RimEclipsePropertyFilterCollection();
|
||||
m_propertyFilterCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
// Visualization fields
|
||||
CAF_PDM_InitField(&showMainGrid, "ShowMainGrid", true, "Show Main Grid", "", "", "");
|
||||
CAF_PDM_InitField(&showInactiveCells, "ShowInactiveCells", false, "Show Inactive Cells", "", "", "");
|
||||
CAF_PDM_InitField(&showInvalidCells, "ShowInvalidCells", false, "Show Invalid Cells", "", "", "");
|
||||
CAF_PDM_InitField(&m_showMainGrid, "ShowMainGrid", true, "Show Main Grid", "", "", "");
|
||||
CAF_PDM_InitField(&m_showInactiveCells, "ShowInactiveCells", false, "Show Inactive Cells", "", "", "");
|
||||
CAF_PDM_InitField(&m_showInvalidCells, "ShowInvalidCells", false, "Show Invalid Cells", "", "", "");
|
||||
|
||||
this->cellResult()->setReservoirView(this);
|
||||
|
||||
@ -174,6 +174,54 @@ RimEclipseView::~RimEclipseView()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseCellColors* RimEclipseView::cellResult() const
|
||||
{
|
||||
return m_cellResult;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellEdgeColors* RimEclipseView::cellEdgeResult() const
|
||||
{
|
||||
return m_cellEdgeResult;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseFaultColors* RimEclipseView::faultResultSettings() const
|
||||
{
|
||||
return m_faultResultSettings;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimStimPlanColors* RimEclipseView::fractureColors() const
|
||||
{
|
||||
return m_fractureColors;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSimWellInViewCollection* RimEclipseView::wellCollection() const
|
||||
{
|
||||
return m_wellCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInViewCollection* RimEclipseView::faultCollection() const
|
||||
{
|
||||
return m_faultCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Clamp the current timestep to actual possibilities
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -216,14 +264,14 @@ void RimEclipseView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
{
|
||||
Rim3dView::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
if (changedField == &showInvalidCells)
|
||||
if (changedField == &m_showInvalidCells)
|
||||
{
|
||||
this->scheduleGeometryRegen(INACTIVE);
|
||||
this->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if (changedField == &showInactiveCells)
|
||||
else if (changedField == &m_showInactiveCells)
|
||||
{
|
||||
this->updateGridBoxData();
|
||||
|
||||
@ -232,7 +280,7 @@ void RimEclipseView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if (changedField == &showMainGrid)
|
||||
else if (changedField == &m_showMainGrid)
|
||||
{
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
@ -324,7 +372,7 @@ void RimEclipseView::createDisplayModel()
|
||||
// The parts are still cached in the RivReservoir geometry and friends
|
||||
m_viewer->removeAllFrames();
|
||||
|
||||
wellCollection->scheduleIsWellPipesVisibleRecalculation();
|
||||
wellCollection()->scheduleIsWellPipesVisibleRecalculation();
|
||||
|
||||
// Create vector of grid indices to render
|
||||
std::vector<size_t> gridIndices;
|
||||
@ -427,38 +475,13 @@ void RimEclipseView::createDisplayModel()
|
||||
m_crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
|
||||
// Compute triangle count, Debug only
|
||||
/*
|
||||
if (false)
|
||||
{
|
||||
size_t totalTriangleCount = 0;
|
||||
{
|
||||
size_t mIdx;
|
||||
for (mIdx = 0; mIdx < frameModels.size(); mIdx++)
|
||||
{
|
||||
cvf::Collection<cvf::Part> partCollection;
|
||||
frameModels.at(mIdx)->allParts(&partCollection);
|
||||
|
||||
size_t modelTriangleCount = 0;
|
||||
size_t pIdx;
|
||||
for (pIdx = 0; pIdx < partCollection.size(); pIdx++)
|
||||
{
|
||||
modelTriangleCount += partCollection.at(pIdx)->drawable()->triangleCount();
|
||||
}
|
||||
|
||||
totalTriangleCount += modelTriangleCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
// Well path model
|
||||
|
||||
m_wellPathPipeVizModel->removeAllParts();
|
||||
|
||||
// NB! StimPlan legend colors must be updated before well path geometry is added to the model
|
||||
// as the fracture geometry depends on the StimPlan legend colors
|
||||
fractureColors->updateLegendData();
|
||||
fractureColors()->updateLegendData();
|
||||
|
||||
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
|
||||
|
||||
@ -731,7 +754,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
// Invisible Wells are marked as read only when "show wells intersecting visible cells" is enabled
|
||||
// Visibility of wells differ betweeen time steps, so trigger a rebuild of tree state items
|
||||
wellCollection->updateConnectedEditors();
|
||||
wellCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -760,7 +783,7 @@ void RimEclipseView::onLoadDataAndUpdate()
|
||||
this->cellEdgeResult()->loadResult();
|
||||
|
||||
this->faultResultSettings()->customFaultResult()->loadResult();
|
||||
this->fractureColors->loadDataAndUpdate();
|
||||
this->fractureColors()->loadDataAndUpdate();
|
||||
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
@ -866,14 +889,14 @@ void RimEclipseView::updateDisplayModelVisibility()
|
||||
{
|
||||
Rim3dView::updateDisplayModelVisibility();
|
||||
|
||||
faultCollection->updateConnectedEditors();
|
||||
faultCollection()->updateConnectedEditors();
|
||||
|
||||
// This is required to update the read-only state of simulation wells
|
||||
// when a range filter is manipulated and visible simulation wells might change
|
||||
//
|
||||
// The visibility is controlled by RimEclipseWell::defineUiTreeOrdering
|
||||
// updateConnectedEditors will call recursively on child objects
|
||||
wellCollection->updateConnectedEditors();
|
||||
wellCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -883,7 +906,7 @@ RigCaseCellResultsData* RimEclipseView::currentGridCellResults()
|
||||
{
|
||||
if (m_eclipseCase)
|
||||
{
|
||||
return m_eclipseCase->results(cellResult->porosityModel());
|
||||
return m_eclipseCase->results(cellResult()->porosityModel());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -898,7 +921,7 @@ RigActiveCellInfo* RimEclipseView::currentActiveCellInfo()
|
||||
m_eclipseCase->eclipseCaseData()
|
||||
)
|
||||
{
|
||||
return m_eclipseCase->eclipseCaseData()->activeCellInfo(cellResult->porosityModel());
|
||||
return m_eclipseCase->eclipseCaseData()->activeCellInfo(cellResult()->porosityModel());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -1035,7 +1058,7 @@ void RimEclipseView::updateLegends()
|
||||
RimLegendConfig* stimPlanLegend = fractureColors()->activeLegend();
|
||||
if (stimPlanLegend)
|
||||
{
|
||||
fractureColors->updateLegendData();
|
||||
fractureColors()->updateLegendData();
|
||||
|
||||
if (fractureColors()->isChecked() && stimPlanLegend->legend())
|
||||
{
|
||||
@ -1308,7 +1331,7 @@ void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
|
||||
{
|
||||
bool isDependingOnCompletionType = false;
|
||||
|
||||
if (cellResult->isCompletionTypeSelected())
|
||||
if (cellResult()->isCompletionTypeSelected())
|
||||
{
|
||||
isDependingOnCompletionType = true;
|
||||
}
|
||||
@ -1361,9 +1384,9 @@ void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
Rim3dView::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
|
||||
caf::PdmUiGroup* cellGroup = uiOrdering.addNewGroup("Cell Visibility");
|
||||
cellGroup->add(&showMainGrid);
|
||||
cellGroup->add(&showInactiveCells);
|
||||
cellGroup->add(&showInvalidCells);
|
||||
cellGroup->add(&m_showMainGrid);
|
||||
cellGroup->add(&m_showInactiveCells);
|
||||
cellGroup->add(&m_showInvalidCells);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1392,7 +1415,7 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
}
|
||||
|
||||
uiTreeOrdering.add(faultCollection());
|
||||
uiTreeOrdering.add(m_crossSectionCollection());
|
||||
uiTreeOrdering.add(crossSectionCollection());
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
@ -1454,15 +1477,15 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
|
||||
|
||||
if (this->eclipsePropertyFilterCollection()->hasActiveDynamicFilters()) return true;
|
||||
|
||||
if (this->wellCollection->hasVisibleWellPipes()) return true;
|
||||
if (this->wellCollection()->hasVisibleWellPipes()) return true;
|
||||
|
||||
if (this->cellResult()->isTernarySaturationSelected()) return true;
|
||||
|
||||
if (this->faultResultSettings->showCustomFaultResult())
|
||||
if (this->faultResultSettings()->showCustomFaultResult())
|
||||
{
|
||||
if (this->faultResultSettings->customFaultResult()->hasDynamicResult()) return true;
|
||||
if (this->faultResultSettings()->customFaultResult()->hasDynamicResult()) return true;
|
||||
|
||||
if (this->faultResultSettings->customFaultResult()->isTernarySaturationSelected()) return true;
|
||||
if (this->faultResultSettings()->customFaultResult()->isTernarySaturationSelected()) return true;
|
||||
}
|
||||
|
||||
if (this->wellPathCollection()->anyWellsContainingPerforationIntervals()) return true;
|
||||
@ -1607,7 +1630,7 @@ void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalV
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseView::showActiveCellsOnly()
|
||||
{
|
||||
return !showInactiveCells;
|
||||
return !m_showInactiveCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1675,6 +1698,30 @@ bool RimEclipseView::isUsingFormationNames() const
|
||||
return eclipsePropertyFilterCollection()->isUsingFormationNames();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseView::showInvalidCells() const
|
||||
{
|
||||
return m_showInvalidCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseView::showInactiveCells() const
|
||||
{
|
||||
return m_showInactiveCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseView::showMainGrid() const
|
||||
{
|
||||
return m_showMainGrid;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -75,24 +75,19 @@ class RimEclipseView : public RimGridView
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimEclipseView(void);
|
||||
virtual ~RimEclipseView(void);
|
||||
RimEclipseView();
|
||||
virtual ~RimEclipseView();
|
||||
|
||||
// Fields containing child objects :
|
||||
|
||||
caf::PdmChildField<RimEclipseCellColors*> cellResult;
|
||||
caf::PdmChildField<RimCellEdgeColors*> cellEdgeResult;
|
||||
caf::PdmChildField<RimEclipseFaultColors*> faultResultSettings;
|
||||
caf::PdmChildField<RimStimPlanColors*> fractureColors;
|
||||
|
||||
caf::PdmChildField<RimSimWellInViewCollection*> wellCollection;
|
||||
caf::PdmChildField<RimFaultInViewCollection*> faultCollection;
|
||||
|
||||
// Fields
|
||||
|
||||
caf::PdmField<bool> showInvalidCells;
|
||||
caf::PdmField<bool> showInactiveCells;
|
||||
caf::PdmField<bool> showMainGrid;
|
||||
RimEclipseCellColors* cellResult() const;
|
||||
RimCellEdgeColors* cellEdgeResult() const;
|
||||
RimEclipseFaultColors* faultResultSettings() const;
|
||||
RimStimPlanColors* fractureColors() const;
|
||||
RimSimWellInViewCollection* wellCollection() const;
|
||||
RimFaultInViewCollection* faultCollection() const;
|
||||
|
||||
bool showInvalidCells() const;
|
||||
bool showInactiveCells() const;
|
||||
bool showMainGrid() const;
|
||||
|
||||
// Access internal objects
|
||||
virtual const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
||||
@ -113,7 +108,7 @@ public:
|
||||
|
||||
// Display model generation
|
||||
|
||||
bool isTimeStepDependentDataVisible() const;
|
||||
bool isTimeStepDependentDataVisible() const override;
|
||||
|
||||
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
||||
void scheduleReservoirGridGeometryRegen();
|
||||
@ -173,6 +168,18 @@ private:
|
||||
void setVisibleGridPartsWatertight();
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showInvalidCells;
|
||||
caf::PdmField<bool> m_showInactiveCells;
|
||||
caf::PdmField<bool> m_showMainGrid;
|
||||
|
||||
caf::PdmChildField<RimEclipseCellColors*> m_cellResult;
|
||||
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
||||
caf::PdmChildField<RimEclipseFaultColors*> m_faultResultSettings;
|
||||
caf::PdmChildField<RimStimPlanColors*> m_fractureColors;
|
||||
|
||||
caf::PdmChildField<RimSimWellInViewCollection*> m_wellCollection;
|
||||
caf::PdmChildField<RimFaultInViewCollection*> m_faultCollection;
|
||||
|
||||
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
||||
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
||||
|
||||
@ -183,4 +190,3 @@ private:
|
||||
|
||||
std::vector<RivCellSetEnum> m_visibleGridParts;
|
||||
};
|
||||
|
||||
|
@ -360,7 +360,7 @@ RimSimWellInViewCollection* RimIntersection::simulationWellCollection()
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
return eclipseView->wellCollection;
|
||||
return eclipseView->wellCollection();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
@ -546,7 +546,7 @@ public:
|
||||
if (m_currentReservoir->reservoirViews[i])
|
||||
{
|
||||
// As new result might have been introduced, update all editors connected
|
||||
m_currentReservoir->reservoirViews[i]->cellResult->updateConnectedEditors();
|
||||
m_currentReservoir->reservoirViews[i]->cellResult()->updateConnectedEditors();
|
||||
|
||||
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
|
||||
// a full display model rebuild is required
|
||||
|
@ -686,7 +686,7 @@ public:
|
||||
if (m_currentReservoir->reservoirViews[i])
|
||||
{
|
||||
// As new result might have been introduced, update all editors connected
|
||||
m_currentReservoir->reservoirViews[i]->cellResult->updateConnectedEditors();
|
||||
m_currentReservoir->reservoirViews[i]->cellResult()->updateConnectedEditors();
|
||||
|
||||
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
|
||||
// a full display model rebuild is required
|
||||
@ -1050,7 +1050,7 @@ public:
|
||||
if (m_currentReservoir->reservoirViews[i])
|
||||
{
|
||||
// As new result might have been introduced, update all editors connected
|
||||
m_currentReservoir->reservoirViews[i]->cellResult->updateConnectedEditors();
|
||||
m_currentReservoir->reservoirViews[i]->cellResult()->updateConnectedEditors();
|
||||
|
||||
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
|
||||
// a full display model rebuild is required
|
||||
|
@ -147,8 +147,8 @@ void RiuExportMultipleSnapshotsWidget::addSnapshotItemFromActiveView()
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(activeView);
|
||||
if (eclipseView)
|
||||
{
|
||||
multiSnapshot->eclipseResultType = eclipseView->cellResult->resultType();
|
||||
multiSnapshot->selectedEclipseResults.v().push_back(eclipseView->cellResult->resultVariable());
|
||||
multiSnapshot->eclipseResultType = eclipseView->cellResult()->resultType();
|
||||
multiSnapshot->selectedEclipseResults.v().push_back(eclipseView->cellResult()->resultVariable());
|
||||
|
||||
}
|
||||
multiSnapshot->timeStepStart = activeView->currentTimeStep();
|
||||
|
@ -1479,7 +1479,7 @@ void RiuMainWindow::slotToggleFaultLabelsAction(bool showLabels)
|
||||
RimEclipseView* activeRiv = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (!activeRiv) return;
|
||||
|
||||
activeRiv->faultCollection->showFaultLabel.setValueWithFieldChanged(showLabels);
|
||||
activeRiv->faultCollection()->showFaultLabel.setValueWithFieldChanged(showLabels);
|
||||
|
||||
refreshDrawStyleActions();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user