Skip to content

Commit

Permalink
Move summary tools into separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Oct 22, 2024
1 parent 95b2f2b commit df09133
Show file tree
Hide file tree
Showing 126 changed files with 198 additions and 196 deletions.
6 changes: 0 additions & 6 deletions ApplicationLibCode/Application/CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesOsdu.h
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesSumo.h
${CMAKE_CURRENT_LIST_DIR}/RiaPorosityModel.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RiaCurveSetDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RiaRftPltCurveDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RiaViewRedrawScheduler.h
Expand All @@ -34,12 +33,10 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaPlotCollectionScheduler.h
${CMAKE_CURRENT_LIST_DIR}/RiaScheduler.h
${CMAKE_CURRENT_LIST_DIR}/RiaSeismicDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaOsduDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaCloudDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.h
${CMAKE_CURRENT_LIST_DIR}/RiaQuickAccessScheduler.h
)

Expand All @@ -58,7 +55,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesOsdu.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesSumo.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaPorosityModel.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaCurveSetDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaRftPltCurveDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaViewRedrawScheduler.cpp
Expand All @@ -78,13 +74,11 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaDateTimeDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaPlotCollectionScheduler.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaScheduler.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSeismicDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaOsduDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaCloudDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaQuickAccessScheduler.cpp
)

Expand Down
2 changes: 1 addition & 1 deletion ApplicationLibCode/Application/RiaGuiApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
#include "RiaProjectModifier.h"
#include "RiaRegressionTestRunner.h"
#include "RiaSocketServer.h"
#include "RiaSummaryTools.h"
#include "RiaVersionInfo.h"
#include "RiaViewRedrawScheduler.h"
#include "Summary/RiaSummaryTools.h"

#include "ExportCommands/RicSnapshotAllPlotsToFileFeature.h"
#include "ExportCommands/RicSnapshotAllViewsToFileFeature.h"
Expand Down
6 changes: 0 additions & 6 deletions ApplicationLibCode/Application/Tools/CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaRegressionTest.h
${CMAKE_CURRENT_LIST_DIR}/RiaImportEclipseCaseTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaQDateTimeTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaWellNameComparer.h
${CMAKE_CURRENT_LIST_DIR}/RiaStdStringTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaInterpolationTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressAnalyzer.h
${CMAKE_CURRENT_LIST_DIR}/RiaSimWellBranchTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaProjectFileTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaStringEncodingTools.h
Expand Down Expand Up @@ -48,7 +46,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaValidRegExpValidator.h
${CMAKE_CURRENT_LIST_DIR}/RiaVec3Tools.h
${CMAKE_CURRENT_LIST_DIR}/RiaEnsembleNameTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaNetworkTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaOpenMPTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaNumericalTools.h
Expand All @@ -72,11 +69,9 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaRegressionTest.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaImportEclipseCaseTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaQDateTimeTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaWellNameComparer.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaStdStringTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaInterpolationTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressAnalyzer.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSimWellBranchTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaProjectFileTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaStringEncodingTools.cpp
Expand All @@ -101,7 +96,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaValidRegExpValidator.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaEnsembleNameTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaVec3Tools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaNetworkTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaOpenMPTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaNumericalTools.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "RiaEnsembleNameTools.h"

#include "RiaFilePathTools.h"
#include "RiaSummaryDefines.h"
#include "RiaTextStringTools.h"
#include "Summary/RiaSummaryDefines.h"

#include "RimCaseDisplayNameTools.h"
#include "RimProject.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <map>
#include <vector>

#include "RiaSummaryDefines.h"
#include "Summary/RiaSummaryDefines.h"

class RimSummaryCase;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressAnalyzer.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressModifier.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.h
)

set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressAnalyzer.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryAddressModifier.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.cpp
)

list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})

list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES})
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
//
/////////////////////////////////////////////////////////////////////////////////

#include "RiaSummaryAddressAnalyzer.h"
#include "Summary/RiaSummaryAddressAnalyzer.h"
#include "RiaStdStringTools.h"

#include "RiaSummaryCurveDefinition.h"
#include "Summary/RiaSummaryCurveDefinition.h"

#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#pragma once

#include "RiaSummaryCurveAddress.h"
#include "RifEclipseSummaryAddress.h"
#include "Summary/RiaSummaryCurveAddress.h"

#include <set>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////

#include "RimSummaryAddressModifier.h"
#include "RiaSummaryAddressModifier.h"

