mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2567 Fracture : Fix display of result values for all result types
This commit is contained in:
parent
2d01824ab3
commit
e386b031c1
@ -251,7 +251,14 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
|
|||||||
const RigFractureCell* cell = getFractureCellAtDomainCoord(domainIntersectionPoint);
|
const RigFractureCell* cell = getFractureCellAtDomainCoord(domainIntersectionPoint);
|
||||||
RimStimPlanColors* stimPlanColors = activeView.fractureColors();
|
RimStimPlanColors* stimPlanColors = activeView.fractureColors();
|
||||||
|
|
||||||
QString condValueText = cell ? QString::number(cell->getConductivtyValue()) : "-";
|
QString resultNameFromColors = activeView.fractureColors()->uiResultName();
|
||||||
|
QString resultUnitFromColors = activeView.fractureColors()->unit();
|
||||||
|
|
||||||
|
double resultValue = stimPlanTemplate->resultValueAtIJ(
|
||||||
|
resultNameFromColors, resultUnitFromColors, stimPlanTemplate->activeTimeStepIndex(), cell->getI(), cell->getJ());
|
||||||
|
|
||||||
|
QString resultValueText = QString("%1").arg(resultValue);
|
||||||
|
|
||||||
QString iText = cell ? QString::number(cell->getI()) : "-";
|
QString iText = cell ? QString::number(cell->getI()) : "-";
|
||||||
QString jText = cell ? QString::number(cell->getJ()) : "-";
|
QString jText = cell ? QString::number(cell->getJ()) : "-";
|
||||||
|
|
||||||
@ -260,7 +267,7 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
|
|||||||
|
|
||||||
QString resultName = stimPlanTemplate->mapUiResultNameToFileResultName(stimPlanColors->uiResultName());
|
QString resultName = stimPlanTemplate->mapUiResultNameToFileResultName(stimPlanColors->uiResultName());
|
||||||
text.append(resultName + " ");
|
text.append(resultName + " ");
|
||||||
text.append(condValueText + "\n");
|
text.append(resultValueText + "\n");
|
||||||
|
|
||||||
// Cell index
|
// Cell index
|
||||||
text.append("Cell Index: ");
|
text.append("Cell Index: ");
|
||||||
|
@ -648,6 +648,26 @@ bool RimStimPlanFractureTemplate::hasConductivity() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RimStimPlanFractureTemplate::resultValueAtIJ(const QString& uiResultName, const QString& unitName, size_t timeStepIndex, size_t i, size_t j)
|
||||||
|
{
|
||||||
|
auto values = resultValues(uiResultName, unitName, timeStepIndex);
|
||||||
|
|
||||||
|
if (values.empty()) return HUGE_VAL;
|
||||||
|
|
||||||
|
size_t adjustedI = i + 1;
|
||||||
|
size_t adjustedJ = j + 1;
|
||||||
|
|
||||||
|
if (adjustedI >= fractureGrid()->iCellCount() || adjustedJ >= fractureGrid()->jCellCount())
|
||||||
|
{
|
||||||
|
return HUGE_VAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return values[adjustedJ][adjustedI];
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
std::vector<std::vector<double>> resultValues(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const;
|
std::vector<std::vector<double>> resultValues(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const;
|
||||||
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||||
bool hasConductivity() const;
|
bool hasConductivity() const;
|
||||||
|
double resultValueAtIJ(const QString& uiResultName, const QString& unitName, size_t timeStepIndex, size_t i, size_t j);
|
||||||
|
|
||||||
void appendDataToResultStatistics(const QString& uiResultName,
|
void appendDataToResultStatistics(const QString& uiResultName,
|
||||||
const QString& unit,
|
const QString& unit,
|
||||||
|
Loading…
Reference in New Issue
Block a user