From 7f8aead2c6c2f067ab35514614a0ec53281ae57d Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 26 Mar 2025 13:13:19 +0100 Subject: [PATCH] #12303 Well Target Mapping: Rename result vector to "WELL_TARGET_NUM". --- .../ProjectDataModel/RimWellTargetMapping.cpp | 2 +- .../Well/RigWellTargetMapping.cpp | 14 +++++++++++--- .../ReservoirDataModel/Well/RigWellTargetMapping.h | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp index 02db093425..038645f8e1 100644 --- a/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp @@ -159,7 +159,7 @@ void RimWellTargetMapping::fieldChangedByUi( const caf::PdmFieldHandle* changedF { auto eclipseView = views.front(); eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::GENERATED ); - eclipseView->cellResult()->setResultVariable( "CLUSTERS_NUM" ); + eclipseView->cellResult()->setResultVariable( RigWellTargetMapping::wellTargetResultName() ); if ( RiaGuiApplication::isRunning() || RiuMainWindow::instance() ) { diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp index 9a03d50ef6..eab9211956 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp @@ -168,7 +168,7 @@ void RigWellTargetMapping::generateCandidates( RimEclipseCase* eclipseCa auto milliseconds = std::chrono::duration_cast( finish - start ); RiaLogging::info( QString( "Time spent: %1 ms" ).arg( milliseconds.count() ) ); - QString resultName = "CLUSTERS_NUM"; + QString resultName = RigWellTargetMapping::wellTargetResultName(); createResultVector( *eclipseCase, resultName, clusters ); // Update views and property filters @@ -739,7 +739,7 @@ RimRegularGridCase* RigWellTargetMapping::generateEnsembleCandidates( RimEclipse cvf::BoundingBox boundingBox; for ( auto eclipseCase : ensemble.cases() ) { - cvf::BoundingBox bb = computeBoundingBoxForResult( *eclipseCase, "CLUSTERS_NUM", 0 ); + cvf::BoundingBox bb = computeBoundingBoxForResult( *eclipseCase, RigWellTargetMapping::wellTargetResultName(), 0 ); boundingBox.add( bb ); } @@ -870,7 +870,7 @@ void RigWellTargetMapping::accumulateResultsForSingleCase( RimEclipseCase& occupancy.resize( targetNumActiveCells, 0 ); - RigEclipseResultAddress clustersNumAddress( RiaDefines::ResultCatType::GENERATED, "CLUSTERS_NUM" ); + RigEclipseResultAddress clustersNumAddress( RiaDefines::ResultCatType::GENERATED, RigWellTargetMapping::wellTargetResultName() ); resultsData->ensureKnownResultLoaded( clustersNumAddress ); const std::vector& clusterNum = resultsData->cellScalarResults( clustersNumAddress, 0 ); @@ -968,3 +968,11 @@ std::list, size_ return foundCells; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RigWellTargetMapping::wellTargetResultName() +{ + return "WELL_TARGET_NUM"; +} diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h index 601d514692..137781fc9a 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h @@ -111,6 +111,8 @@ public: VolumeResultType volumeResultType, const ClusteringLimits& limits ); + static QString wellTargetResultName(); + class ClusterStatistics { public: