From 12a4dd325ba24772cc8649f0949365efdfac2731 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 13 Dec 2024 16:12:13 +0100 Subject: [PATCH] Rename. --- .../FileInterface/CMakeLists_files.cmake | 4 +-- ...odel.cpp => RifReaderRegularGridModel.cpp} | 20 ++++++------- ...BoxModel.h => RifReaderRegularGridModel.h} | 6 ++-- .../ProjectDataModel/CMakeLists_files.cmake | 4 +-- ...dingBoxCase.cpp => RimRegularGridCase.cpp} | 16 +++++----- ...BoundingBoxCase.h => RimRegularGridCase.h} | 4 +-- .../RimWellTargetCandidatesGenerator.cpp | 29 ++++++++++--------- .../Well/RigWellTargetCandidatesGenerator.cpp | 6 ++-- .../Well/RigWellTargetCandidatesGenerator.h | 4 +-- 9 files changed, 48 insertions(+), 45 deletions(-) rename ApplicationLibCode/FileInterface/{RifReaderBoundingBoxModel.cpp => RifReaderRegularGridModel.cpp} (87%) rename ApplicationLibCode/FileInterface/{RifReaderBoundingBoxModel.h => RifReaderRegularGridModel.h} (92%) rename ApplicationLibCode/ProjectDataModel/{RimEclipseBoundingBoxCase.cpp => RimRegularGridCase.cpp} (84%) rename ApplicationLibCode/ProjectDataModel/{RimEclipseBoundingBoxCase.h => RimRegularGridCase.h} (93%) diff --git a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake index f0169d2a2f..18dbb395f0 100644 --- a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake @@ -102,7 +102,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RifAsciiDataParseOptions.h ${CMAKE_CURRENT_LIST_DIR}/RifByteArrayArrowRandomAccessFile.h ${CMAKE_CURRENT_LIST_DIR}/RifArrowTools.h - ${CMAKE_CURRENT_LIST_DIR}/RifReaderBoundingBoxModel.h + ${CMAKE_CURRENT_LIST_DIR}/RifReaderRegularGridModel.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -202,7 +202,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RifOsduWellLogReader.cpp ${CMAKE_CURRENT_LIST_DIR}/RifByteArrayArrowRandomAccessFile.cpp ${CMAKE_CURRENT_LIST_DIR}/RifArrowTools.cpp - ${CMAKE_CURRENT_LIST_DIR}/RifReaderBoundingBoxModel.cpp + ${CMAKE_CURRENT_LIST_DIR}/RifReaderRegularGridModel.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) diff --git a/ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.cpp b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp similarity index 87% rename from ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.cpp rename to ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp index d010e492ab..eed8e8f674 100644 --- a/ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.cpp +++ b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp @@ -16,7 +16,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RifReaderBoundingBoxModel.h" +#include "RifReaderRegularGridModel.h" #include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" @@ -24,7 +24,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifReaderBoundingBoxModel::RifReaderBoundingBoxModel() +RifReaderRegularGridModel::RifReaderRegularGridModel() : m_reservoir( nullptr ) { } @@ -32,14 +32,14 @@ RifReaderBoundingBoxModel::RifReaderBoundingBoxModel() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifReaderBoundingBoxModel::~RifReaderBoundingBoxModel() +RifReaderRegularGridModel::~RifReaderRegularGridModel() { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderBoundingBoxModel::open( const QString& fileName, RigEclipseCaseData* eclipseCase ) +bool RifReaderRegularGridModel::open( const QString& fileName, RigEclipseCaseData* eclipseCase ) { m_reservoirBuilder.createGridsAndCells( eclipseCase ); m_reservoir = eclipseCase; @@ -49,7 +49,7 @@ bool RifReaderBoundingBoxModel::open( const QString& fileName, RigEclipseCaseDat //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderBoundingBoxModel::inputProperty( const QString& propertyName, std::vector* values ) +bool RifReaderRegularGridModel::inputProperty( const QString& propertyName, std::vector* values ) { CAF_ASSERT( false ); @@ -59,7 +59,7 @@ bool RifReaderBoundingBoxModel::inputProperty( const QString& propertyName, std: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderBoundingBoxModel::staticResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector* values ) +bool RifReaderRegularGridModel::staticResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector* values ) { CAF_ASSERT( false ); return true; @@ -68,7 +68,7 @@ bool RifReaderBoundingBoxModel::staticResult( const QString& result, RiaDefines: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderBoundingBoxModel::dynamicResult( const QString& result, +bool RifReaderRegularGridModel::dynamicResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector* values ) @@ -80,7 +80,7 @@ bool RifReaderBoundingBoxModel::dynamicResult( const QString& res //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RifReaderBoundingBoxModel::setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf::Vec3d maxWorldCoordinate ) +void RifReaderRegularGridModel::setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf::Vec3d maxWorldCoordinate ) { m_reservoirBuilder.setWorldCoordinates( minWorldCoordinate, maxWorldCoordinate ); } @@ -88,7 +88,7 @@ void RifReaderBoundingBoxModel::setWorldCoordinates( cvf::Vec3d minWorldCoordina //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RifReaderBoundingBoxModel::setGridPointDimensions( const cvf::Vec3st& gridPointDimensions ) +void RifReaderRegularGridModel::setGridPointDimensions( const cvf::Vec3st& gridPointDimensions ) { m_reservoirBuilder.setIJKCount( gridPointDimensions ); } @@ -96,7 +96,7 @@ void RifReaderBoundingBoxModel::setGridPointDimensions( const cvf::Vec3st& gridP //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RifReaderBoundingBoxModel::addLocalGridRefinement( const cvf::Vec3st& minCellPosition, +void RifReaderRegularGridModel::addLocalGridRefinement( const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors ) { diff --git a/ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.h b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h similarity index 92% rename from ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.h rename to ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h index 8a2e38ff54..e048885a28 100644 --- a/ApplicationLibCode/FileInterface/RifReaderBoundingBoxModel.h +++ b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h @@ -21,11 +21,11 @@ #include "RifReaderInterface.h" #include "RigReservoirBuilder.h" -class RifReaderBoundingBoxModel : public RifReaderInterface +class RifReaderRegularGridModel : public RifReaderInterface { public: - RifReaderBoundingBoxModel(); - ~RifReaderBoundingBoxModel() override; + RifReaderRegularGridModel(); + ~RifReaderRegularGridModel() override; void setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf::Vec3d maxWorldCoordinate ); void setGridPointDimensions( const cvf::Vec3st& gridPointDimensions ); diff --git a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake index 663218c7e9..8eb0e645e5 100644 --- a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake @@ -137,7 +137,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.h ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapProjection.h ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapView.h - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseBoundingBoxCase.h + ${CMAKE_CURRENT_LIST_DIR}/RimRegularGridCase.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -275,7 +275,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.cpp ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapProjection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapView.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseBoundingBoxCase.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimRegularGridCase.cpp ) if(RESINSIGHT_USE_QT_CHARTS) diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.cpp b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp similarity index 84% rename from ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.cpp rename to ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp index ebb737d66d..821e169a1c 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp @@ -16,18 +16,18 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RimEclipseBoundingBoxCase.h" +#include "RimRegularGridCase.h" -#include "RifReaderBoundingBoxModel.h" +#include "RifReaderRegularGridModel.h" #include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" -CAF_PDM_SOURCE_INIT( RimEclipseBoundingBoxCase, "EclipseBoundingBoxCase" ); +CAF_PDM_SOURCE_INIT( RimRegularGridCase, "EclipseBoundingBoxCase" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseBoundingBoxCase::RimEclipseBoundingBoxCase() +RimRegularGridCase::RimRegularGridCase() { CAF_PDM_InitObject( "Bounding Box Case", ":/Case48x48.png", "", "Bounding Box Case" ); @@ -42,7 +42,7 @@ RimEclipseBoundingBoxCase::RimEclipseBoundingBoxCase() /// //-------------------------------------------------------------------------------------------------- -void RimEclipseBoundingBoxCase::setBoundingBox( const cvf::BoundingBox& boundingBox ) +void RimRegularGridCase::setBoundingBox( const cvf::BoundingBox& boundingBox ) { m_minimum = boundingBox.min(); m_maximum = boundingBox.max(); @@ -51,9 +51,9 @@ void RimEclipseBoundingBoxCase::setBoundingBox( const cvf::BoundingBox& bounding //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RimEclipseBoundingBoxCase::createModel( QString modelName ) +cvf::ref RimRegularGridCase::createModel( QString modelName ) { - cvf::ref reader = new RifReaderBoundingBoxModel; + cvf::ref reader = new RifReaderRegularGridModel; cvf::ref reservoir = new RigEclipseCaseData( this ); reader->setWorldCoordinates( m_minimum, m_maximum ); @@ -71,7 +71,7 @@ cvf::ref RimEclipseBoundingBoxCase::createModel( QString mod //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimEclipseBoundingBoxCase::openEclipseGridFile() +bool RimRegularGridCase::openEclipseGridFile() { if ( eclipseCaseData() ) return true; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.h b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h similarity index 93% rename from ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.h rename to ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h index 1c8a171940..898c388bf0 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseBoundingBoxCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h @@ -30,12 +30,12 @@ // // //================================================================================================== -class RimEclipseBoundingBoxCase : public RimEclipseResultCase +class RimRegularGridCase : public RimEclipseResultCase { CAF_PDM_HEADER_INIT; public: - RimEclipseBoundingBoxCase(); + RimRegularGridCase(); void setBoundingBox( const cvf::BoundingBox& boundingBox ); diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp index 148d0d1c30..613cc25378 100644 --- a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp @@ -18,18 +18,21 @@ #include "RimWellTargetCandidatesGenerator.h" +#include "RiaGuiApplication.h" #include "RiaLogging.h" #include "RiaPorosityModel.h" #include "RiaResultNames.h" +#include "RiuMainWindow.h" #include "RigCaseCellResultsData.h" #include "RigEclipseResultAddress.h" -#include "RimEclipseBoundingBoxCase.h" +#include "RimRegularGridCase.h" #include "Well/RigWellTargetCandidatesGenerator.h" #include "RimEclipseCase.h" #include "RimEclipseCaseCollection.h" #include "RimEclipseCaseEnsemble.h" +#include "RimEclipseCellColors.h" #include "RimEclipseView.h" #include "RimOilField.h" #include "RimProject.h" @@ -307,12 +310,12 @@ void RimWellTargetCandidatesGenerator::generateEnsembleStatistics() if ( !ensemble ) return; RigWellTargetCandidatesGenerator::ClusteringLimits limits = getClusteringLimits(); - RimEclipseBoundingBoxCase* boundingBoxCase = RigWellTargetCandidatesGenerator::generateEnsembleCandidates( *ensemble, - m_timeStep(), - m_volumeType(), - m_volumesType(), - m_volumeResultType(), - limits ); + RimRegularGridCase* regularGridCase = RigWellTargetCandidatesGenerator::generateEnsembleCandidates( *ensemble, + m_timeStep(), + m_volumeType(), + m_volumesType(), + m_volumeResultType(), + limits ); RimProject* project = RimProject::current(); if ( !project ) return; @@ -320,16 +323,16 @@ void RimWellTargetCandidatesGenerator::generateEnsembleStatistics() RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr; if ( !analysisModels ) return; - analysisModels->cases.push_back( boundingBoxCase ); + analysisModels->cases.push_back( regularGridCase ); - auto eclipseView = boundingBoxCase->createAndAddReservoirView(); + auto eclipseView = regularGridCase->createAndAddReservoirView(); // eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::INPUT_PROPERTY ); - // if ( RiaGuiApplication::isRunning() ) - // { - // if ( RiuMainWindow::instance() ) RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() ); - // } + if ( RiaGuiApplication::isRunning() || RiuMainWindow::instance() ) + { + RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() ); + } eclipseView->loadDataAndUpdate(); diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp index 535ac307b9..7f2eb03e6f 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp @@ -29,7 +29,7 @@ #include "RigMainGrid.h" #include "RigStatisticsMath.h" -#include "RimEclipseBoundingBoxCase.h" +#include "RimRegularGridCase.h" #include "RimEclipseCase.h" #include "RimEclipseCaseEnsemble.h" #include "RimEclipseView.h" @@ -703,7 +703,7 @@ std::vector //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseBoundingBoxCase* RigWellTargetCandidatesGenerator::generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, +RimRegularGridCase* RigWellTargetCandidatesGenerator::generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, size_t timeStepIdx, VolumeType volumeType, VolumesType volumesType, @@ -733,7 +733,7 @@ RimEclipseBoundingBoxCase* RigWellTargetCandidatesGenerator::generateEnsembleCan RiaLogging::debug( QString( "Clusters bounding box max: [%1 %2 %3]" ).arg( boundingBox.max().x() ).arg( boundingBox.max().y() ).arg( boundingBox.max().z() ) ); - RimEclipseBoundingBoxCase* targetCase = new RimEclipseBoundingBoxCase; + RimRegularGridCase* targetCase = new RimRegularGridCase; targetCase->setBoundingBox( boundingBox ); targetCase->createModel( "" ); diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h index 4524ff0ac3..bef0f16ddb 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h @@ -30,7 +30,7 @@ class RigActiveCellInfo; class RigCaseCellResultsData; class RimEclipseCase; class RimEclipseCaseEnsemble; -class RimEclipseBoundingBoxCase; +class RimRegularGridCase; //================================================================================================== /// @@ -82,7 +82,7 @@ class RigWellTargetCandidatesGenerator VolumeResultType volumeResultType, size_t timeStepIdx ); - static RimEclipseBoundingBoxCase* generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, + static RimRegularGridCase* generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, size_t timeStepIdx, VolumeType volumeType, VolumesType volumesType,