#include "RiaLogging.h"
#include "RiaStdStringTools.h"
Expand All @@ -30,7 +30,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseSummaryAddress RimSummaryAddressModifier::replaceTokenForCategory( const RifEclipseSummaryAddress& sourceAdr,
RifEclipseSummaryAddress RiaSummaryAddressModifier::replaceTokenForCategory( const RifEclipseSummaryAddress& sourceAdr,
const std::string& token,
RifEclipseSummaryAddressDefines::SummaryCategory contentType )
{
Expand Down Expand Up @@ -103,7 +103,7 @@ RifEclipseSummaryAddress RimSummaryAddressModifier::replaceTokenForCategory( con
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RiaSummaryCurveAddress> RimSummaryAddressModifier::curveAddresses( const std::vector<CurveAddressProvider>& curveAddressProviders )
std::vector<RiaSummaryCurveAddress> RiaSummaryAddressModifier::curveAddresses( const std::vector<CurveAddressProvider>& curveAddressProviders )
{
std::vector<RiaSummaryCurveAddress> addresses;

Expand All @@ -112,7 +112,7 @@ std::vector<RiaSummaryCurveAddress> RimSummaryAddressModifier::curveAddresses( c
std::visit(
[&addresses]( auto&& arg )
{
auto curveAdr = RimSummaryAddressModifier::curveAddress( arg );
auto curveAdr = RiaSummaryAddressModifier::curveAddress( arg );
addresses.push_back( curveAdr );
},
provider );
Expand All @@ -124,7 +124,7 @@ std::vector<RiaSummaryCurveAddress> RimSummaryAddressModifier::curveAddresses( c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAddressModifier::applyAddressesToCurveAddressProviders( const std::vector<CurveAddressProvider>& curveAddressProviders,
void RiaSummaryAddressModifier::applyAddressesToCurveAddressProviders( const std::vector<CurveAddressProvider>& curveAddressProviders,
const std::vector<RiaSummaryCurveAddress>& addresses )
{
if ( curveAddressProviders.size() != addresses.size() ) return;
Expand All @@ -134,14 +134,14 @@ void RimSummaryAddressModifier::applyAddressesToCurveAddressProviders( const std
auto provider = curveAddressProviders[i];
const auto& address = addresses[i];

std::visit( [address]( auto&& arg ) { RimSummaryAddressModifier::setCurveAddress( arg, address ); }, provider );
std::visit( [address]( auto&& arg ) { RiaSummaryAddressModifier::setCurveAddress( arg, address ); }, provider );
};
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimSummaryAddressModifier::CurveAddressProvider> RimSummaryAddressModifier::createAddressProviders( RimSummaryPlot* summaryPlot )
std::vector<RiaSummaryAddressModifier::CurveAddressProvider> RiaSummaryAddressModifier::createAddressProviders( RimSummaryPlot* summaryPlot )
{
std::vector<CurveAddressProvider> providers;

Expand All @@ -161,7 +161,7 @@ std::vector<RimSummaryAddressModifier::CurveAddressProvider> RimSummaryAddressMo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RifEclipseSummaryAddress> RimSummaryAddressModifier::allSummaryAddressesY( RimSummaryPlot* summaryPlot )
std::vector<RifEclipseSummaryAddress> RiaSummaryAddressModifier::allSummaryAddressesY( RimSummaryPlot* summaryPlot )
{
std::vector<RifEclipseSummaryAddress> addresses;

Expand All @@ -171,7 +171,7 @@ std::vector<RifEclipseSummaryAddress> RimSummaryAddressModifier::allSummaryAddre
std::visit(
[&addresses]( auto&& arg )
{
auto curveAdr = RimSummaryAddressModifier::curveAddress( arg );
auto curveAdr = RiaSummaryAddressModifier::curveAddress( arg );
addresses.push_back( curveAdr.summaryAddressY() );
},
provider );
Expand All @@ -183,7 +183,7 @@ std::vector<RifEclipseSummaryAddress> RimSummaryAddressModifier::allSummaryAddre
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAddressModifier::updateAddressesByObjectName( const std::vector<CurveAddressProvider>& curveAddressProviders,
void RiaSummaryAddressModifier::updateAddressesByObjectName( const std::vector<CurveAddressProvider>& curveAddressProviders,
const std::string& objectName,
RimSummaryAddressCollection::CollectionContentType contentType )
{
Expand All @@ -194,15 +194,15 @@ void RimSummaryAddressModifier::updateAddressesByObjectName( const std::vector<C
std::visit(
[objectName, category]( auto&& arg )
{
const auto sourceAdr = RimSummaryAddressModifier::curveAddress( arg );
const auto sourceAdr = RiaSummaryAddressModifier::curveAddress( arg );

const auto sourceX = sourceAdr.summaryAddressX();
const auto sourceY = sourceAdr.summaryAddressY();

const auto newAdrX = RimSummaryAddressModifier::replaceTokenForCategory( sourceX, objectName, category );
const auto newAdrY = RimSummaryAddressModifier::replaceTokenForCategory( sourceY, objectName, category );
const auto newAdrX = RiaSummaryAddressModifier::replaceTokenForCategory( sourceX, objectName, category );
const auto newAdrY = RiaSummaryAddressModifier::replaceTokenForCategory( sourceY, objectName, category );

RimSummaryAddressModifier::setCurveAddress( arg, RiaSummaryCurveAddress( newAdrX, newAdrY ) );
RiaSummaryAddressModifier::setCurveAddress( arg, RiaSummaryCurveAddress( newAdrX, newAdrY ) );
},
provider );
};
Expand All @@ -211,7 +211,7 @@ void RimSummaryAddressModifier::updateAddressesByObjectName( const std::vector<C
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaSummaryCurveAddress RimSummaryAddressModifier::curveAddress( RimEnsembleCurveSet* curveSet )
RiaSummaryCurveAddress RiaSummaryAddressModifier::curveAddress( RimEnsembleCurveSet* curveSet )
{
if ( curveSet == nullptr ) return RiaSummaryCurveAddress( RifEclipseSummaryAddress() );
return curveSet->curveAddress();
Expand All @@ -220,7 +220,7 @@ RiaSummaryCurveAddress RimSummaryAddressModifier::curveAddress( RimEnsembleCurve
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaSummaryCurveAddress RimSummaryAddressModifier::curveAddress( RimSummaryCurve* curve )
RiaSummaryCurveAddress RiaSummaryAddressModifier::curveAddress( RimSummaryCurve* curve )
{
if ( curve == nullptr ) return RiaSummaryCurveAddress( RifEclipseSummaryAddress() );
return curve->curveAddress();
Expand All @@ -229,7 +229,7 @@ RiaSummaryCurveAddress RimSummaryAddressModifier::curveAddress( RimSummaryCurve*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAddressModifier::setCurveAddress( RimEnsembleCurveSet* curveSet, const RiaSummaryCurveAddress& curveAdr )
void RiaSummaryAddressModifier::setCurveAddress( RimEnsembleCurveSet* curveSet, const RiaSummaryCurveAddress& curveAdr )
{
if ( curveSet )
{
Expand All @@ -240,7 +240,7 @@ void RimSummaryAddressModifier::setCurveAddress( RimEnsembleCurveSet* curveSet,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAddressModifier::setCurveAddress( RimSummaryCurve* curve, const RiaSummaryCurveAddress& curveAdr )
void RiaSummaryAddressModifier::setCurveAddress( RimSummaryCurve* curve, const RiaSummaryCurveAddress& curveAdr )
{
if ( curve )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RiaSummaryCurveAddress;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
class RimSummaryAddressModifier
class RiaSummaryAddressModifier
{
public:
// Define a variant for summary curves and ensemble curve set. This way we can treat them as similar object without a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
/////////////////////////////////////////////////////////////////////////////////

#include "RiaSummaryCurveDefinition.h"

#include "RiaStdStringTools.h"
#include "RiaSummaryAddressModifier.h"
#include "RiaSummaryCurveAddress.h"

#include "RifSummaryReaderInterface.h"

#include "RimSummaryAddressModifier.h"
#include "RimSummaryCase.h"
#include "RimSummaryEnsemble.h"

Expand Down Expand Up @@ -177,18 +178,18 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
if ( RifEclipseSummaryAddress::isDependentOnWellName( category ) )
{
m_summaryAddressX =
RimSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressX,
RiaSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressX,
name,
RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL );
m_summaryAddressY =
RimSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressY,
RiaSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressY,
name,
RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL );
}
else
{
m_summaryAddressX = RimSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressX, name, m_summaryAddressX.category() );
m_summaryAddressY = RimSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressY, name, m_summaryAddressY.category() );
m_summaryAddressX = RiaSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressX, name, m_summaryAddressX.category() );
m_summaryAddressY = RiaSummaryAddressModifier::replaceTokenForCategory( m_summaryAddressY, name, m_summaryAddressY.category() );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////

#include "RiaSummaryDefines.h"

#include "cafAppEnum.h"

namespace caf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
//
/////////////////////////////////////////////////////////////////////////////////

#include "RiaSummaryStringTools.h"
#include "Summary/RiaSummaryStringTools.h"

#include "RiaLogging.h"
#include "RiaStdStringTools.h"
#include "RiaSummaryTools.h"
#include "RiaTextStringTools.h"
#include "Summary/RiaSummaryTools.h"

#include "RifEclipseSummaryAddress.h"
#include "RifReaderEclipseSummary.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////

#include "RiaSummaryTools.h"
#include "Summary/RiaSummaryTools.h"

#include "RiaFilePathTools.h"
#include "RiaTimeHistoryCurveResampler.h"
Expand Down
1 change: 1 addition & 0 deletions ApplicationLibCode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ list(
Application/Tools/CMakeLists_files.cmake
Application/Tools/WellPathTools/CMakeLists_files.cmake
Application/Tools/Cloud/CMakeLists_files.cmake
Application/Tools/Summary/CMakeLists_files.cmake
ReservoirDataModel/CMakeLists_files.cmake
ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake
ReservoirDataModel/Completions/CMakeLists_files.cmake
Expand Down
Loading

0 comments on commit df09133

Please sign in to comment.