From 3f88fe197a04fb67bb7cdf969c27f93dc5e0ea1a Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 23 Apr 2020 23:25:22 +0200 Subject: [PATCH] Convert to enum class --- .../Application/RiaApplication.cpp | 2 +- .../RiaCompletionTypeCalculationScheduler.cpp | 2 +- ApplicationCode/Application/RiaDefines.cpp | 20 +- ApplicationCode/Application/RiaDefines.h | 2 +- .../Application/RiaMemoryCleanup.cpp | 2 +- .../Tools/RiaImportEclipseCaseTools.cpp | 2 +- .../RicExportFractureCompletionsImpl.cpp | 12 +- ...ellPathExportCompletionDataFeatureImpl.cpp | 90 ++-- .../RicExportEclipseSectorModelUi.cpp | 19 +- .../RicShowContributingWellsFeatureImpl.cpp | 2 +- ...icCreateSaturationPressurePlotsFeature.cpp | 7 +- .../Commands/RicNewContourMapViewFeature.cpp | 2 +- .../RifEclipseInputFileTools.cpp | 4 +- .../FileInterface/RifReaderEclipseOutput.cpp | 10 +- .../FileInterface/RifReaderMockModel.cpp | 7 +- .../RiaGrpcNNCPropertiesService.cpp | 2 +- .../RivNNCGeometryGenerator.cpp | 9 +- .../RivReservoirFaultsPartMgr.cpp | 2 +- .../Flow/RimFlowCharacteristicsPlot.cpp | 2 +- .../Flow/RimWellPlotTools.cpp | 7 +- .../RimGridCrossPlotDataSet.cpp | 10 +- .../RimSaturationPressurePlot.cpp | 10 +- .../RimSaturationPressurePlotCollection.cpp | 2 +- .../Rim3dOverlayInfoConfig.cpp | 56 +-- .../Rim3dWellLogExtractionCurve.cpp | 5 +- .../RimAdvancedSnapshotExportDefinition.cpp | 8 +- .../ProjectDataModel/RimCellEdgeColors.cpp | 11 +- .../ProjectDataModel/RimEclipseCase.cpp | 16 +- .../RimEclipseContourMapProjection.cpp | 37 +- .../RimEclipseInputProperty.cpp | 4 +- .../RimEclipsePropertyFilter.cpp | 2 +- .../RimEclipsePropertyFilterCollection.cpp | 3 +- .../ProjectDataModel/RimEclipseResultCase.cpp | 4 +- .../RimEclipseResultDefinition.cpp | 90 ++-- .../RimEclipseStatisticsCase.cpp | 76 +-- .../RimEclipseStatisticsCaseEvaluator.cpp | 2 +- .../RimEclipseStatisticsCaseEvaluator.h | 2 +- .../ProjectDataModel/RimEclipseView.cpp | 8 +- .../RimElementVectorResult.cpp | 27 +- .../RimRegularLegendConfig.cpp | 2 +- .../RimReservoirCellResultsStorage.cpp | 2 +- .../RimWellLogExtractionCurve.cpp | 2 +- .../ProjectDataModel/RimWellLogTrack.cpp | 32 +- .../RigCaseCellResultsData.cpp | 473 ++++++++++-------- .../RigEclipseResultAddress.h | 4 +- .../RigFlowDiagSolverInterface.cpp | 18 +- ...igNumberOfFloodedPoreVolumesCalculator.cpp | 8 +- .../RigResultAccessorFactory.cpp | 4 +- ...TofAccumulatedPhaseFractionsCalculator.cpp | 8 +- .../RigTofWellDistributionCalculator.cpp | 8 +- .../SocketInterface/RiaNNCCommands.cpp | 2 +- .../RiaPropertyDataCommands.cpp | 16 +- .../UnitTests/RifReaderEclipseOutput-Test.cpp | 8 +- .../UserInterface/RiuPvtPlotUpdater.cpp | 20 +- .../RiuRelativePermeabilityPlotUpdater.cpp | 15 +- .../UserInterface/RiuResultTextBuilder.cpp | 38 +- 56 files changed, 696 insertions(+), 542 deletions(-) diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index d92873c90b..b030a1f372 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -567,7 +567,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, // If load action is specified to recalculate statistics, do it now. // Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will // be clamped - if ( loadAction & int( ProjectLoadAction::PLA_CALCULATE_STATISTICS ) ) + if ( loadAction == ProjectLoadAction::PLA_CALCULATE_STATISTICS ) { for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ ) { diff --git a/ApplicationCode/Application/RiaCompletionTypeCalculationScheduler.cpp b/ApplicationCode/Application/RiaCompletionTypeCalculationScheduler.cpp index 99e6254258..11974e4e53 100644 --- a/ApplicationCode/Application/RiaCompletionTypeCalculationScheduler.cpp +++ b/ApplicationCode/Application/RiaCompletionTypeCalculationScheduler.cpp @@ -86,7 +86,7 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd { eclipseCase->eclipseCaseData() ->results( RiaDefines::MATRIX_MODEL ) - ->clearScalarResult( RiaDefines::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() ); + ->clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() ); // Delete virtual perforation transmissibilities, as these are the basis for the computation of completion type eclipseCase->eclipseCaseData()->setVirtualPerforationTransmissibilities( nullptr ); diff --git a/ApplicationCode/Application/RiaDefines.cpp b/ApplicationCode/Application/RiaDefines.cpp index 037162e062..29f124d129 100644 --- a/ApplicationCode/Application/RiaDefines.cpp +++ b/ApplicationCode/Application/RiaDefines.cpp @@ -27,16 +27,16 @@ namespace caf template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::DYNAMIC_NATIVE, "DYNAMIC_NATIVE", "Dynamic" ); - addItem( RiaDefines::STATIC_NATIVE, "STATIC_NATIVE", "Static" ); - addItem( RiaDefines::SOURSIMRL, "SOURSIMRL", "SourSimRL" ); - addItem( RiaDefines::GENERATED, "GENERATED", "Generated" ); - addItem( RiaDefines::INPUT_PROPERTY, "INPUT_PROPERTY", "Input Property" ); - addItem( RiaDefines::FORMATION_NAMES, "FORMATION_NAMES", "Formation Names" ); - addItem( RiaDefines::ALLEN_DIAGRAMS, "ALLEN_DIAGRAMS", "Allen Diagrams" ); - addItem( RiaDefines::FLOW_DIAGNOSTICS, "FLOW_DIAGNOSTICS", "Flow Diagnostics" ); - addItem( RiaDefines::INJECTION_FLOODING, "INJECTION_FLOODING", "Injection Flooding" ); - setDefault( RiaDefines::DYNAMIC_NATIVE ); + addItem( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "DYNAMIC_NATIVE", "Dynamic" ); + addItem( RiaDefines::ResultCatType::STATIC_NATIVE, "STATIC_NATIVE", "Static" ); + addItem( RiaDefines::ResultCatType::SOURSIMRL, "SOURSIMRL", "SourSimRL" ); + addItem( RiaDefines::ResultCatType::GENERATED, "GENERATED", "Generated" ); + addItem( RiaDefines::ResultCatType::INPUT_PROPERTY, "INPUT_PROPERTY", "Input Property" ); + addItem( RiaDefines::ResultCatType::FORMATION_NAMES, "FORMATION_NAMES", "Formation Names" ); + addItem( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, "ALLEN_DIAGRAMS", "Allen Diagrams" ); + addItem( RiaDefines::ResultCatType::FLOW_DIAGNOSTICS, "FLOW_DIAGNOSTICS", "Flow Diagnostics" ); + addItem( RiaDefines::ResultCatType::INJECTION_FLOODING, "INJECTION_FLOODING", "Injection Flooding" ); + setDefault( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); } template <> diff --git a/ApplicationCode/Application/RiaDefines.h b/ApplicationCode/Application/RiaDefines.h index 3f79b25b31..b3f9fa1fb2 100644 --- a/ApplicationCode/Application/RiaDefines.h +++ b/ApplicationCode/Application/RiaDefines.h @@ -25,7 +25,7 @@ namespace RiaDefines { -enum ResultCatType +enum class ResultCatType { DYNAMIC_NATIVE, STATIC_NATIVE, diff --git a/ApplicationCode/Application/RiaMemoryCleanup.cpp b/ApplicationCode/Application/RiaMemoryCleanup.cpp index c615b4a50e..33590187a0 100644 --- a/ApplicationCode/Application/RiaMemoryCleanup.cpp +++ b/ApplicationCode/Application/RiaMemoryCleanup.cpp @@ -254,7 +254,7 @@ QList RiaMemoryCleanup::calculateValueOptions( const caf const RigEclipseResultInfo* resInfo = caseData->resultInfo( resultAddr ); - QString posText = caf::AppEnum::uiTextFromIndex( resInfo->resultType() ); + QString posText = caf::AppEnum::uiText( resInfo->resultType() ); QString resultsText = QString( "%1, %2" ).arg( posText ).arg( resInfo->resultName() ); if ( inUse ) { diff --git a/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp b/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp index c1143770e4..cf4593c184 100644 --- a/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp +++ b/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp @@ -270,7 +270,7 @@ bool RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QString RimEclipseView* riv = rimInputReservoir->createAndAddReservoirView(); - riv->cellResult()->setResultType( RiaDefines::INPUT_PROPERTY ); + riv->cellResult()->setResultType( RiaDefines::ResultCatType::INPUT_PROPERTY ); riv->loadDataAndUpdate(); diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp index d20af077c5..80801823e5 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp @@ -192,7 +192,7 @@ std::vector if ( pdParams.performScaling ) { RigCaseCellResultsData* results = caseToApply->results( RiaDefines::MATRIX_MODEL ); - results->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) ); + results->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) ); } return generateCompdatValuesConst( caseToApply, @@ -266,8 +266,8 @@ std::vector RicExportFractureCompletionsImpl::generateCompdat const std::vector* currentMatrixPressures = nullptr; if ( performPressureDepletionScaling ) { - pressureResultVector = - &results->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) ); + pressureResultVector = &results->cellScalarResults( + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) ); CVF_ASSERT( !pressureResultVector->empty() ); if ( pdParams.pressureScalingTimeStep < static_cast( pressureResultVector->size() ) ) @@ -832,9 +832,9 @@ void RicExportFractureCompletionsImpl::outputIntermediateResultsText( QTextStrea bool RicExportFractureCompletionsImpl::loadResultsByName( RigCaseCellResultsData* cellResultsData, const std::vector& resultNames ) { - const std::vector resultCategorySearchOrder = {RiaDefines::STATIC_NATIVE, - RiaDefines::INPUT_PROPERTY, - RiaDefines::GENERATED}; + const std::vector resultCategorySearchOrder = {RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::ResultCatType::INPUT_PROPERTY, + RiaDefines::ResultCatType::GENERATED}; bool foundDataForAllResults = true; diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp index 888a20b56f..f61800c9db 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp @@ -1286,29 +1286,32 @@ CellDirection RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirec RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DX" ) ); cvf::ref dxAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DX" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DY" ) ); cvf::ref dyAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DY" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); cvf::ref dzAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DZ" ) ); double xLengthFraction = fabs( lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx( globalCellIndex ) ); double yLengthFraction = fabs( lengthsInCell.y() / dyAccessObject->cellScalarGlobIdx( globalCellIndex ) ); @@ -1345,54 +1348,60 @@ TransmissibilityData RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DX" ) ); cvf::ref dxAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DX" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DY" ) ); cvf::ref dyAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DY" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); cvf::ref dzAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DZ" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) ); cvf::ref permxAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMX" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) ); cvf::ref permyAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMY" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) ); cvf::ref permzAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMZ" ) ); if ( dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() || permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull() ) @@ -1404,14 +1413,15 @@ TransmissibilityData { // Trigger loading from file eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); cvf::ref ntgAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "NTG" ) ); if ( ntgAccessObject.notNull() ) { @@ -1495,13 +1505,14 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor( RimEclipseC double porosity = 0.0; { eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) ); cvf::ref poroAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PORO" ) ); if ( poroAccessObject.notNull() ) { @@ -1538,65 +1549,72 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DX" ) ); cvf::ref dxAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DX" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DY" ) ); cvf::ref dyAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DY" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); cvf::ref dzAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "DZ" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) ); cvf::ref permxAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMX" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) ); cvf::ref permyAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMY" ) ); eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) ); cvf::ref permzAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "PERMZ" ) ); double ntg = 1.0; if ( eclipseCase->results( RiaDefines::MATRIX_MODEL ) - ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ) ) + ->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ) ) { cvf::ref ntgAccessObject = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + "NTG" ) ); ntg = ntgAccessObject->cellScalarGlobIdx( globalCellIndex ); } diff --git a/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelUi.cpp b/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelUi.cpp index 704ff2d50a..e8f905ba24 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelUi.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelUi.cpp @@ -165,8 +165,9 @@ void RicExportEclipseSectorModelUi::setCaseData( RigEclipseCaseData* caseData /* { for ( QString keyword : mainKeywords() ) { - if ( caseData && caseData->results( RiaDefines::MATRIX_MODEL ) - ->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, keyword ) ) ) + if ( caseData && + caseData->results( RiaDefines::MATRIX_MODEL ) + ->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, keyword ) ) ) { selectedKeywords.v().push_back( keyword ); } @@ -177,8 +178,9 @@ void RicExportEclipseSectorModelUi::setCaseData( RigEclipseCaseData* caseData /* std::vector validSelectedKeywords; for ( QString keyword : selectedKeywords() ) { - if ( caseData && caseData->results( RiaDefines::MATRIX_MODEL ) - ->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, keyword ) ) ) + if ( caseData && + caseData->results( RiaDefines::MATRIX_MODEL ) + ->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, keyword ) ) ) { validSelectedKeywords.push_back( keyword ); } @@ -439,7 +441,8 @@ QList { RigCaseCellResultsData* resultData = m_caseData->results( RiaDefines::MATRIX_MODEL ); QList allOptions = - RimEclipseResultDefinition::calcOptionsForVariableUiFieldStandard( RiaDefines::STATIC_NATIVE, resultData ); + RimEclipseResultDefinition::calcOptionsForVariableUiFieldStandard( RiaDefines::ResultCatType::STATIC_NATIVE, + resultData ); std::set mainKeywords = this->mainKeywords(); for ( caf::PdmOptionItemInfo option : allOptions ) @@ -447,7 +450,7 @@ QList if ( mainKeywords.count( option.optionUiText() ) ) { if ( resultData->hasResultEntry( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, option.optionUiText() ) ) ) + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, option.optionUiText() ) ) ) { options.push_back( option ); } @@ -458,7 +461,7 @@ QList if ( !mainKeywords.count( option.optionUiText() ) && option.optionUiText() != "None" ) { if ( resultData->hasResultEntry( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, option.optionUiText() ) ) ) + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, option.optionUiText() ) ) ) { if ( option.optionUiText() == "ACTNUM" && exportGrid() ) { @@ -606,7 +609,7 @@ void RicExportEclipseSectorModelUi::removeInvalidKeywords() std::vector validKeywords; for ( QString keyword : selectedKeywords() ) { - if ( resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, keyword ) ) ) + if ( resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, keyword ) ) ) { validKeywords.push_back( keyword ); } diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp index b161ae62ca..3efe5dda44 100644 --- a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp @@ -109,7 +109,7 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim } viewToModify->setCurrentTimeStep( timeStep ); - viewToModify->cellResult()->setResultType( RiaDefines::FLOW_DIAGNOSTICS ); + viewToModify->cellResult()->setResultType( RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ); viewToModify->cellResult()->setResultVariable( "MaxFractionTracer" ); viewToModify->cellResult()->setFlowSolution( flowDiagSolution ); diff --git a/ApplicationCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp b/ApplicationCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp index 95a545858a..6ae2e78db4 100644 --- a/ApplicationCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp +++ b/ApplicationCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp @@ -79,19 +79,20 @@ std::vector { RigCaseCellResultsData* resultData = eclipseCaseData->results( RiaDefines::MATRIX_MODEL ); - if ( !resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) ) ) + if ( !resultData->hasResultEntry( + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) ) ) { RiaLogging::error( "CreateSaturationPressurePlots : PRESSURE is not available " ); return plots; } - if ( !resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PDEW" ) ) ) + if ( !resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PDEW" ) ) ) { RiaLogging::error( "CreateSaturationPressurePlots : PDEW is not available " ); return plots; } - if ( !resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PBUB" ) ) ) + if ( !resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PBUB" ) ) ) { RiaLogging::error( "CreateSaturationPressurePlots : PBUB is not available " ); return plots; diff --git a/ApplicationCode/Commands/RicNewContourMapViewFeature.cpp b/ApplicationCode/Commands/RicNewContourMapViewFeature.cpp index 847d907d11..e4c68a4587 100644 --- a/ApplicationCode/Commands/RicNewContourMapViewFeature.cpp +++ b/ApplicationCode/Commands/RicNewContourMapViewFeature.cpp @@ -235,7 +235,7 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap( // Set default values { - contourMap->cellResult()->setResultType( RiaDefines::DYNAMIC_NATIVE ); + contourMap->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); if ( RiaApplication::instance()->preferences()->loadAndShowSoil ) { diff --git a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp index 9b06a825e0..91bf1041e1 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp @@ -462,7 +462,7 @@ bool RifEclipseInputFileTools::exportKeywords( const QString& resul { std::vector resultValues; - RigEclipseResultAddress resAddr( RiaDefines::STATIC_NATIVE, keyword ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::STATIC_NATIVE, keyword ); if ( !cellResultsData->hasResultEntry( resAddr ) ) continue; cellResultsData->ensureKnownResultLoaded( resAddr ); @@ -910,7 +910,7 @@ bool RifEclipseInputFileTools::readDataFromKeyword( ecl_kw_type* eclipseK } } - RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::INPUT_PROPERTY, resultName ); caseData->results( RiaDefines::MATRIX_MODEL )->createResultEntry( resAddr, false ); auto newPropertyData = caseData->results( RiaDefines::MATRIX_MODEL )->modifiableCellScalarResultTimesteps( resAddr ); diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index 430e9a4117..8906cb99b6 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -597,7 +597,7 @@ void RifReaderEclipseOutput::setHdf5FileName( const QString& fileName ) for ( int i = 0; i < resultNames.size(); ++i ) { - RigEclipseResultAddress resAddr( RiaDefines::SOURSIMRL, resultNames[i] ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::SOURSIMRL, resultNames[i] ); matrixModelResults->createResultEntry( resAddr, false ); matrixModelResults->setTimeStepInfos( resAddr, timeStepInfos ); } @@ -965,7 +965,7 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid ) for ( int i = 0; i < matrixResultNames.size(); ++i ) { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, matrixResultNames[i] ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, matrixResultNames[i] ); matrixModelResults->createResultEntry( resAddr, false ); matrixModelResults->setTimeStepInfos( resAddr, timeStepInfos ); } @@ -982,7 +982,7 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid ) for ( int i = 0; i < fractureResultNames.size(); ++i ) { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, fractureResultNames[i] ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, fractureResultNames[i] ); fractureModelResults->createResultEntry( resAddr, false ); fractureModelResults->setTimeStepInfos( resAddr, timeStepInfos ); } @@ -1059,7 +1059,7 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid ) for ( int i = 0; i < matrixResultNames.size(); ++i ) { - RigEclipseResultAddress resAddr( RiaDefines::STATIC_NATIVE, matrixResultNames[i] ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::STATIC_NATIVE, matrixResultNames[i] ); matrixModelResults->createResultEntry( resAddr, false ); matrixModelResults->setTimeStepInfos( resAddr, staticTimeStepInfo ); } @@ -1078,7 +1078,7 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid ) for ( int i = 0; i < fractureResultNames.size(); ++i ) { - RigEclipseResultAddress resAddr( RiaDefines::STATIC_NATIVE, fractureResultNames[i] ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::STATIC_NATIVE, fractureResultNames[i] ); fractureModelResults->createResultEntry( resAddr, false ); fractureModelResults->setTimeStepInfos( resAddr, staticTimeStepInfo ); } diff --git a/ApplicationCode/FileInterface/RifReaderMockModel.cpp b/ApplicationCode/FileInterface/RifReaderMockModel.cpp index 9da44368e2..54d045532f 100644 --- a/ApplicationCode/FileInterface/RifReaderMockModel.cpp +++ b/ApplicationCode/FileInterface/RifReaderMockModel.cpp @@ -53,7 +53,8 @@ bool RifReaderMockModel::open( const QString& fileName, RigEclipseCaseData* ecli for ( size_t i = 0; i < m_reservoirBuilder.resultCount(); i++ ) { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, QString( "Dynamic_Result_%1" ).arg( i ) ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + QString( "Dynamic_Result_%1" ).arg( i ) ); cellResults->createResultEntry( resAddr, false ); cellResults->setTimeStepInfos( resAddr, timeStepInfos ); } @@ -71,7 +72,7 @@ bool RifReaderMockModel::open( const QString& fileName, RigEclipseCaseData* ecli int resIndex = 0; if ( i > 1 ) resIndex = i; - RigEclipseResultAddress resAddr( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::STATIC_NATIVE, QString( "Static_Result_%1%2" ).arg( resIndex ).arg( varEnd ) ); cellResults->createResultEntry( resAddr, false ); @@ -81,7 +82,7 @@ bool RifReaderMockModel::open( const QString& fileName, RigEclipseCaseData* ecli #define ADD_INPUT_PROPERTY( Name ) \ { \ QString resultName( Name ); \ - RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName ); \ + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::INPUT_PROPERTY, resultName ); \ cellResults->createResultEntry( resAddr, false ); \ cellResults->setTimeStepInfos( resAddr, staticResultTimeStepInfos ); \ cellResults->modifiableCellScalarResultTimesteps( resAddr )->resize( 1 ); \ diff --git a/ApplicationCode/GrpcInterface/RiaGrpcNNCPropertiesService.cpp b/ApplicationCode/GrpcInterface/RiaGrpcNNCPropertiesService.cpp index 6ec22178b4..4dfe30dad9 100644 --- a/ApplicationCode/GrpcInterface/RiaGrpcNNCPropertiesService.cpp +++ b/ApplicationCode/GrpcInterface/RiaGrpcNNCPropertiesService.cpp @@ -269,7 +269,7 @@ grpc::Status RiaGrpcNNCPropertiesService::GetAvailableNNCProperties( grpc::Serve //-------------------------------------------------------------------------------------------------- static bool scalarResultExistsOrCreate( RigCaseCellResultsData* results, QString propertyName ) { - RigEclipseResultAddress resAddr( RiaDefines::GENERATED, propertyName ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::GENERATED, propertyName ); if ( !results->ensureKnownResultLoaded( resAddr ) ) { diff --git a/ApplicationCode/ModelVisualization/RivNNCGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/RivNNCGeometryGenerator.cpp index 5d56de94ca..f185cba03d 100644 --- a/ApplicationCode/ModelVisualization/RivNNCGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/RivNNCGeometryGenerator.cpp @@ -163,16 +163,17 @@ void RivNNCGeometryGenerator::textureCoordinates( cvf::Vec2fArray* textureCoords->resize( numVertices ); cvf::Vec2f* rawPtr = textureCoords->ptr(); const std::vector* nncResultVals = nullptr; - if ( resultType == RiaDefines::STATIC_NATIVE || resultType == RiaDefines::FORMATION_NAMES || - resultType == RiaDefines::ALLEN_DIAGRAMS ) + if ( resultType == RiaDefines::ResultCatType::STATIC_NATIVE || + resultType == RiaDefines::ResultCatType::FORMATION_NAMES || + resultType == RiaDefines::ResultCatType::ALLEN_DIAGRAMS ) { nncResultVals = m_nncData->staticConnectionScalarResult( resVarAddr ); } - else if ( resultType == RiaDefines::DYNAMIC_NATIVE ) + else if ( resultType == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) { nncResultVals = m_nncData->dynamicConnectionScalarResult( resVarAddr, nativeTimeStepIndex ); } - else if ( resultType == RiaDefines::GENERATED ) + else if ( resultType == RiaDefines::ResultCatType::GENERATED ) { nncResultVals = m_nncData->generatedConnectionScalarResult( resVarAddr, nativeTimeStepIndex ); } diff --git a/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp index c6e8dc2e3b..3a4b11ad58 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp @@ -169,7 +169,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel( cvf::ModelBasicList* model ) eclipseResultAddress = cellResultColors->eclipseResultAddress(); } - if ( eclipseResultAddress.m_resultCatType == RiaDefines::ALLEN_DIAGRAMS ) + if ( eclipseResultAddress.m_resultCatType == RiaDefines::ResultCatType::ALLEN_DIAGRAMS ) { showCompleteNncGeo = true; } diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp index cfbc277cbe..34564a7a45 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp @@ -546,7 +546,7 @@ void RimFlowCharacteristicsPlot::fieldChangedByUi( const caf::PdmFieldHandle* ch if ( view != nullptr ) { view->faultCollection()->showFaultCollection = false; - view->cellResult()->setResultType( RiaDefines::FLOW_DIAGNOSTICS ); + view->cellResult()->setResultType( RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ); view->cellResult()->setFlowDiagTracerSelectionType( RimEclipseResultDefinition::FLOW_TR_BY_SELECTION ); view->cellResult()->setSelectedTracers( m_selectedTracerNames ); diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index 8b7cf91cf1..a70bc30899 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -116,9 +116,10 @@ std::pair for ( const auto& pressureDataName : PRESSURE_DATA_NAMES ) { if ( eclipseCaseData->results( RiaDefines::MATRIX_MODEL ) - ->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, pressureDataName ) ) ) + ->hasResultEntry( + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, pressureDataName ) ) ) { - return std::make_pair( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, pressureDataName ), + return std::make_pair( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, pressureDataName ), pressureDataName ); } } @@ -233,7 +234,7 @@ bool RimWellPlotTools::hasFlowData( RimEclipseResultCase* gridCase ) for ( const QString& channelName : FLOW_DATA_NAMES ) { if ( eclipseCaseData->results( RiaDefines::MATRIX_MODEL ) - ->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, channelName ) ) ) + ->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, channelName ) ) ) { return true; } diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp index 6c0ed3c3c8..e852dca573 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp @@ -164,7 +164,7 @@ void RimGridCrossPlotDataSet::setCellFilterView( RimGridView* cellFilterView ) { m_xAxisProperty->setResultType( resAddr.m_resultCatType ); m_xAxisProperty->setResultVariable( resAddr.m_resultName ); - m_yAxisProperty->setResultType( RiaDefines::STATIC_NATIVE ); + m_yAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); m_yAxisProperty->setResultVariable( "DEPTH" ); m_timeStep = eclipseView->currentTimeStep(); m_grouping = NO_GROUPING; @@ -1183,11 +1183,11 @@ void RimGridCrossPlotDataSet::configureForPressureSaturationCurves( RimEclipseRe m_case = eclipseCase; m_xAxisProperty->setEclipseCase( eclipseCase ); - m_xAxisProperty->setResultType( RiaDefines::DYNAMIC_NATIVE ); + m_xAxisProperty->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); m_xAxisProperty->setResultVariable( dynamicResultName ); m_yAxisProperty->setEclipseCase( eclipseCase ); - m_yAxisProperty->setResultType( RiaDefines::STATIC_NATIVE ); + m_yAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); m_yAxisProperty->setResultVariable( "DEPTH" ); m_grouping = NO_GROUPING; @@ -1298,10 +1298,10 @@ void RimGridCrossPlotDataSet::setDefaults() m_yAxisProperty->setEclipseCase( eclipseCase ); m_groupingProperty->setEclipseCase( eclipseCase ); - m_xAxisProperty->setResultType( RiaDefines::STATIC_NATIVE ); + m_xAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); m_xAxisProperty->setResultVariable( "PORO" ); - m_yAxisProperty->setResultType( RiaDefines::STATIC_NATIVE ); + m_yAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); m_yAxisProperty->setResultVariable( "PERMX" ); m_grouping = NO_GROUPING; diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlot.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlot.cpp index 99f9be4ff2..c5e2a117bb 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlot.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlot.cpp @@ -105,7 +105,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro RigCaseCellResultsData* caseCellResultsData = eclipseResultCase->eclipseCaseData()->results( porosityModel ); if ( caseCellResultsData ) { - RigEclipseResultAddress depthResultAddress( RiaDefines::STATIC_NATIVE, "DEPTH" ); + RigEclipseResultAddress depthResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH" ); double minDepth = 0.0; double maxDepth = 0.0; @@ -136,7 +136,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro { RimEclipseResultDefinition* resultDefinition = new RimEclipseResultDefinition(); resultDefinition->setEclipseCase( eclipseResultCase ); - resultDefinition->setResultType( RiaDefines::STATIC_NATIVE ); + resultDefinition->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); resultDefinition->setResultVariable( RiaDefines::eqlnumResultName() ); cellFilter->setResultDefinition( resultDefinition ); @@ -151,7 +151,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro RigCaseCellResultsData* caseCellResultsData = eclipseResultCase->eclipseCaseData()->results( porosityModel ); if ( caseCellResultsData ) { - RigEclipseResultAddress depthResultAddress( RiaDefines::STATIC_NATIVE, "DEPTH" ); + RigEclipseResultAddress depthResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH" ); double minDepth = 0.0; double maxDepth = 0.0; @@ -244,7 +244,7 @@ RimPlotCellPropertyFilter* RimEclipseResultDefinition* resultDefinition = new RimEclipseResultDefinition(); resultDefinition->setEclipseCase( eclipseResultCase ); - resultDefinition->setResultType( RiaDefines::STATIC_NATIVE ); + resultDefinition->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); resultDefinition->setResultVariable( RiaDefines::eqlnumResultName() ); cellFilter->setResultDefinition( resultDefinition ); @@ -265,7 +265,7 @@ RimPlotCellPropertyFilter* RimSaturationPressurePlot::createDepthPropertyFilter( RimEclipseResultDefinition* resultDefinition = new RimEclipseResultDefinition(); resultDefinition->setEclipseCase( eclipseResultCase ); - resultDefinition->setResultType( RiaDefines::STATIC_NATIVE ); + resultDefinition->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); resultDefinition->setResultVariable( "DEPTH" ); depthCellFilter->setResultDefinition( resultDefinition ); diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp index 0f1ae15622..a4f30337fd 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp @@ -67,7 +67,7 @@ std::vector std::set eqlnumRegionIdsFound; { - RigEclipseResultAddress resAdr( RiaDefines::STATIC_NATIVE, RiaDefines::eqlnumResultName() ); + RigEclipseResultAddress resAdr( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::eqlnumResultName() ); if ( results->hasResultEntry( resAdr ) ) { results->ensureKnownResultLoaded( resAdr ); diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index 07932986f2..6ec3e47755 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -1246,40 +1246,40 @@ std::vector sourcesForMultiPropertyResults( const QStri { static const std::map> resultsWithMultiPropertySource = {{RiaDefines::combinedTransmissibilityResultName(), - {RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANX" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANY" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANZ" )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" )}}, {RiaDefines::combinedMultResultName(), - {RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX-" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY-" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ" ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ-" )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX-" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY-" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ-" )}}, {RiaDefines::combinedRiTranResultName(), - {RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranXResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranYResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranZResultName() )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranXResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranYResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranZResultName() )}}, {RiaDefines::combinedRiMultResultName(), - {RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riMultXResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riMultYResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riMultZResultName() )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultXResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultYResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultZResultName() )}}, {RiaDefines::combinedRiAreaNormTranResultName(), - {RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranXResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranYResultName() ), - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranZResultName() )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranXResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranYResultName() ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranZResultName() )}}, {RiaDefines::combinedWaterFluxResultName(), - {RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATI+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATJ+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATK+" )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATI+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATJ+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATK+" )}}, {RiaDefines::combinedOilFluxResultName(), - {RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILI+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILJ+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILK+" )}}, + {RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILI+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILJ+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILK+" )}}, {RiaDefines::combinedGasFluxResultName(), - {RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASI+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASJ+" ), - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASK+" )}}}; + {RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASI+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASJ+" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASK+" )}}}; auto resNameResultAddrsPairIt = resultsWithMultiPropertySource.find( resultName ); @@ -1296,7 +1296,7 @@ std::vector sourcesForMultiPropertyResults( const QStri for ( QString ending : endings ) { - resultAddrs.emplace_back( RigEclipseResultAddress( RiaDefines::GENERATED, baseName + ending ) ); + resultAddrs.emplace_back( RigEclipseResultAddress( RiaDefines::ResultCatType::GENERATED, baseName + ending ) ); } return resultAddrs; diff --git a/ApplicationCode/ProjectDataModel/Rim3dWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/Rim3dWellLogExtractionCurve.cpp index 19752cafc4..317f6a1a9c 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dWellLogExtractionCurve.cpp @@ -322,7 +322,8 @@ QString Rim3dWellLogExtractionCurve::createAutoName() const if ( eclipseCase ) { - addTimeStep = addTimeStep && m_eclipseResultDefinition->resultType() != RiaDefines::STATIC_NATIVE; + addTimeStep = addTimeStep && + m_eclipseResultDefinition->resultType() != RiaDefines::ResultCatType::STATIC_NATIVE; RigEclipseCaseData* data = eclipseCase->eclipseCaseData(); if ( data ) { @@ -533,7 +534,7 @@ QString Rim3dWellLogExtractionCurve::wellDate() const if ( eclipseCase ) { - if ( m_eclipseResultDefinition->resultType() == RiaDefines::STATIC_NATIVE ) + if ( m_eclipseResultDefinition->resultType() == RiaDefines::ResultCatType::STATIC_NATIVE ) { return QString(); } diff --git a/ApplicationCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp b/ApplicationCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp index ba961f6915..0f190b663f 100644 --- a/ApplicationCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp @@ -121,11 +121,11 @@ QList else if ( fieldNeedingOptions == &eclipseResultType ) { options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::DYNAMIC_NATIVE ).uiText(), - RiaDefines::DYNAMIC_NATIVE ) ); + caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::ResultCatType::DYNAMIC_NATIVE ).uiText(), + RiaDefines::ResultCatType::DYNAMIC_NATIVE ) ); options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::STATIC_NATIVE ).uiText(), - RiaDefines::STATIC_NATIVE ) ); + caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::ResultCatType::STATIC_NATIVE ).uiText(), + RiaDefines::ResultCatType::STATIC_NATIVE ) ); } else if ( fieldNeedingOptions == &selectedEclipseResults ) { diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp index 7c67855532..5b91a08cc7 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp @@ -127,7 +127,7 @@ void RimCellEdgeColors::loadResult() for ( i = 0; i < vars.size(); ++i ) { m_reservoirView->currentGridCellResults()->ensureKnownResultLoaded( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, vars[i] ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, vars[i] ) ); int cubeFaceIdx; for ( cubeFaceIdx = 0; cubeFaceIdx < 6; ++cubeFaceIdx ) { @@ -140,7 +140,8 @@ void RimCellEdgeColors::loadResult() if ( vars[i].endsWith( varEnd ) ) { m_resultNameToAddressPairs[cubeFaceIdx] = - std::make_pair( vars[i], RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, vars[i] ) ); + std::make_pair( vars[i], + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, vars[i] ) ); } } } @@ -202,7 +203,7 @@ QList RimCellEdgeColors::calculateValueOptions( const ca if ( m_reservoirView && m_reservoirView->currentGridCellResults() ) { QStringList varList; - varList = m_reservoirView->currentGridCellResults()->resultNames( RiaDefines::STATIC_NATIVE ); + varList = m_reservoirView->currentGridCellResults()->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); // TODO: Must also handle input properties // varList += m_reservoirView->gridCellResults()->resultNames(RiaDefines::INPUT_PROPERTY); @@ -310,7 +311,7 @@ QStringList RimCellEdgeColors::findResultVariableNames() if ( m_reservoirView && m_reservoirView->currentGridCellResults() && !m_resultVariable().isEmpty() ) { QStringList varList; - varList = m_reservoirView->currentGridCellResults()->resultNames( RiaDefines::STATIC_NATIVE ); + varList = m_reservoirView->currentGridCellResults()->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); // TODO: Must handle Input properties int i; @@ -377,7 +378,7 @@ void RimCellEdgeColors::cellEdgeMetaData( std::vector* meta bool isStatic = true; if ( isUsingSingleVariable() ) { - isStatic = m_singleVarEdgeResultColors->resultType() == RiaDefines::STATIC_NATIVE; + isStatic = m_singleVarEdgeResultColors->resultType() == RiaDefines::ResultCatType::STATIC_NATIVE; } for ( size_t i = 0; i < 6; i++ ) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp index 8ad8230413..026b089f82 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp @@ -303,7 +303,7 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView() // Set default values { - rimEclipseView->cellResult()->setResultType( RiaDefines::DYNAMIC_NATIVE ); + rimEclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); auto prefs = RiaApplication::instance()->preferences(); if ( prefs->loadAndShowSoil ) @@ -528,7 +528,7 @@ void RimEclipseCase::updateFormationNamesData() { if ( !activeFormationNames() ) { - if ( eclView->cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) + if ( eclView->cellResult()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) { eclView->cellResult()->setResultVariable( RiaDefines::undefinedResultName() ); eclView->cellResult()->updateConnectedEditors(); @@ -537,7 +537,7 @@ void RimEclipseCase::updateFormationNamesData() RimEclipsePropertyFilterCollection* eclFilColl = eclView->eclipsePropertyFilterCollection(); for ( RimEclipsePropertyFilter* propFilter : eclFilColl->propertyFilters ) { - if ( propFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES ) + if ( propFilter->resultDefinition()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) { propFilter->resultDefinition()->setResultVariable( RiaDefines::undefinedResultName() ); } @@ -547,7 +547,7 @@ void RimEclipseCase::updateFormationNamesData() RimEclipsePropertyFilterCollection* eclFilColl = eclView->eclipsePropertyFilterCollection(); for ( RimEclipsePropertyFilter* propFilter : eclFilColl->propertyFilters ) { - if ( propFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES ) + if ( propFilter->resultDefinition()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) { propFilter->setToDefaultValues(); propFilter->updateConnectedEditors(); @@ -892,7 +892,7 @@ bool RimEclipseCase::openReserviorCase() // After the placeholder result for combined transmissibility is created, // make sure the nnc transmissibilities can be addressed by this scalarResultIndex as well - RigEclipseResultAddress combinedTransmissibilityResAddr( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress combinedTransmissibilityResAddr( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName() ); if ( results->hasResultEntry( combinedTransmissibilityResAddr ) ) { @@ -900,7 +900,7 @@ bool RimEclipseCase::openReserviorCase() combinedTransmissibilityResAddr ); } - RigEclipseResultAddress combinedWaterFluxResAddr( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress combinedWaterFluxResAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedWaterFluxResultName() ); if ( results->hasResultEntry( combinedWaterFluxResAddr ) ) { @@ -908,14 +908,14 @@ bool RimEclipseCase::openReserviorCase() combinedWaterFluxResAddr ); } - RigEclipseResultAddress combinedOilFluxResAddr( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress combinedOilFluxResAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedOilFluxResultName() ); if ( results->hasResultEntry( combinedOilFluxResAddr ) ) { eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RiaDefines::propertyNameFluxOil(), combinedOilFluxResAddr ); } - RigEclipseResultAddress combinedGasFluxResAddr( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress combinedGasFluxResAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedGasFluxResultName() ); if ( results->hasResultEntry( combinedGasFluxResAddr ) ) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseContourMapProjection.cpp b/ApplicationCode/ProjectDataModel/RimEclipseContourMapProjection.cpp index 69c1d43ca2..60f6f2af3c 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseContourMapProjection.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseContourMapProjection.cpp @@ -184,18 +184,21 @@ std::vector RimEclipseContourMapProjection::generateResults( int timeSte if ( isColumnResult() ) { m_currentResultName = ""; - resultData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) ); - resultData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); - resultData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + resultData->ensureKnownResultLoaded( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) ); + resultData->ensureKnownResultLoaded( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); + resultData->ensureKnownResultLoaded( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); if ( m_resultAggregation == RESULTS_OIL_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN ) { - resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ), timeStep ); } if ( m_resultAggregation == RESULTS_GAS_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN ) { - resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ), timeStep ); } @@ -258,9 +261,12 @@ void RimEclipseContourMapProjection::clearResultVariable() std::vector RimEclipseContourMapProjection::calculateColumnResult( ResultAggregation resultAggregation ) const { const RigCaseCellResultsData* resultData = eclipseCase()->results( RiaDefines::MATRIX_MODEL ); - bool hasPoroResult = resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) ); - bool hasNtgResult = resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); - bool hasDzResult = resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); + bool hasPoroResult = + resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) ); + bool hasNtgResult = + resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); + bool hasDzResult = + resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); if ( !( hasPoroResult && hasNtgResult && hasDzResult ) ) { @@ -268,11 +274,11 @@ std::vector RimEclipseContourMapProjection::calculateColumnResult( Resul } const std::vector& poroResults = - resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ), 0 ); + resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ), 0 ); const std::vector& ntgResults = - resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ), 0 ); + resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ), 0 ); const std::vector& dzResults = - resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ), 0 ); + resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ), 0 ); CVF_ASSERT( poroResults.size() == ntgResults.size() && ntgResults.size() == dzResults.size() ); @@ -283,7 +289,8 @@ std::vector RimEclipseContourMapProjection::calculateColumnResult( Resul if ( resultAggregation == RESULTS_OIL_COLUMN || resultAggregation == RESULTS_HC_COLUMN ) { const std::vector& soilResults = - resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ), timeStep ); + resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ), + timeStep ); for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx ) { resultValues[cellResultIdx] = soilResults[cellResultIdx]; @@ -292,11 +299,13 @@ std::vector RimEclipseContourMapProjection::calculateColumnResult( Resul if ( resultAggregation == RESULTS_GAS_COLUMN || resultAggregation == RESULTS_HC_COLUMN ) { - bool hasGasResult = resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) ); + bool hasGasResult = + resultData->hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ); if ( hasGasResult ) { const std::vector& sgasResults = - resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ), timeStep ); + resultData->cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ), + timeStep ); for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx ) { resultValues[cellResultIdx] += sgasResults[cellResultIdx]; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp b/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp index 817f809dee..ad19a78a3f 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp @@ -94,7 +94,7 @@ void RimEclipseInputProperty::fieldChangedByUi( const caf::PdmFieldHandle* chang RigCaseCellResultsData* matrixResults = rimCase->eclipseCaseData()->results( RiaDefines::MATRIX_MODEL ); if ( matrixResults ) { - if ( matrixResults->updateResultName( RiaDefines::INPUT_PROPERTY, oldName, newName ) ) + if ( matrixResults->updateResultName( RiaDefines::ResultCatType::INPUT_PROPERTY, oldName, newName ) ) { anyNameUpdated = true; } @@ -103,7 +103,7 @@ void RimEclipseInputProperty::fieldChangedByUi( const caf::PdmFieldHandle* chang RigCaseCellResultsData* fracResults = rimCase->eclipseCaseData()->results( RiaDefines::FRACTURE_MODEL ); if ( fracResults ) { - if ( fracResults->updateResultName( RiaDefines::INPUT_PROPERTY, oldName, newName ) ) + if ( fracResults->updateResultName( RiaDefines::ResultCatType::INPUT_PROPERTY, oldName, newName ) ) { anyNameUpdated = true; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp index a36a1d309f..22cb17da7b 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp @@ -400,7 +400,7 @@ void RimEclipsePropertyFilter::computeResultValueRange() if ( m_resultDefinition->hasCategoryResult() ) { - if ( m_resultDefinition->resultType() == RiaDefines::FORMATION_NAMES ) + if ( m_resultDefinition->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) { CVF_ASSERT( parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData() ); diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp index bf524784d2..4b62baa439 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp @@ -125,7 +125,8 @@ bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const for ( RimEclipsePropertyFilter* propertyFilter : propertyFilters ) { - if ( propertyFilter->isActive() && propertyFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES && + if ( propertyFilter->isActive() && + propertyFilter->resultDefinition()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES && propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName() ) return true; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp index e060118d6b..19d7a028fb 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -330,9 +330,9 @@ void RimEclipseResultCase::loadAndUpdateSourSimData() RimEclipseView* eclipseView = dynamic_cast( view ); if ( eclipseView != nullptr ) { - if ( eclipseView->cellResult()->resultType() == RiaDefines::SOURSIMRL ) + if ( eclipseView->cellResult()->resultType() == RiaDefines::ResultCatType::SOURSIMRL ) { - eclipseView->cellResult()->setResultType( RiaDefines::DYNAMIC_NATIVE ); + eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); eclipseView->cellResult()->setResultVariable( "SOIL" ); eclipseView->loadDataAndUpdate(); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp index 1863f13c4d..882047422e 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -275,7 +275,7 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch QStringList varList = getResultNamesForResultType( m_resultTypeUiField(), this->currentGridCellResults() ); - bool isFlowDiagFieldsRelevant = ( m_resultType() == RiaDefines::FLOW_DIAGNOSTICS ); + bool isFlowDiagFieldsRelevant = ( m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ); if ( ( m_flowSolutionUiField() == m_flowSolution() || !isFlowDiagFieldsRelevant ) && m_resultTypeUiField() == m_resultType() && m_porosityModelUiField() == m_porosityModel() ) @@ -310,17 +310,17 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch m_resultType = m_resultTypeUiField; m_resultVariable = m_resultVariableUiField; - if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { m_flowSolution = m_flowSolutionUiField(); m_selectedInjectorTracers = m_selectedInjectorTracersUiField(); m_selectedProducerTracers = m_selectedProducerTracersUiField(); } - else if ( m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING ) + else if ( m_resultTypeUiField() == RiaDefines::ResultCatType::INJECTION_FLOODING ) { m_selectedSouringTracers = m_selectedSouringTracersUiField(); } - else if ( m_resultTypeUiField() == RiaDefines::INPUT_PROPERTY ) + else if ( m_resultTypeUiField() == RiaDefines::ResultCatType::INPUT_PROPERTY ) { m_inputPropertyFileName = getInputPropertyFileName( newValue.toString() ); } @@ -508,7 +508,7 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged() //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinition::setTofAndSelectTracer( const QString& tracerName ) { - setResultType( RiaDefines::FLOW_DIAGNOSTICS ); + setResultType( RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ); setResultVariable( "TOF" ); setFlowDiagTracerSelectionType( FLOW_TR_BY_SELECTION ); @@ -676,24 +676,24 @@ QList // Do not include flow diagnostics results if it is a time history curve - if ( resType == RiaDefines::FLOW_DIAGNOSTICS && ( timeHistoryCurve ) ) + if ( resType == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS && ( timeHistoryCurve ) ) { continue; } // Do not include SourSimRL if no SourSim file is loaded - if ( resType == RiaDefines::SOURSIMRL && ( !hasSourSimRLFile ) ) + if ( resType == RiaDefines::ResultCatType::SOURSIMRL && ( !hasSourSimRLFile ) ) { continue; } - if ( resType == RiaDefines::INJECTION_FLOODING && !enableSouring ) + if ( resType == RiaDefines::ResultCatType::INJECTION_FLOODING && !enableSouring ) { continue; } - if ( resType == RiaDefines::ALLEN_DIAGRAMS && !isSeparateFaultResult ) + if ( resType == RiaDefines::ResultCatType::ALLEN_DIAGRAMS && !isSeparateFaultResult ) { continue; } @@ -703,7 +703,7 @@ QList } } - if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { if ( fieldNeedingOptions == &m_resultVariableUiField ) { @@ -738,14 +738,15 @@ QList options = calcOptionsForSelectedTracerField( false ); } } - else if ( m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING ) + else if ( m_resultTypeUiField() == RiaDefines::ResultCatType::INJECTION_FLOODING ) { if ( fieldNeedingOptions == &m_selectedSouringTracersUiField ) { RigCaseCellResultsData* cellResultsStorage = currentGridCellResults(); if ( cellResultsStorage ) { - QStringList dynamicResultNames = cellResultsStorage->resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList dynamicResultNames = + cellResultsStorage->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); for ( const QString& resultName : dynamicResultNames ) { @@ -900,7 +901,7 @@ RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const { CVF_ASSERT( isFlowDiagOrInjectionFlooding() ); - if ( m_resultType() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { size_t timeStep = 0; @@ -998,7 +999,7 @@ void RimEclipseResultDefinition::setFlowDiagTracerSelectionType( FlowTracerSelec //-------------------------------------------------------------------------------------------------- QString RimEclipseResultDefinition::resultVariableUiName() const { - if ( resultType() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { return flowDiagResUiText( false, 32 ); } @@ -1011,7 +1012,7 @@ QString RimEclipseResultDefinition::resultVariableUiName() const //-------------------------------------------------------------------------------------------------- QString RimEclipseResultDefinition::resultVariableUiShortName() const { - if ( resultType() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { return flowDiagResUiText( true, 24 ); } @@ -1193,19 +1194,19 @@ bool RimEclipseResultDefinition::hasDynamicResult() const { if ( hasResult() ) { - if ( m_resultType() == RiaDefines::DYNAMIC_NATIVE ) + if ( m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) { return true; } - else if ( m_resultType() == RiaDefines::SOURSIMRL ) + else if ( m_resultType() == RiaDefines::ResultCatType::SOURSIMRL ) { return true; } - else if ( m_resultType() == RiaDefines::FLOW_DIAGNOSTICS ) + else if ( m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { return true; } - else if ( m_resultType() == RiaDefines::INJECTION_FLOODING ) + else if ( m_resultType() == RiaDefines::ResultCatType::INJECTION_FLOODING ) { return true; } @@ -1376,7 +1377,7 @@ void RimEclipseResultDefinition::setDiffResultOptionsEnabled( bool enabled ) //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::isTernarySaturationSelected() const { - bool isTernary = ( m_resultType() == RiaDefines::DYNAMIC_NATIVE ) && + bool isTernary = ( m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) && ( m_resultVariable().compare( RiaDefines::ternarySaturationResultName(), Qt::CaseInsensitive ) == 0 ); return isTernary; @@ -1387,7 +1388,8 @@ bool RimEclipseResultDefinition::isTernarySaturationSelected() const //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::isCompletionTypeSelected() const { - return ( m_resultType() == RiaDefines::DYNAMIC_NATIVE && m_resultVariable() == RiaDefines::completionTypeResultName() ); + return ( m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE && + m_resultVariable() == RiaDefines::completionTypeResultName() ); } //-------------------------------------------------------------------------------------------------- @@ -1395,15 +1397,16 @@ bool RimEclipseResultDefinition::isCompletionTypeSelected() const //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::hasCategoryResult() const { - if ( this->m_resultType() == RiaDefines::FORMATION_NAMES && m_eclipseCase && m_eclipseCase->eclipseCaseData() && - m_eclipseCase->eclipseCaseData()->activeFormationNames() ) + if ( this->m_resultType() == RiaDefines::ResultCatType::FORMATION_NAMES && m_eclipseCase && + m_eclipseCase->eclipseCaseData() && m_eclipseCase->eclipseCaseData()->activeFormationNames() ) return true; - if ( this->m_resultType() == RiaDefines::DYNAMIC_NATIVE && + if ( this->m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName() ) return true; - if ( this->m_resultType() == RiaDefines::FLOW_DIAGNOSTICS && m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME ) + if ( this->m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS && + m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME ) return true; if ( this->resultVariable() == RiaDefines::formationAllenResultName() || @@ -1422,7 +1425,8 @@ bool RimEclipseResultDefinition::hasCategoryResult() const //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::isFlowDiagOrInjectionFlooding() const { - if ( this->m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->m_resultType() == RiaDefines::INJECTION_FLOODING ) + if ( this->m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS || + this->m_resultType() == RiaDefines::ResultCatType::INJECTION_FLOODING ) { return true; } @@ -1442,7 +1446,7 @@ void RimEclipseResultDefinition::defineUiOrdering( QString uiConfigName, caf::Pd uiOrdering.add( &m_porosityModelUiField ); } - if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { uiOrdering.add( &m_flowSolutionUiField ); @@ -1470,13 +1474,13 @@ void RimEclipseResultDefinition::defineUiOrdering( QString uiConfigName, caf::Pd } } - if ( m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::INJECTION_FLOODING ) { uiOrdering.add( &m_selectedSouringTracersUiField ); } uiOrdering.add( &m_resultVariableUiField ); - if ( m_resultTypeUiField() == RiaDefines::INPUT_PROPERTY ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::INPUT_PROPERTY ) { uiOrdering.add( &m_inputPropertyFileName ); } @@ -1510,7 +1514,7 @@ void RimEclipseResultDefinition::defineEditorAttribute( const caf::PdmFieldHandl QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) { - if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS ) + if ( m_resultTypeUiField() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { if ( field == &m_resultVariableUiField ) { @@ -1637,7 +1641,8 @@ QList bool addPerCellFaceOptionItems, bool ternaryEnabled ) { - CVF_ASSERT( resultCatType != RiaDefines::FLOW_DIAGNOSTICS && resultCatType != RiaDefines::INJECTION_FLOODING ); + CVF_ASSERT( resultCatType != RiaDefines::ResultCatType::FLOW_DIAGNOSTICS && + resultCatType != RiaDefines::ResultCatType::INJECTION_FLOODING ); if ( results ) { @@ -1697,7 +1702,7 @@ QList else if ( cellCenterResultNames.contains( "SWAT" ) ) hasAtLeastOneTernaryComponent = true; - if ( resultCatType == RiaDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent ) + if ( resultCatType == RiaDefines::ResultCatType::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent ) { optionList.push_front( caf::PdmOptionItemInfo( RiaDefines::ternarySaturationResultName(), RiaDefines::ternarySaturationResultName() ) ); @@ -1886,12 +1891,12 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen if ( this->hasCategoryResult() ) { - if ( this->resultType() == RiaDefines::FORMATION_NAMES ) + if ( this->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) { std::vector fnVector = eclipseCaseData->formationNames(); legendConfigToUpdate->setNamedCategoriesInverse( fnVector ); } - else if ( this->resultType() == RiaDefines::ALLEN_DIAGRAMS ) + else if ( this->resultType() == RiaDefines::ResultCatType::ALLEN_DIAGRAMS ) { if ( this->resultVariable() == RiaDefines::formationAllenResultName() ) { @@ -1946,7 +1951,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen legendConfigToUpdate->setCategoryItems( categories ); } } - else if ( this->resultType() == RiaDefines::DYNAMIC_NATIVE && + else if ( this->resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName() ) { const std::vector& visibleCategories = @@ -1998,7 +2003,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen { RigCaseCellResultsData* gridCellResults = this->currentGridCellResults(); { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, "SOIL" ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ); if ( gridCellResults->ensureKnownResultLoaded( resAddr ) ) { @@ -2019,7 +2024,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen } { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, "SGAS" ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ); if ( gridCellResults->ensureKnownResultLoaded( resAddr ) ) { @@ -2040,7 +2045,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen } { - RigEclipseResultAddress resAddr( RiaDefines::DYNAMIC_NATIVE, "SWAT" ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ); if ( gridCellResults->ensureKnownResultLoaded( resAddr ) ) { @@ -2243,7 +2248,7 @@ QString RimEclipseResultDefinition::selectedTracersString() const QStringList RimEclipseResultDefinition::getResultNamesForResultType( RiaDefines::ResultCatType resultCatType, const RigCaseCellResultsData* results ) { - if ( resultCatType != RiaDefines::FLOW_DIAGNOSTICS ) + if ( resultCatType != RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ) { if ( !results ) return QStringList(); @@ -2462,7 +2467,7 @@ bool RimEclipseResultDefinition::enableDiffResultOptions() const //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::isTimeDiffResultAvailable() const { - return enableDiffResultOptions() && m_resultTypeUiField() == RiaDefines::DYNAMIC_NATIVE && + return enableDiffResultOptions() && m_resultTypeUiField() == RiaDefines::ResultCatType::DYNAMIC_NATIVE && !isTernarySaturationSelected(); } @@ -2480,8 +2485,9 @@ bool RimEclipseResultDefinition::isTimeDiffResult() const bool RimEclipseResultDefinition::isCaseDiffResultAvailable() const { return enableDiffResultOptions() && !isTernarySaturationSelected() && - ( m_resultTypeUiField() == RiaDefines::DYNAMIC_NATIVE || - m_resultTypeUiField() == RiaDefines::STATIC_NATIVE || m_resultTypeUiField() == RiaDefines::GENERATED ); + ( m_resultTypeUiField() == RiaDefines::ResultCatType::DYNAMIC_NATIVE || + m_resultTypeUiField() == RiaDefines::ResultCatType::STATIC_NATIVE || + m_resultTypeUiField() == RiaDefines::ResultCatType::GENERATED ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp index 8359d33081..583379a4b1 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp @@ -295,28 +295,28 @@ void RimEclipseStatisticsCase::computeStatistics() for ( size_t pIdx = 0; pIdx < m_selectedDynamicProperties().size(); ++pIdx ) { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::MATRIX_MODEL, - RiaDefines::DYNAMIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, m_selectedDynamicProperties()[pIdx] ) ); } for ( size_t pIdx = 0; pIdx < m_selectedStaticProperties().size(); ++pIdx ) { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::MATRIX_MODEL, - RiaDefines::STATIC_NATIVE, + RiaDefines::ResultCatType::STATIC_NATIVE, m_selectedStaticProperties()[pIdx] ) ); } for ( size_t pIdx = 0; pIdx < m_selectedGeneratedProperties().size(); ++pIdx ) { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::MATRIX_MODEL, - RiaDefines::GENERATED, + RiaDefines::ResultCatType::GENERATED, m_selectedGeneratedProperties()[pIdx] ) ); } for ( size_t pIdx = 0; pIdx < m_selectedInputProperties().size(); ++pIdx ) { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::MATRIX_MODEL, - RiaDefines::INPUT_PROPERTY, + RiaDefines::ResultCatType::INPUT_PROPERTY, m_selectedInputProperties()[pIdx] ) ); } @@ -324,7 +324,7 @@ void RimEclipseStatisticsCase::computeStatistics() { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::FRACTURE_MODEL, - RiaDefines::DYNAMIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, m_selectedFractureDynamicProperties()[pIdx] ) ); } @@ -332,7 +332,7 @@ void RimEclipseStatisticsCase::computeStatistics() { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::FRACTURE_MODEL, - RiaDefines::STATIC_NATIVE, + RiaDefines::ResultCatType::STATIC_NATIVE, m_selectedFractureStaticProperties()[pIdx] ) ); } @@ -340,7 +340,7 @@ void RimEclipseStatisticsCase::computeStatistics() { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::FRACTURE_MODEL, - RiaDefines::GENERATED, + RiaDefines::ResultCatType::GENERATED, m_selectedFractureGeneratedProperties()[pIdx] ) ); } @@ -348,7 +348,7 @@ void RimEclipseStatisticsCase::computeStatistics() { resultSpecification.append( RimEclipseStatisticsCaseEvaluator::ResSpec( RiaDefines::FRACTURE_MODEL, - RiaDefines::INPUT_PROPERTY, + RiaDefines::ResultCatType::INPUT_PROPERTY, m_selectedFractureInputProperties()[pIdx] ) ); } @@ -489,42 +489,50 @@ QList if ( &m_selectedDynamicProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); return toOptionList( varList ); } else if ( &m_selectedStaticProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::STATIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); return toOptionList( varList ); } else if ( &m_selectedGeneratedProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::GENERATED ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::GENERATED ); return toOptionList( varList ); } else if ( &m_selectedInputProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::INPUT_PROPERTY ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::INPUT_PROPERTY ); return toOptionList( varList ); } else if ( &m_selectedFractureDynamicProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); return toOptionList( varList ); } else if ( &m_selectedFractureStaticProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::STATIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); return toOptionList( varList ); } else if ( &m_selectedFractureGeneratedProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::GENERATED ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::GENERATED ); return toOptionList( varList ); } else if ( &m_selectedFractureInputProperties == fieldNeedingOptions ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::INPUT_PROPERTY ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::INPUT_PROPERTY ); return toOptionList( varList ); } @@ -717,22 +725,30 @@ void RimEclipseStatisticsCase::updateSelectionListVisibilities() // !caseGroup()->mainCase()->reservoirData()->results(RiaDefines::FRACTURE_MODEL)->resultCount() m_selectedDynamicProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE ) ); + isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && + m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) ); m_selectedStaticProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE ) ); + isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && + m_resultType() == RiaDefines::ResultCatType::STATIC_NATIVE ) ); m_selectedGeneratedProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::GENERATED ) ); + isLocked || + !( m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::ResultCatType::GENERATED ) ); m_selectedInputProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY ) ); + isLocked || !( m_porosityModel() == RiaDefines::MATRIX_MODEL && + m_resultType() == RiaDefines::ResultCatType::INPUT_PROPERTY ) ); m_selectedFractureDynamicProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE ) ); + isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && + m_resultType() == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) ); m_selectedFractureStaticProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE ) ); + isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && + m_resultType() == RiaDefines::ResultCatType::STATIC_NATIVE ) ); m_selectedFractureGeneratedProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::GENERATED ) ); + isLocked || + !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::ResultCatType::GENERATED ) ); m_selectedFractureInputProperties.uiCapability()->setUiHidden( - isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY ) ); + isLocked || !( m_porosityModel() == RiaDefines::FRACTURE_MODEL && + m_resultType() == RiaDefines::ResultCatType::INPUT_PROPERTY ) ); } //-------------------------------------------------------------------------------------------------- @@ -837,28 +853,32 @@ void RimEclipseStatisticsCase::populateResultSelection() if ( m_selectedDynamicProperties().size() == 0 ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); if ( varList.contains( "SOIL" ) ) m_selectedDynamicProperties.v().push_back( "SOIL" ); if ( varList.contains( "PRESSURE" ) ) m_selectedDynamicProperties.v().push_back( "PRESSURE" ); } if ( m_selectedStaticProperties().size() == 0 ) { - QStringList varList = caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::STATIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::MATRIX_MODEL )->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); if ( varList.contains( "PERMX" ) ) m_selectedStaticProperties.v().push_back( "PERMX" ); if ( varList.contains( "PORO" ) ) m_selectedStaticProperties.v().push_back( "PORO" ); } if ( m_selectedFractureDynamicProperties().size() == 0 ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); if ( varList.contains( "SOIL" ) ) m_selectedFractureDynamicProperties.v().push_back( "SOIL" ); if ( varList.contains( "PRESSURE" ) ) m_selectedFractureDynamicProperties.v().push_back( "PRESSURE" ); } if ( m_selectedFractureStaticProperties().size() == 0 ) { - QStringList varList = caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::STATIC_NATIVE ); + QStringList varList = + caseData->results( RiaDefines::FRACTURE_MODEL )->resultNames( RiaDefines::ResultCatType::STATIC_NATIVE ); if ( varList.contains( "PERMX" ) ) m_selectedFractureStaticProperties.v().push_back( "PERMX" ); if ( varList.contains( "PORO" ) ) m_selectedFractureStaticProperties.v().push_back( "PORO" ); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp index 3fdf91c6b6..a4b393edfb 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp @@ -172,7 +172,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults( const QList size_t dataAccessTimeStepIndex = timeStepIdx; // Always evaluate statistics once, and always use time step index zero - if ( resultType == RiaDefines::STATIC_NATIVE ) + if ( resultType == RiaDefines::ResultCatType::STATIC_NATIVE ) { if ( timeIndicesIdx > 0 ) continue; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h index 4c56818320..320e1f99b0 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h @@ -62,7 +62,7 @@ public: struct ResSpec { ResSpec() - : m_resType( RiaDefines::DYNAMIC_NATIVE ) + : m_resType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ) , m_poroModel( RiaDefines::MATRIX_MODEL ) { } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index 04a21c103d..fcc722a214 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1346,7 +1346,8 @@ void RimEclipseView::onUpdateLegends() if ( this->cellEdgeResult()->hasCategoryResult() ) { - if ( cellEdgeResult()->singleVarEdgeResultColors()->resultType() != RiaDefines::FORMATION_NAMES ) + if ( cellEdgeResult()->singleVarEdgeResultColors()->resultType() != + RiaDefines::ResultCatType::FORMATION_NAMES ) { cellEdgeResult()->legendConfig()->setIntegerCategories( results->uniqueCellScalarValues( cellEdgeResult()->singleVarEdgeResultColors()->eclipseResultAddress() ) ); @@ -2249,9 +2250,10 @@ void RimEclipseView::defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, //-------------------------------------------------------------------------------------------------- bool RimEclipseView::isUsingFormationNames() const { - if ( cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) return true; + if ( cellResult()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) return true; - if ( faultResultSettings()->customFaultResult()->resultType() == RiaDefines::ALLEN_DIAGRAMS ) return true; + if ( faultResultSettings()->customFaultResult()->resultType() == RiaDefines::ResultCatType::ALLEN_DIAGRAMS ) + return true; return eclipsePropertyFilterCollection()->isUsingFormationNames(); } diff --git a/ApplicationCode/ProjectDataModel/RimElementVectorResult.cpp b/ApplicationCode/ProjectDataModel/RimElementVectorResult.cpp index fd17f70409..1a95ef8921 100644 --- a/ApplicationCode/ProjectDataModel/RimElementVectorResult.cpp +++ b/ApplicationCode/ProjectDataModel/RimElementVectorResult.cpp @@ -355,15 +355,18 @@ RigEclipseResultAddress RimElementVectorResult::resultAddressCombined() const { if ( resultName() == "Oil" ) { - return RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedOilFluxResultName() ); + return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::combinedOilFluxResultName() ); } else if ( resultName() == "Gas" ) { - return RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedGasFluxResultName() ); + return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::combinedGasFluxResultName() ); } else if ( resultName() == "Water" ) { - return RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedWaterFluxResultName() ); + return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::combinedWaterFluxResultName() ); } return RigEclipseResultAddress(); @@ -379,23 +382,23 @@ bool RimElementVectorResult::resultAddressIJK( std::vector isCategoryResult = true; } - if ( eclCellColors && eclCellColors->resultType() == RiaDefines::ALLEN_DIAGRAMS ) + if ( eclCellColors && eclCellColors->resultType() == RiaDefines::ResultCatType::ALLEN_DIAGRAMS ) { isAllenDiagram = true; } diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp index 2c9bfea027..2ac5289095 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp @@ -321,7 +321,7 @@ RimReservoirCellResultsStorageEntryInfo::RimReservoirCellResultsStorageEntryInfo CAF_PDM_InitField( &m_resultType, "ResultType", - caf::AppEnum( RiaDefines::REMOVED ), + caf::AppEnum( RiaDefines::ResultCatType::REMOVED ), "ResultType", "", "", diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp index 4bf3e65f6c..cf6d603da3 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp @@ -214,7 +214,7 @@ void RimWellLogExtractionCurve::setPropertiesFromView( Rim3dView* view ) } else if ( eclipseCase ) { - m_eclipseResultDefinition->setResultType( RiaDefines::STATIC_NATIVE ); + m_eclipseResultDefinition->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE ); m_eclipseResultDefinition->setResultVariable( "PORO" ); } diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index d12acbaac9..f4d02dd854 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -1930,21 +1930,21 @@ std::vector> RimWellLogTrack::waterAndRockRegions( Ria } double waterEndMD = extractor->cellIntersectionMDs().front(); double rockEndMD = extractor->cellIntersectionMDs().back(); - return { { waterStartMD, waterEndMD }, { waterEndMD, rockEndMD } }; + return {{waterStartMD, waterEndMD}, {waterEndMD, rockEndMD}}; } else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) { double waterStartTVD = 0.0; double waterEndTVD = extractor->cellIntersectionTVDs().front(); double rockEndTVD = extractor->cellIntersectionTVDs().back(); - return { { waterStartTVD, waterEndTVD }, { waterEndTVD, rockEndTVD } }; + return {{waterStartTVD, waterEndTVD}, {waterEndTVD, rockEndTVD}}; } else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) { double waterStartTVDRKB = extractor->wellPathData()->rkbDiff(); double waterEndTVDRKB = extractor->cellIntersectionTVDs().front() + extractor->wellPathData()->rkbDiff(); double rockEndTVDRKB = extractor->cellIntersectionTVDs().back() + extractor->wellPathData()->rkbDiff(); - return { { waterStartTVDRKB, waterEndTVDRKB }, { waterEndTVDRKB, rockEndTVDRKB } }; + return {{waterStartTVDRKB, waterEndTVDRKB}, {waterEndTVDRKB, rockEndTVDRKB}}; } return {}; } @@ -2354,7 +2354,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot() 0, RiaDefines::PorosityModelType::MATRIX_MODEL, 0, - RigEclipseResultAddress( RiaDefines::FORMATION_NAMES, + RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES, RiaDefines::activeFormationNamesResultName() ) ); curveData = RimWellLogTrack::curveSamplingPointData( eclWellLogExtractor, resultAccessor.p() ); @@ -2384,7 +2384,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot() const std::vector> waterAndRockIntervals = waterAndRockRegions( plot->depthType(), extractor ); m_annotationTool->attachNamedRegions( m_plotWidget, - { "Sea Level", "" }, + {"Sea Level", ""}, xRange, waterAndRockIntervals, m_regionAnnotationDisplay(), @@ -2392,7 +2392,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot() ( ( 100 - m_colorShadingTransparency ) * 255 ) / 100, m_showRegionLabels(), RiuPlotAnnotationTool::LEFT_COLUMN, - { Qt::SolidPattern, Qt::Dense6Pattern } ); + {Qt::SolidPattern, Qt::Dense6Pattern} ); } if ( m_formationSource == CASE ) @@ -2590,16 +2590,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot() } } - const std::map sortIndices = { { RiaDefines::WELL_PATH, 0 }, - { RiaDefines::CASING, 1 }, - { RiaDefines::LINER, 2 }, - { RiaDefines::PERFORATION_INTERVAL, 3 }, - { RiaDefines::FISHBONES, 4 }, - { RiaDefines::FRACTURE, 5 }, - { RiaDefines::PACKER, 6 }, - { RiaDefines::ICD, 7 }, - { RiaDefines::AICD, 8 }, - { RiaDefines::ICV, 9 } }; + const std::map sortIndices = {{RiaDefines::WELL_PATH, 0}, + {RiaDefines::CASING, 1}, + {RiaDefines::LINER, 2}, + {RiaDefines::PERFORATION_INTERVAL, 3}, + {RiaDefines::FISHBONES, 4}, + {RiaDefines::FRACTURE, 5}, + {RiaDefines::PACKER, 6}, + {RiaDefines::ICD, 7}, + {RiaDefines::AICD, 8}, + {RiaDefines::ICV, 9}}; std::stable_sort( allWellPathComponents.begin(), allWellPathComponents.end(), diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 441ba46b66..c2234ca4ee 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -326,9 +326,12 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANX" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANY" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANZ" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ) ); statisticsCalculator = calc; } @@ -336,12 +339,18 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX-" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY-" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ-" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX-" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY-" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ-" ) ); statisticsCalculator = calc; } @@ -349,13 +358,13 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranXResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranYResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranZResultName() ) ); statisticsCalculator = calc; } @@ -363,13 +372,13 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultXResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultYResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultZResultName() ) ); statisticsCalculator = calc; } @@ -377,38 +386,56 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranXResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranYResultName() ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riAreaNormTranZResultName() ) ); statisticsCalculator = calc; } else if ( resultName == RiaDefines::combinedWaterFluxResultName() ) { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATI+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATJ+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATK+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRWATI+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRWATJ+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRWATK+" ) ); statisticsCalculator = calc; } else if ( resultName == RiaDefines::combinedOilFluxResultName() ) { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILI+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILJ+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILK+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLROILI+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLROILJ+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLROILK+" ) ); statisticsCalculator = calc; } else if ( resultName == RiaDefines::combinedGasFluxResultName() ) { cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASI+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASJ+" ) ); - calc->addNativeStatisticsCalculator( this, RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASK+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRGASI+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRGASJ+" ) ); + calc->addNativeStatisticsCalculator( this, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "FLRGASK+" ) ); statisticsCalculator = calc; } else if ( resultName.endsWith( "IJK" ) ) @@ -416,13 +443,13 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe cvf::ref calc = new RigEclipseMultiPropertyStatCalc(); QString baseName = resultName.left( resultName.size() - 3 ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::GENERATED, + RigEclipseResultAddress( RiaDefines::ResultCatType::GENERATED, QString( "%1I" ).arg( baseName ) ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::GENERATED, + RigEclipseResultAddress( RiaDefines::ResultCatType::GENERATED, QString( "%1J" ).arg( baseName ) ) ); calc->addNativeStatisticsCalculator( this, - RigEclipseResultAddress( RiaDefines::GENERATED, + RigEclipseResultAddress( RiaDefines::ResultCatType::GENERATED, QString( "%1K" ).arg( baseName ) ) ); statisticsCalculator = calc; } @@ -514,7 +541,7 @@ bool RigCaseCellResultsData::isUsingGlobalActiveIndex( const RigEclipseResultAdd //-------------------------------------------------------------------------------------------------- bool RigCaseCellResultsData::hasFlowDiagUsableFluxes() const { - QStringList dynResVarNames = resultNames( RiaDefines::DYNAMIC_NATIVE ); + QStringList dynResVarNames = resultNames( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); bool hasFlowFluxes = true; hasFlowFluxes = dynResVarNames.contains( "FLRWATI+" ); @@ -788,7 +815,7 @@ const std::vector* { size_t resultCellCount = actCellInfo->reservoirCellResultCount(); size_t reservoirCellCount = actCellInfo->reservoirCellCount(); - RigEclipseResultAddress resVarAddr( RiaDefines::STATIC_NATIVE, resultName ); + RigEclipseResultAddress resVarAddr( RiaDefines::ResultCatType::STATIC_NATIVE, resultName ); size_t scalarResultIndexPorv = gridCellResults->findOrLoadKnownScalarResult( resVarAddr ); @@ -866,9 +893,9 @@ void RigCaseCellResultsData::eraseAllSourSimData() for ( size_t i = 0; i < m_resultInfos.size(); i++ ) { RigEclipseResultInfo& ri = m_resultInfos[i]; - if ( ri.resultType() == RiaDefines::SOURSIMRL ) + if ( ri.resultType() == RiaDefines::ResultCatType::SOURSIMRL ) { - ri.setResultType( RiaDefines::REMOVED ); + ri.setResultType( RiaDefines::ResultCatType::REMOVED ); } } } @@ -880,13 +907,15 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() { // SOIL { - if ( !hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ) ) ) + if ( !hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ) ) { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ) ) || - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) ) || + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ) ) { size_t soilIndex = - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ), false ); + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "SOIL" ), + false ); this->setMustBeCalculated( soilIndex ); } } @@ -895,9 +924,9 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() // Oil Volume if ( RiaApplication::enableDevelopmentFeatures() ) { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ) ) { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::riOilVolumeResultName() ), false ); } @@ -905,47 +934,47 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() // Completion type { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() ), false ); } // Fault results { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ALLEN_DIAGRAMS, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, RiaDefines::formationBinaryAllenResultName() ), false ); - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ALLEN_DIAGRAMS, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, RiaDefines::formationAllenResultName() ), false ); } // FLUX { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATI+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATJ+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRWATK+" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATI+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATJ+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATK+" ) ) ) { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedWaterFluxResultName() ), false ); } - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILI+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILJ+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLROILK+" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILI+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILJ+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILK+" ) ) ) { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedOilFluxResultName() ), false ); } - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASI+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASJ+" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "FLRGASK+" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASI+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASJ+" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASK+" ) ) ) { - findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::combinedGasFluxResultName() ), false ); } @@ -955,82 +984,100 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() { if ( hasCompleteTransmissibilityResults() ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedTransmissibilityResultName(), + false, + 0 ); } } // MULTXYZ { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTX-" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTY-" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "MULTZ-" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTX-" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTY-" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "MULTZ-" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::combinedMultResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedMultResultName(), false, 0 ); } } // riTRANSXYZ and X,Y,Z { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riTranXResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riTranYResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riTranZResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiTranResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranXResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranYResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riTranZResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedRiTranResultName(), false, 0 ); } } // riMULTXYZ and X, Y, Z { if ( hasCompleteTransmissibilityResults() && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranXResultName() ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranYResultName() ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::riTranZResultName() ) ) ) + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riTranXResultName() ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riTranYResultName() ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riTranZResultName() ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riMultXResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riMultYResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riMultZResultName(), false, 0 ); - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiMultResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultXResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultYResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riMultZResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedRiMultResultName(), false, 0 ); } } // riTRANSXYZbyArea and X, Y, Z { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANX" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranXResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riAreaNormTranXResultName(), + false, + 0 ); } - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANY" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranYResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riAreaNormTranYResultName(), + false, + 0 ); } - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANZ" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranZResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::riAreaNormTranZResultName(), + false, + 0 ); } if ( hasCompleteTransmissibilityResults() ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiAreaNormTranResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedRiAreaNormTranResultName(), + false, + 0 ); } } // Cell Volume { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::riCellVolumeResultName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riCellVolumeResultName(), false, 0 ); } // Mobile Pore Volume { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORV" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORV" ) ) ) { - addStaticScalarResult( RiaDefines::STATIC_NATIVE, RiaDefines::mobilePoreVolumeName(), false, 0 ); + addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::mobilePoreVolumeName(), false, 0 ); } } } @@ -1040,9 +1087,9 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() //-------------------------------------------------------------------------------------------------- bool RigCaseCellResultsData::hasCompleteTransmissibilityResults() const { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANX" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANY" ) ) && - hasResultEntry( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TRANZ" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ) ) && + hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ) ) ) { return true; } @@ -1125,7 +1172,7 @@ void RigCaseCellResultsData::createResultEntry( const RigEclipseResultAddress& r void RigCaseCellResultsData::ensureKnownResultLoadedForTimeStep( const RigEclipseResultAddress& resultAddress, size_t timeStepIndex ) { - CAF_ASSERT( resultAddress.m_resultCatType != RiaDefines::UNDEFINED ); + CAF_ASSERT( resultAddress.m_resultCatType != RiaDefines::ResultCatType::UNDEFINED ); findOrLoadKnownScalarResultForTimeStep( resultAddress, timeStepIndex ); } @@ -1139,14 +1186,14 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu { return cvf::UNDEFINED_SIZE_T; } - else if ( resVarAddr.m_resultCatType == RiaDefines::UNDEFINED ) + else if ( resVarAddr.m_resultCatType == RiaDefines::ResultCatType::UNDEFINED ) { - std::vector searchOrder = {RiaDefines::STATIC_NATIVE, - RiaDefines::DYNAMIC_NATIVE, - RiaDefines::SOURSIMRL, - RiaDefines::GENERATED, - RiaDefines::INPUT_PROPERTY, - RiaDefines::FORMATION_NAMES}; + std::vector searchOrder = {RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::ResultCatType::SOURSIMRL, + RiaDefines::ResultCatType::GENERATED, + RiaDefines::ResultCatType::INPUT_PROPERTY, + RiaDefines::ResultCatType::FORMATION_NAMES}; size_t scalarResultIndex = this->findOrLoadKnownScalarResultByResultTypeOrder( resVarAddr, searchOrder ); @@ -1172,7 +1219,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu // Load dependency data sets - if ( type == RiaDefines::STATIC_NATIVE ) + if ( type == RiaDefines::ResultCatType::STATIC_NATIVE ) { if ( resultName == RiaDefines::combinedTransmissibilityResultName() ) { @@ -1233,7 +1280,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu computeAllenResults( this, m_ownerMainGrid ); } } - else if ( type == RiaDefines::DYNAMIC_NATIVE ) + else if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE ) { if ( resultName == RiaDefines::combinedWaterFluxResultName() ) { @@ -1266,8 +1313,8 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu { // Trigger loading of SWAT, SGAS to establish time step count if no data has been loaded from file at this // point - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ) ); - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ); m_cellScalarResults[scalarResultIndex].resize( this->maxTimeStepCount() ); for ( size_t timeStepIdx = 0; timeStepIdx < this->maxTimeStepCount(); timeStepIdx++ ) @@ -1297,7 +1344,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu computeMobilePV(); } - if ( type == RiaDefines::GENERATED ) + if ( type == RiaDefines::ResultCatType::GENERATED ) { return cvf::UNDEFINED_SIZE_T; } @@ -1311,7 +1358,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu size_t tempGridCellCount = m_ownerMainGrid->totalTemporaryGridCellCount(); - if ( type == RiaDefines::DYNAMIC_NATIVE && timeStepCount > 0 ) + if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && timeStepCount > 0 ) { m_cellScalarResults[scalarResultIndex].resize( timeStepCount ); @@ -1334,7 +1381,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu } } } - else if ( type == RiaDefines::STATIC_NATIVE ) + else if ( type == RiaDefines::ResultCatType::STATIC_NATIVE ) { m_cellScalarResults[scalarResultIndex].resize( 1 ); @@ -1373,7 +1420,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu // Handle SourSimRL reading - if ( type == RiaDefines::SOURSIMRL ) + if ( type == RiaDefines::ResultCatType::SOURSIMRL ) { RifReaderEclipseOutput* eclReader = dynamic_cast( m_readerInterface.p() ); if ( eclReader ) @@ -1401,12 +1448,12 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultByResultTypeOrder( const RigEclipseResultAddress& resVarAddr, const std::vector& resultCategorySearchOrder ) { - std::set otherResultTypesToSearch = {RiaDefines::STATIC_NATIVE, - RiaDefines::DYNAMIC_NATIVE, - RiaDefines::SOURSIMRL, - RiaDefines::INPUT_PROPERTY, - RiaDefines::GENERATED, - RiaDefines::FORMATION_NAMES}; + std::set otherResultTypesToSearch = {RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::ResultCatType::SOURSIMRL, + RiaDefines::ResultCatType::INPUT_PROPERTY, + RiaDefines::ResultCatType::GENERATED, + RiaDefines::ResultCatType::FORMATION_NAMES}; for ( const auto& resultType : resultCategorySearchOrder ) { @@ -1447,7 +1494,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig QString resultName = resVarAddr.m_resultName; // Special handling for SOIL - if ( type == RiaDefines::DYNAMIC_NATIVE && resultName.toUpper() == "SOIL" ) + if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName.toUpper() == "SOIL" ) { size_t soilScalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr ); @@ -1464,7 +1511,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig return soilScalarResultIndex; } } - else if ( type == RiaDefines::DYNAMIC_NATIVE && resultName == RiaDefines::completionTypeResultName() ) + else if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName == RiaDefines::completionTypeResultName() ) { size_t completionTypeScalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr ); computeCompletionTypeForTimeStep( timeStepIndex ); @@ -1474,7 +1521,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr ); if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T; - if ( type == RiaDefines::GENERATED ) + if ( type == RiaDefines::ResultCatType::GENERATED ) { return cvf::UNDEFINED_SIZE_T; } @@ -1485,7 +1532,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig bool resultLoadingSucess = true; - if ( type == RiaDefines::DYNAMIC_NATIVE && timeStepCount > 0 ) + if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && timeStepCount > 0 ) { m_cellScalarResults[scalarResultIndex].resize( timeStepCount ); @@ -1498,7 +1545,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig } } } - else if ( type == RiaDefines::STATIC_NATIVE ) + else if ( type == RiaDefines::ResultCatType::STATIC_NATIVE ) { m_cellScalarResults[scalarResultIndex].resize( 1 ); @@ -1518,7 +1565,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig // Handle SourSimRL reading - if ( type == RiaDefines::SOURSIMRL ) + if ( type == RiaDefines::ResultCatType::SOURSIMRL ) { RifReaderEclipseOutput* eclReader = dynamic_cast( m_readerInterface.p() ); if ( eclReader ) @@ -1547,18 +1594,18 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex ) // Compute SGAS based on SWAT if the simulation contains no oil testAndComputeSgasForTimeStep( timeStepIndex ); - RigEclipseResultAddress SWATAddr( RiaDefines::DYNAMIC_NATIVE, "SWAT" ); - RigEclipseResultAddress SGASAddr( RiaDefines::DYNAMIC_NATIVE, "SGAS" ); - RigEclipseResultAddress SSOLAddr( RiaDefines::DYNAMIC_NATIVE, "SSOL" ); + RigEclipseResultAddress SWATAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ); + RigEclipseResultAddress SGASAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ); + RigEclipseResultAddress SSOLAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SSOL" ); size_t scalarIndexSWAT = - findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ), + findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ), timeStepIndex ); size_t scalarIndexSGAS = - findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ), + findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ), timeStepIndex ); size_t scalarIndexSSOL = - findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SSOL" ), + findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SSOL" ), timeStepIndex ); // Early exit if none of SWAT or SGAS is present @@ -1593,7 +1640,7 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex ) } // Make sure memory is allocated for the new SOIL results - RigEclipseResultAddress SOILAddr( RiaDefines::DYNAMIC_NATIVE, "SOIL" ); + RigEclipseResultAddress SOILAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ); size_t soilResultScalarIndex = this->findScalarResultIndexFromAddress( SOILAddr ); m_cellScalarResults[soilResultScalarIndex].resize( soilTimeStepCount ); @@ -1667,7 +1714,7 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex ) void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex ) { size_t scalarIndexSWAT = - findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SWAT" ), + findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ), timeStepIndex ); if ( scalarIndexSWAT == cvf::UNDEFINED_SIZE_T ) { @@ -1683,7 +1730,8 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex // Simulation type is gas and water. No SGAS is present, compute SGAS based on SWAT size_t scalarIndexSGAS = - this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SGAS" ), false ); + this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ), + false ); if ( m_cellScalarResults[scalarIndexSGAS].size() > timeStepIndex ) { std::vector& values = m_cellScalarResults[scalarIndexSGAS][timeStepIndex]; @@ -1745,13 +1793,18 @@ void RigCaseCellResultsData::computeDepthRelatedResults() size_t actCellCount = activeCellInfo()->reservoirActiveCellCount(); if ( actCellCount == 0 ) return; - size_t depthResultIndex = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DEPTH" ) ); - size_t dxResultIndex = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DX" ) ); - size_t dyResultIndex = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DY" ) ); - size_t dzResultIndex = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "DZ" ) ); - size_t topsResultIndex = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "TOPS" ) ); + size_t depthResultIndex = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH" ) ); + size_t dxResultIndex = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DX" ) ); + size_t dyResultIndex = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DY" ) ); + size_t dzResultIndex = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); + size_t topsResultIndex = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TOPS" ) ); size_t bottomResultIndex = - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "BOTTOM" ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "BOTTOM" ) ); bool computeDepth = false; bool computeDx = false; @@ -1762,38 +1815,41 @@ void RigCaseCellResultsData::computeDepthRelatedResults() if ( depthResultIndex == cvf::UNDEFINED_SIZE_T ) { - depthResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "DEPTH", false, actCellCount ); - computeDepth = true; + depthResultIndex = + this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH", false, actCellCount ); + computeDepth = true; } if ( dxResultIndex == cvf::UNDEFINED_SIZE_T ) { - dxResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "DX", false, actCellCount ); + dxResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DX", false, actCellCount ); computeDx = true; } if ( dyResultIndex == cvf::UNDEFINED_SIZE_T ) { - dyResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "DY", false, actCellCount ); + dyResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DY", false, actCellCount ); computeDy = true; } if ( dzResultIndex == cvf::UNDEFINED_SIZE_T ) { - dzResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "DZ", false, actCellCount ); + dzResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ", false, actCellCount ); computeDz = true; } if ( topsResultIndex == cvf::UNDEFINED_SIZE_T ) { - topsResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "TOPS", false, actCellCount ); - computeTops = true; + topsResultIndex = + this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "TOPS", false, actCellCount ); + computeTops = true; } if ( bottomResultIndex == cvf::UNDEFINED_SIZE_T ) { - bottomResultIndex = this->addStaticScalarResult( RiaDefines::STATIC_NATIVE, "BOTTOM", false, actCellCount ); - computeBottom = true; + bottomResultIndex = + this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "BOTTOM", false, actCellCount ); + computeBottom = true; } std::vector>& depth = m_cellScalarResults[depthResultIndex]; @@ -2018,15 +2074,16 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp // Get the needed result indices we depend on size_t permResultIdx = - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, permCompName ) ); - size_t ntgResultIdx = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, permCompName ) ); + size_t ntgResultIdx = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); bool hasNTGResults = ntgResultIdx != cvf::UNDEFINED_SIZE_T; // Get the result index of the output size_t riTransResultIdx = this->findScalarResultIndexFromAddress( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, riTransComponentResultName ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) ); CVF_ASSERT( riTransResultIdx != cvf::UNDEFINED_SIZE_T ); // Get the result count, to handle that one of them might be globally defined @@ -2058,15 +2115,15 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp ResultIndexFunction permIdxFunc = nullptr; ResultIndexFunction ntgIdxFunc = nullptr; { - bool isPermUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, permCompName ) ); + bool isPermUsingResIdx = this->isUsingGlobalActiveIndex( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, permCompName ) ); bool isTransUsingResIdx = this->isUsingGlobalActiveIndex( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, riTransComponentResultName ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) ); bool isNtgUsingResIdx = false; if ( hasNTGResults ) { - isNtgUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + isNtgUsingResIdx = this->isUsingGlobalActiveIndex( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); } // Set up result index function pointers @@ -2175,18 +2232,23 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp //-------------------------------------------------------------------------------------------------- void RigCaseCellResultsData::computeNncCombRiTrans() { - RigEclipseResultAddress riCombTransEclResAddr( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiTranResultName() ); + RigEclipseResultAddress riCombTransEclResAddr( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedRiTranResultName() ); if ( m_ownerMainGrid->nncData()->staticConnectionScalarResult( riCombTransEclResAddr ) ) return; double cdarchy = darchysValue(); // Get the needed result indices we depend on - size_t permXResultIdx = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); - size_t permYResultIdx = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); - size_t permZResultIdx = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + size_t permXResultIdx = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) ); + size_t permYResultIdx = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) ); + size_t permZResultIdx = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) ); - size_t ntgResultIdx = findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + size_t ntgResultIdx = + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); bool hasNTGResults = ntgResultIdx != cvf::UNDEFINED_SIZE_T; @@ -2212,16 +2274,16 @@ void RigCaseCellResultsData::computeNncCombRiTrans() ResultIndexFunction ntgIdxFunc = nullptr; { bool isPermXUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMX" ) ); + this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) ); bool isPermYUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMY" ) ); + this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) ); bool isPermZUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PERMZ" ) ); + this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) ); bool isNtgUsingResIdx = false; if ( hasNTGResults ) { - isNtgUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) ); + isNtgUsingResIdx = this->isUsingGlobalActiveIndex( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); } // Set up result index function pointers @@ -2398,14 +2460,14 @@ void RigCaseCellResultsData::computeRiMULTComponent( const QString& riMultCompNa // Get the needed result indices we depend on size_t transResultIdx = - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, transCompName ) ); - size_t riTransResultIdx = - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, riTransCompName ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, transCompName ) ); + size_t riTransResultIdx = findOrLoadKnownScalarResult( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransCompName ) ); // Get the result index of the output - size_t riMultResultIdx = - this->findScalarResultIndexFromAddress( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, riMultCompName ) ); + size_t riMultResultIdx = this->findScalarResultIndexFromAddress( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riMultCompName ) ); CVF_ASSERT( riMultResultIdx != cvf::UNDEFINED_SIZE_T ); // Get the result count, to handle that one of them might be globally defined @@ -2436,11 +2498,11 @@ void RigCaseCellResultsData::computeRiMULTComponent( const QString& riMultCompNa void RigCaseCellResultsData::computeNncCombRiMULT() { auto riCombMultEclResAddr = - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiMultResultName() ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedRiMultResultName() ); auto riCombTransEclResAddr = - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiTranResultName() ); - auto combTransEclResAddr = - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName() ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::combinedRiTranResultName() ); + auto combTransEclResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedTransmissibilityResultName() ); if ( m_ownerMainGrid->nncData()->staticConnectionScalarResult( riCombMultEclResAddr ) ) return; @@ -2497,12 +2559,12 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra // Get the needed result indices we depend on size_t tranCompScResIdx = - findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, transCompName ) ); + findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, transCompName ) ); // Get the result index of the output size_t riTranByAreaScResIdx = this->findScalarResultIndexFromAddress( - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, riTransByAreaCompResultName ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransByAreaCompResultName ) ); CVF_ASSERT( riTranByAreaScResIdx != cvf::UNDEFINED_SIZE_T ); // Get the result count, to handle that one of them might be globally defined @@ -2520,8 +2582,8 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra // Prepare how to index the result values: - bool isUsingResIdx = - this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, transCompName ) ); + bool isUsingResIdx = this->isUsingGlobalActiveIndex( + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, transCompName ) ); // Set up result index function pointers @@ -2581,10 +2643,10 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra //-------------------------------------------------------------------------------------------------- void RigCaseCellResultsData::computeNncCombRiTRANSbyArea() { - auto riCombTransByAreaEclResAddr = - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiAreaNormTranResultName() ); - auto combTransEclResAddr = - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName() ); + auto riCombTransByAreaEclResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedRiAreaNormTranResultName() ); + auto combTransEclResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::combinedTransmissibilityResultName() ); if ( m_ownerMainGrid->nncData()->staticConnectionScalarResult( riCombTransByAreaEclResAddr ) ) return; @@ -2619,7 +2681,7 @@ void RigCaseCellResultsData::computeNncCombRiTRANSbyArea() void RigCaseCellResultsData::computeCompletionTypeForTimeStep( size_t timeStep ) { size_t completionTypeResultIndex = this->findScalarResultIndexFromAddress( - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() ) ); + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() ) ); if ( m_cellScalarResults[completionTypeResultIndex].size() < this->maxTimeStepCount() ) { @@ -2659,7 +2721,7 @@ double RigCaseCellResultsData::darchysValue() void RigCaseCellResultsData::computeCellVolumes() { size_t cellVolIdx = - this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riCellVolumeResultName() ), false ); @@ -2688,7 +2750,7 @@ void RigCaseCellResultsData::computeCellVolumes() } // Clear oil volume so it will have to be recalculated. - clearScalarResult( RiaDefines::DYNAMIC_NATIVE, RiaDefines::riOilVolumeResultName() ); + clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::riOilVolumeResultName() ); } //-------------------------------------------------------------------------------------------------- @@ -2697,15 +2759,17 @@ void RigCaseCellResultsData::computeCellVolumes() void RigCaseCellResultsData::computeOilVolumes() { size_t cellVolIdx = - this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::riCellVolumeResultName() ), false ); const std::vector& cellVolumeResults = m_cellScalarResults[cellVolIdx][0]; - size_t soilIdx = this->findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "SOIL" ) ); - size_t oilVolIdx = this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, - RiaDefines::riOilVolumeResultName() ), - false ); + size_t soilIdx = + this->findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ); + size_t oilVolIdx = + this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::riOilVolumeResultName() ), + false ); m_cellScalarResults[oilVolIdx].resize( this->maxTimeStepCount() ); size_t cellResultCount = m_activeCellInfo->reservoirCellResultCount(); @@ -2760,9 +2824,10 @@ void RigCaseCellResultsData::computeMobilePV() multpvResults = RigCaseCellResultsData::getResultIndexableStaticResult( this->activeCellInfo(), this, "MULTPV", multpvDataTemp ); - size_t mobPVIdx = this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, - RiaDefines::mobilePoreVolumeName() ), - false ); + size_t mobPVIdx = + this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::mobilePoreVolumeName() ), + false ); std::vector& mobPVResults = m_cellScalarResults[mobPVIdx][0]; @@ -2837,13 +2902,13 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF m_activeFormationNamesData = activeFormationNames; size_t totalGlobCellCount = m_ownerMainGrid->globalCellArray().size(); - this->addStaticScalarResult( RiaDefines::FORMATION_NAMES, + this->addStaticScalarResult( RiaDefines::ResultCatType::FORMATION_NAMES, RiaDefines::activeFormationNamesResultName(), false, totalGlobCellCount ); std::vector* fnData = - this->modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::FORMATION_NAMES, + this->modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES, RiaDefines::activeFormationNamesResultName() ), 0 ); @@ -3011,16 +3076,16 @@ void RigCaseCellResultsData::computeAllenResults( RigCaseCellResultsData* cellRe CVF_ASSERT( mainGrid ); CVF_ASSERT( cellResultsData ); - auto fnNamesResAddr = - RigEclipseResultAddress( RiaDefines::FORMATION_NAMES, RiaDefines::activeFormationNamesResultName() ); + auto fnNamesResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES, + RiaDefines::activeFormationNamesResultName() ); bool hasFormationData = cellResultsData->hasResultEntry( fnNamesResAddr ); if ( hasFormationData ) { auto fnAllenResultResAddr = - RigEclipseResultAddress( RiaDefines::ALLEN_DIAGRAMS, RiaDefines::formationAllenResultName() ); - auto fnBinAllenResAddr = - RigEclipseResultAddress( RiaDefines::ALLEN_DIAGRAMS, RiaDefines::formationBinaryAllenResultName() ); + RigEclipseResultAddress( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, RiaDefines::formationAllenResultName() ); + auto fnBinAllenResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, + RiaDefines::formationBinaryAllenResultName() ); // Create and retreive nnc result arrays @@ -3038,11 +3103,11 @@ void RigCaseCellResultsData::computeAllenResults( RigCaseCellResultsData* cellRe // Add a result entry for the special allen grid data (used only for the grid cells without nnc coverage) - cellResultsData->addStaticScalarResult( RiaDefines::ALLEN_DIAGRAMS, + cellResultsData->addStaticScalarResult( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, RiaDefines::formationAllenResultName(), false, fnData.size() ); - cellResultsData->addStaticScalarResult( RiaDefines::ALLEN_DIAGRAMS, + cellResultsData->addStaticScalarResult( RiaDefines::ResultCatType::ALLEN_DIAGRAMS, RiaDefines::formationBinaryAllenResultName(), false, fnData.size() ); @@ -3149,41 +3214,41 @@ size_t RigCaseCellResultsData::findScalarResultIndexFromAddress( const RigEclips { return cvf::UNDEFINED_SIZE_T; } - else if ( resVarAddr.m_resultCatType == RiaDefines::UNDEFINED ) + else if ( resVarAddr.m_resultCatType == RiaDefines::ResultCatType::UNDEFINED ) { RigEclipseResultAddress resVarAddressWithType = resVarAddr; - resVarAddressWithType.m_resultCatType = RiaDefines::STATIC_NATIVE; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::STATIC_NATIVE; size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) { - resVarAddressWithType.m_resultCatType = RiaDefines::DYNAMIC_NATIVE; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::DYNAMIC_NATIVE; scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); } if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) { - resVarAddressWithType.m_resultCatType = RiaDefines::SOURSIMRL; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::SOURSIMRL; scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); } if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) { - resVarAddressWithType.m_resultCatType = RiaDefines::GENERATED; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::GENERATED; scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); } if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) { - resVarAddressWithType.m_resultCatType = RiaDefines::INPUT_PROPERTY; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::INPUT_PROPERTY; scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); } if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) { - resVarAddressWithType.m_resultCatType = RiaDefines::FORMATION_NAMES; + resVarAddressWithType.m_resultCatType = RiaDefines::ResultCatType::FORMATION_NAMES; scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType ); } diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseResultAddress.h b/ApplicationCode/ReservoirDataModel/RigEclipseResultAddress.h index 919991cf23..3b4c1734fd 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseResultAddress.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseResultAddress.h @@ -25,14 +25,14 @@ class RigEclipseResultAddress { public: RigEclipseResultAddress() - : m_resultCatType( RiaDefines::UNDEFINED ) + : m_resultCatType( RiaDefines::ResultCatType::UNDEFINED ) , m_timeLapseBaseFrameIdx( NO_TIME_LAPSE ) , m_differenceCaseId( NO_CASE_DIFF ) { } explicit RigEclipseResultAddress( const QString& resultName ) - : m_resultCatType( RiaDefines::UNDEFINED ) + : m_resultCatType( RiaDefines::ResultCatType::UNDEFINED ) , m_resultName( resultName ) , m_timeLapseBaseFrameIdx( NO_TIME_LAPSE ) , m_differenceCaseId( NO_CASE_DIFF ) diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp index f7e47bb00b..5b61e21477 100644 --- a/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp @@ -562,16 +562,22 @@ void RigFlowDiagSolverInterface::assignPhaseCorrecedPORV( RigFlowDiagResultAddre switch ( phaseSelection ) { case RigFlowDiagResultAddress::PHASE_OIL: - phaseSaturation = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SOIL", timeStepIdx ); + phaseSaturation = eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "SOIL", + timeStepIdx ); break; case RigFlowDiagResultAddress::PHASE_GAS: - phaseSaturation = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SGAS", timeStepIdx ); + phaseSaturation = eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "SGAS", + timeStepIdx ); break; case RigFlowDiagResultAddress::PHASE_WAT: - phaseSaturation = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SWAT", timeStepIdx ); + phaseSaturation = eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + "SWAT", + timeStepIdx ); break; default: m_opmFlowDiagStaticData->m_fldToolbox->assignPoreVolume( m_opmFlowDiagStaticData->m_poreVolume ); diff --git a/ApplicationCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp index 18807f7e6f..5d951b0441 100644 --- a/ApplicationCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp @@ -73,7 +73,7 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator std::vector tracerResAddrs; for ( QString tracerName : tracerNames ) { - RigEclipseResultAddress tracerResAddr( RiaDefines::DYNAMIC_NATIVE, tracerName ); + RigEclipseResultAddress tracerResAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, tracerName ); if ( gridCellResults->ensureKnownResultLoaded( tracerResAddr ) ) { tracerResAddrs.push_back( tracerResAddr ); @@ -83,9 +83,9 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator std::vector> summedTracersAtAllTimesteps; // TODO: Option for Oil and Gas instead of water - RigEclipseResultAddress flrWatIAddr( RiaDefines::DYNAMIC_NATIVE, "FLRWATI+" ); - RigEclipseResultAddress flrWatJAddr( RiaDefines::DYNAMIC_NATIVE, "FLRWATJ+" ); - RigEclipseResultAddress flrWatKAddr( RiaDefines::DYNAMIC_NATIVE, "FLRWATK+" ); + RigEclipseResultAddress flrWatIAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATI+" ); + RigEclipseResultAddress flrWatJAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATJ+" ); + RigEclipseResultAddress flrWatKAddr( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATK+" ); bool hasFlowrateI = gridCellResults->ensureKnownResultLoaded( flrWatIAddr ); progress.incrementProgress(); diff --git a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp index 7a63de8147..4cb629c283 100644 --- a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp +++ b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp @@ -95,8 +95,8 @@ cvf::ref RigResultAccessorFactory::createFromResultAddress( c } size_t adjustedTimeStepIndex = timeStepIndex; - if ( resVarAddr.m_resultCatType == RiaDefines::STATIC_NATIVE || - resVarAddr.m_resultCatType == RiaDefines::FORMATION_NAMES ) + if ( resVarAddr.m_resultCatType == RiaDefines::ResultCatType::STATIC_NATIVE || + resVarAddr.m_resultCatType == RiaDefines::ResultCatType::FORMATION_NAMES ) { adjustedTimeStepIndex = 0; } diff --git a/ApplicationCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp index 1d6847df84..d0dda3423d 100644 --- a/ApplicationCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp @@ -45,13 +45,13 @@ RigTofAccumulatedPhaseFractionsCalculator::RigTofAccumulatedPhaseFractionsCalcul if ( !eclipseCaseData ) return; const std::vector* swatResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SWAT", timestep ); + eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT", timestep ); const std::vector* soilResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SOIL", timestep ); + eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL", timestep ); const std::vector* sgasResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SGAS", timestep ); + eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS", timestep ); const std::vector* porvResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::STATIC_NATIVE, "PORV", 0 ); + eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::ResultCatType::STATIC_NATIVE, "PORV", 0 ); RimFlowDiagSolution* flowDiagSolution = caseToApply->defaultFlowDiagSolution(); diff --git a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp index 6047648b24..6b0dbebd0e 100644 --- a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp @@ -61,7 +61,7 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe CVF_ASSERT( flowDiagResults ); const std::vector* porvResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::STATIC_NATIVE, "PORV", 0 ); + eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::ResultCatType::STATIC_NATIVE, "PORV", 0 ); if ( !porvResults ) { return; @@ -74,8 +74,10 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe phaseResultName = "SOIL"; else if ( phase == RiaDefines::GAS_PHASE ) phaseResultName = "SGAS"; - const std::vector* phaseResults = - eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, phaseResultName, timeStepIndex ); + const std::vector* phaseResults = eclipseCaseData->resultValues( RiaDefines::MATRIX_MODEL, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + phaseResultName, + timeStepIndex ); if ( !phaseResults ) { return; diff --git a/ApplicationCode/SocketInterface/RiaNNCCommands.cpp b/ApplicationCode/SocketInterface/RiaNNCCommands.cpp index 60099e52a4..3effaab316 100644 --- a/ApplicationCode/SocketInterface/RiaNNCCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaNNCCommands.cpp @@ -444,7 +444,7 @@ private: static bool scalarResultExistsOrCreate( RigCaseCellResultsData* results, QString propertyName ) { - RigEclipseResultAddress resAddr( RiaDefines::GENERATED, propertyName ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::GENERATED, propertyName ); if ( !results->ensureKnownResultLoaded( resAddr ) ) { diff --git a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp index 439cbed28e..a57fee2d2c 100644 --- a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp @@ -427,7 +427,7 @@ public: if ( rimCase && rimCase->results( m_porosityModelEnum ) ) { - RigEclipseResultAddress eclResAddr( RiaDefines::GENERATED, propertyName ); + RigEclipseResultAddress eclResAddr( RiaDefines::ResultCatType::GENERATED, propertyName ); if ( !rimCase->results( m_porosityModelEnum )->ensureKnownResultLoaded( eclResAddr ) ) { @@ -844,7 +844,7 @@ public: if ( rimCase && rimCase->results( m_porosityModelEnum ) ) { - RigEclipseResultAddress resAddr( RiaDefines::GENERATED, propertyName ); + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::GENERATED, propertyName ); if ( !rimCase->results( m_porosityModelEnum )->ensureKnownResultLoaded( resAddr ) ) { @@ -1179,18 +1179,18 @@ public: std::vector resTypes; std::vector resTypeNames; - resTypes.push_back( RiaDefines::DYNAMIC_NATIVE ); + resTypes.push_back( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); resTypeNames.push_back( "DynamicNative" ); - resTypes.push_back( RiaDefines::SOURSIMRL ); + resTypes.push_back( RiaDefines::ResultCatType::SOURSIMRL ); resTypeNames.push_back( "SourSimRL" ); - resTypes.push_back( RiaDefines::STATIC_NATIVE ); + resTypes.push_back( RiaDefines::ResultCatType::STATIC_NATIVE ); resTypeNames.push_back( "StaticNative" ); - resTypes.push_back( RiaDefines::GENERATED ); + resTypes.push_back( RiaDefines::ResultCatType::GENERATED ); resTypeNames.push_back( "Generated" ); - resTypes.push_back( RiaDefines::INPUT_PROPERTY ); + resTypes.push_back( RiaDefines::ResultCatType::INPUT_PROPERTY ); resTypeNames.push_back( "Input" ); #ifdef ENABLE_SOURING - resTypes.push_back( RiaDefines::INJECTION_FLOODING ); + resTypes.push_back( RiaDefines::ResultCatType::INJECTION_FLOODING ); resTypeNames.push_back( "Injection Flooding" ); #endif /* ENABLE_SOURING */ diff --git a/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp b/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp index 30b5b2e87d..25eadb3254 100644 --- a/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp +++ b/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp @@ -60,11 +60,11 @@ TEST( RigReservoirTest, BasicTest10k ) { RigCaseCellResultsData* cellData = reservoir->results( MATRIX_MODEL ); - QStringList staticResults = cellData->resultNames( STATIC_NATIVE ); + QStringList staticResults = cellData->resultNames( ResultCatType::STATIC_NATIVE ); EXPECT_EQ( 0, staticResults.size() ); // qDebug() << "Static results\n" << staticResults; - QStringList dynamicResults = cellData->resultNames( DYNAMIC_NATIVE ); + QStringList dynamicResults = cellData->resultNames( ResultCatType::DYNAMIC_NATIVE ); EXPECT_EQ( 0, dynamicResults.size() ); // qDebug() << "Dynamic results\n" << dynamicResults; @@ -83,11 +83,11 @@ TEST( RigReservoirTest, BasicTest10k ) { RigCaseCellResultsData* cellData = reservoir->results( MATRIX_MODEL ); - QStringList staticResults = cellData->resultNames( STATIC_NATIVE ); + QStringList staticResults = cellData->resultNames( ResultCatType::STATIC_NATIVE ); EXPECT_EQ( 44, staticResults.size() ); // qDebug() << "Static results\n" << staticResults; - QStringList dynamicResults = cellData->resultNames( DYNAMIC_NATIVE ); + QStringList dynamicResults = cellData->resultNames( ResultCatType::DYNAMIC_NATIVE ); EXPECT_EQ( 23, dynamicResults.size() ); // qDebug() << "Dynamic results\n" << dynamicResults; diff --git a/ApplicationCode/UserInterface/RiuPvtPlotUpdater.cpp b/ApplicationCode/UserInterface/RiuPvtPlotUpdater.cpp index 6ef4b933a9..5bf88c705a 100644 --- a/ApplicationCode/UserInterface/RiuPvtPlotUpdater.cpp +++ b/ApplicationCode/UserInterface/RiuPvtPlotUpdater.cpp @@ -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 rsAccessor = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) ); cvf::ref rvAccessor = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) ); cvf::ref pressureAccessor = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) ); cvf::ref pvtnumAccessor = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, - RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) ); RiuPvtPlotPanel::CellValues cellValues; diff --git a/ApplicationCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp b/ApplicationCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp index bf7202630c..fd7f7493b9 100644 --- a/ApplicationCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp +++ b/ApplicationCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp @@ -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 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 sgasAccessor = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ); cvf::ref 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; diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp index 44e5bfe624..612dd6089e 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp @@ -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* 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 dataAccessObjectX = RigResultAccessorFactory::createFromResultAddress( eclipseCase, gridIndex, porosityModel, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) ); cvf::ref dataAccessObjectY = RigResultAccessorFactory::createFromResultAddress( eclipseCase, gridIndex, porosityModel, timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ); cvf::ref 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 dataAccessObjectY = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) ); cvf::ref dataAccessObjectZ = RigResultAccessorFactory::createFromResultAddress( eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, - RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, + RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SWAT" ) ); double scalarValue = 0.0;