mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
@@ -27,6 +27,7 @@
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RimGeoMechCellColors.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RimFormationNames.h"
|
||||
|
||||
|
||||
|
||||
@@ -75,6 +76,7 @@ QString RiuFemResultTextBuilder::mainResultText()
|
||||
|
||||
QString topoText = this->topologyText("\n");
|
||||
text += topoText;
|
||||
appendDetails(text, formationDetails());
|
||||
text += "\n";
|
||||
|
||||
appendDetails(text, gridResultDetails());
|
||||
@@ -153,6 +155,46 @@ QString RiuFemResultTextBuilder::gridResultDetails()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiuFemResultTextBuilder::formationDetails()
|
||||
{
|
||||
|
||||
QString text;
|
||||
RimCase* rimCase = m_reservoirView->ownerCase();
|
||||
if(rimCase)
|
||||
{
|
||||
if(rimCase->activeFormationNames() && rimCase->activeFormationNames()->formationNamesData())
|
||||
{
|
||||
RigFormationNames* formNames = rimCase->activeFormationNames()->formationNamesData();
|
||||
|
||||
size_t k = cvf::UNDEFINED_SIZE_T;
|
||||
{
|
||||
RigGeoMechCaseData* geomData = m_reservoirView->geoMechCase()->geoMechData();
|
||||
if(geomData)
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
geomData->femParts()->part(m_gridIndex)->structGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
|
||||
}
|
||||
}
|
||||
|
||||
if(k != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
QString formName = formNames->formationNameFromKLayerIdx(k);
|
||||
if(!formName.isEmpty())
|
||||
{
|
||||
//text += "-- Formation details --\n";
|
||||
|
||||
text += QString("Formation Name: %1\n").arg(formName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -52,6 +52,7 @@ private:
|
||||
void appendDetails(QString& text, const QString& details);
|
||||
|
||||
QString gridResultDetails();
|
||||
QString formationDetails();
|
||||
|
||||
QString closestNodeResultText(RimGeoMechCellColors* resultColors);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimFormationNames.h"
|
||||
|
||||
|
||||
|
||||
@@ -109,6 +110,7 @@ QString RiuResultTextBuilder::mainResultText()
|
||||
|
||||
QString topoText = this->topologyText("\n");
|
||||
text += topoText;
|
||||
appendDetails(text, formationDetails());
|
||||
text += "\n";
|
||||
|
||||
appendDetails(text, nncDetails());
|
||||
@@ -228,6 +230,51 @@ QString RiuResultTextBuilder::faultResultDetails()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiuResultTextBuilder::formationDetails()
|
||||
{
|
||||
QString text;
|
||||
RimCase* rimCase = m_reservoirView->eclipseCase();
|
||||
if(rimCase)
|
||||
{
|
||||
if(rimCase->activeFormationNames() && rimCase->activeFormationNames()->formationNamesData())
|
||||
{
|
||||
RigFormationNames* formNames = rimCase->activeFormationNames()->formationNamesData();
|
||||
|
||||
size_t k = cvf::UNDEFINED_SIZE_T;
|
||||
{
|
||||
const RigCaseData* eclipseData = m_reservoirView->eclipseCase()->reservoirData();
|
||||
if(eclipseData)
|
||||
{
|
||||
if(m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
size_t i = cvf::UNDEFINED_SIZE_T;
|
||||
size_t j = cvf::UNDEFINED_SIZE_T;
|
||||
|
||||
eclipseData->grid(m_gridIndex)->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (k != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
QString formName = formNames->formationNameFromKLayerIdx(k);
|
||||
if(!formName.isEmpty())
|
||||
{
|
||||
//text += "-- Formation details --\n";
|
||||
|
||||
text += QString("Formation Name: %1\n").arg(formName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -54,6 +54,7 @@ private:
|
||||
|
||||
QString gridResultDetails();
|
||||
QString faultResultDetails();
|
||||
QString formationDetails();
|
||||
QString cellEdgeResultDetails();
|
||||
QString nncDetails();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user