mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1056 Added cell edge picking text info
This commit is contained in:
parent
392e08a2ab
commit
4a9fec49bf
@ -414,7 +414,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
if (eclipseView->hasUserRequestedAnimation() && eclipseView->cellEdgeResult()->hasResult())
|
||||
{
|
||||
double min, max;
|
||||
QString cellEdgeName = eclipseView->cellEdgeResult()->resultVariable();
|
||||
QString cellEdgeName = eclipseView->cellEdgeResult()->resultVariableUiName();
|
||||
eclipseView->cellEdgeResult()->minMaxCellEdgeValues(min, max);
|
||||
infoText += QString("<b>Cell Edge Property:</b> %1 ").arg(cellEdgeName);
|
||||
infoText += QString("<table border=0 cellspacing=5 >"
|
||||
|
@ -528,6 +528,21 @@ QString RimCellEdgeColors::resultVariable() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimCellEdgeColors::resultVariableUiName() const
|
||||
{
|
||||
if (isUsingSingleVariable())
|
||||
{
|
||||
return m_singleVarEdgeResultColors->resultVariableUiName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_resultVariable;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
|
||||
void setResultVariable(const QString& variableName);
|
||||
QString resultVariable() const;
|
||||
QString resultVariableUiName() const;
|
||||
|
||||
caf::PdmField<bool> enableCellEdgeColors;
|
||||
|
||||
|
@ -989,7 +989,7 @@ void RimEclipseView::updateLegends()
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend());
|
||||
this->cellEdgeResult()->legendConfig()->setTitle(cvfqt::Utils::toString(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariable()));
|
||||
this->cellEdgeResult()->legendConfig()->setTitle(cvfqt::Utils::toString(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiName()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -516,33 +516,42 @@ QString RiuResultTextBuilder::cellEdgeResultDetails()
|
||||
|
||||
if (m_reservoirView->cellEdgeResult()->hasResult())
|
||||
{
|
||||
std::vector<RimCellEdgeMetaData> metaData;
|
||||
m_reservoirView->cellEdgeResult()->cellEdgeMetaData(&metaData);
|
||||
|
||||
std::set<size_t> uniqueResultIndices;
|
||||
|
||||
text += "-- Cell edge result data --\n";
|
||||
for (int idx = 0; idx < 6; idx++)
|
||||
|
||||
if (m_reservoirView->cellEdgeResult()->isUsingSingleVariable())
|
||||
{
|
||||
size_t resultIndex = metaData[idx].m_resultIndex;
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T) continue;
|
||||
text += cellResultText(m_reservoirView->cellEdgeResult()->singleVarEdgeResultColors());
|
||||
text += "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<RimCellEdgeMetaData> metaData;
|
||||
m_reservoirView->cellEdgeResult()->cellEdgeMetaData(&metaData);
|
||||
|
||||
std::set<size_t> uniqueResultIndices;
|
||||
|
||||
for (int idx = 0; idx < 6; idx++)
|
||||
{
|
||||
size_t resultIndex = metaData[idx].m_resultIndex;
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T) continue;
|
||||
|
||||
if (uniqueResultIndices.find(resultIndex) != uniqueResultIndices.end()) continue;
|
||||
if (uniqueResultIndices.find(resultIndex) != uniqueResultIndices.end()) continue;
|
||||
|
||||
size_t adjustedTimeStep = m_timeStepIndex;
|
||||
if (metaData[idx].m_isStatic)
|
||||
{
|
||||
adjustedTimeStep = 0;
|
||||
}
|
||||
size_t adjustedTimeStep = m_timeStepIndex;
|
||||
if (metaData[idx].m_isStatic)
|
||||
{
|
||||
adjustedTimeStep = 0;
|
||||
}
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel());
|
||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->reservoirData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex);
|
||||
if (resultAccessor.notNull())
|
||||
{
|
||||
double scalarValue = resultAccessor->cellScalar(m_cellIndex);
|
||||
text.append(QString("%1 : %2\n").arg(metaData[idx].m_resultVariable).arg(scalarValue));
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel());
|
||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->reservoirData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex);
|
||||
if (resultAccessor.notNull())
|
||||
{
|
||||
double scalarValue = resultAccessor->cellScalar(m_cellIndex);
|
||||
text.append(QString("%1 : %2\n").arg(metaData[idx].m_resultVariable).arg(scalarValue));
|
||||
|
||||
uniqueResultIndices.insert(resultIndex);
|
||||
uniqueResultIndices.insert(resultIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user