mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Convert to enum class
This commit is contained in:
@@ -166,38 +166,42 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
|
||||
|
||||
// The following calls will read results from file in preparation for the queries below
|
||||
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( RiaDefines::MATRIX_MODEL );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "RS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "RV" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PVTNUM" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
|
||||
|
||||
cvf::ref<RigResultAccessor> rsAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"RS" ) );
|
||||
cvf::ref<RigResultAccessor> rvAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"RV" ) );
|
||||
cvf::ref<RigResultAccessor> pressureAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"PRESSURE" ) );
|
||||
cvf::ref<RigResultAccessor> pvtnumAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||
"PVTNUM" ) );
|
||||
|
||||
RiuPvtPlotPanel::CellValues cellValues;
|
||||
|
||||
@@ -161,9 +161,12 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
|
||||
|
||||
// Make sure we load the results that we'll query below
|
||||
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( RiaDefines::MATRIX_MODEL );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "SATNUM" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "SATNUM" ) );
|
||||
|
||||
// Fetch SWAT and SGAS cell values for the selected cell
|
||||
cvf::ref<RigResultAccessor> swatAccessor =
|
||||
@@ -171,21 +174,21 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SWAT" ) );
|
||||
cvf::ref<RigResultAccessor> sgasAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SGAS" ) );
|
||||
cvf::ref<RigResultAccessor> satnumAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||
"SATNUM" ) );
|
||||
const double cellSWAT = swatAccessor.notNull() ? swatAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
const double cellSGAS = sgasAccessor.notNull() ? sgasAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
|
||||
@@ -323,7 +323,7 @@ QString RiuResultTextBuilder::faultResultDetails()
|
||||
if ( m_viewWithFaultsSettings && m_viewWithFaultsSettings->faultResultSettings()->hasValidCustomResult() )
|
||||
{
|
||||
if ( m_viewWithFaultsSettings->faultResultSettings()->customFaultResult()->resultType() !=
|
||||
RiaDefines::ALLEN_DIAGRAMS )
|
||||
RiaDefines::ResultCatType::ALLEN_DIAGRAMS )
|
||||
{
|
||||
text += "Fault result data:\n";
|
||||
this->appendTextFromResultColors( eclipseCaseData,
|
||||
@@ -457,11 +457,11 @@ QString RiuResultTextBuilder::nncResultText()
|
||||
|
||||
const std::vector<double>* nncValues = nullptr;
|
||||
|
||||
if ( resultType == RiaDefines::STATIC_NATIVE )
|
||||
if ( resultType == RiaDefines::ResultCatType::STATIC_NATIVE )
|
||||
{
|
||||
nncValues = nncData->staticConnectionScalarResult( eclipseResultAddress );
|
||||
}
|
||||
else if ( resultType == RiaDefines::DYNAMIC_NATIVE )
|
||||
else if ( resultType == RiaDefines::ResultCatType::DYNAMIC_NATIVE )
|
||||
{
|
||||
if ( m_eclResDef.notNull() && m_eclResDef->eclipseCase() )
|
||||
{
|
||||
@@ -478,7 +478,7 @@ QString RiuResultTextBuilder::nncResultText()
|
||||
text = QString( "%1 : %2" ).arg( resultVar ).arg( scalarValue );
|
||||
}
|
||||
|
||||
if ( resultType == RiaDefines::ALLEN_DIAGRAMS )
|
||||
if ( resultType == RiaDefines::ResultCatType::ALLEN_DIAGRAMS )
|
||||
{
|
||||
nncValues = nncData->staticConnectionScalarResult( eclipseResultAddress );
|
||||
QString resultValueText;
|
||||
@@ -540,30 +540,33 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
|
||||
RigCaseCellResultsData* gridCellResults = resultColors->currentGridCellResults();
|
||||
if ( gridCellResults )
|
||||
{
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ) );
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectX =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SOIL" ) );
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectY =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SGAS" ) );
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectZ =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SWAT" ) );
|
||||
|
||||
double scalarValue = 0.0;
|
||||
@@ -894,9 +897,12 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
|
||||
RigCaseCellResultsData* gridCellResults = m_eclResDef->currentGridCellResults();
|
||||
if ( gridCellResults )
|
||||
{
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ) );
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
gridCellResults->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) );
|
||||
|
||||
RiaDefines::PorosityModelType porosityModel = eclResDef->porosityModel();
|
||||
|
||||
@@ -905,21 +911,21 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
|
||||
m_gridIndex,
|
||||
porosityModel,
|
||||
m_timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SOIL" ) );
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectY =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
m_gridIndex,
|
||||
porosityModel,
|
||||
m_timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SGAS" ) );
|
||||
cvf::ref<RigResultAccessor> dataAccessObjectZ =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
m_gridIndex,
|
||||
porosityModel,
|
||||
m_timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SWAT" ) );
|
||||
|
||||
double scalarValue = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user