mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-31 09:14:11 -05:00
Renames RifSummaryReaderMultipleFiles
Renames RifSummaryReaderMultipleFiles to RifSummaryReaderAggregator to better reflect its purpose of aggregating summary data from multiple files. Also avoid confusion with RifMultipleSummaryReaders
This commit is contained in:
1 parent
0d0c8f5505
commit
cd43d17e53
6 files changed
+19
-20
No files matched your search
@@ -65,7 +65,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifParameterXmlReader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifOpmCommonSummary.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEnsembleFractureStatisticsExporter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSummaryReaderMultipleFiles.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSummaryReaderAggregator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEclEclipseSummary.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifWellIAFileWriter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEclipseTextFileReader.h
|
||||
@@ -176,7 +176,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifOpmCommonSummary.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifOpmFlowDeckFile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEnsembleFractureStatisticsExporter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSummaryReaderMultipleFiles.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSummaryReaderAggregator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEclEclipseSummary.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifWellIAFileWriter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEclipseTextFileReader.cpp
|
||||
|
||||
+9
-9
@@ -16,7 +16,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifSummaryReaderMultipleFiles.h"
|
||||
#include "RifSummaryReaderAggregator.h"
|
||||
|
||||
#include "RifReaderEclipseSummary.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifSummaryReaderMultipleFiles::RifSummaryReaderMultipleFiles( const std::vector<std::string>& filesOrderedByStartOfHistory )
|
||||
RifSummaryReaderAggregator::RifSummaryReaderAggregator( const std::vector<std::string>& filesOrderedByStartOfHistory )
|
||||
: m_fileNames( filesOrderedByStartOfHistory )
|
||||
{
|
||||
}
|
||||
@@ -36,7 +36,7 @@ RifSummaryReaderMultipleFiles::RifSummaryReaderMultipleFiles( const std::vector<
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<time_t> RifSummaryReaderMultipleFiles::timeSteps( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
std::vector<time_t> RifSummaryReaderAggregator::timeSteps( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
{
|
||||
return m_aggregatedTimeSteps;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ std::vector<time_t> RifSummaryReaderMultipleFiles::timeSteps( const RifEclipseSu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<bool, std::vector<double>> RifSummaryReaderMultipleFiles::values( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
std::pair<bool, std::vector<double>> RifSummaryReaderAggregator::values( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
{
|
||||
std::vector<double> values;
|
||||
for ( const auto& reader : m_summaryReaders )
|
||||
@@ -78,7 +78,7 @@ std::pair<bool, std::vector<double>> RifSummaryReaderMultipleFiles::values( cons
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RifSummaryReaderMultipleFiles::unitName( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
std::string RifSummaryReaderAggregator::unitName( const RifEclipseSummaryAddress& resultAddress ) const
|
||||
{
|
||||
if ( !m_summaryReaders.empty() ) return m_summaryReaders.front()->unitName( resultAddress );
|
||||
|
||||
@@ -88,7 +88,7 @@ std::string RifSummaryReaderMultipleFiles::unitName( const RifEclipseSummaryAddr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::EclipseUnitSystem RifSummaryReaderMultipleFiles::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifSummaryReaderAggregator::unitSystem() const
|
||||
{
|
||||
if ( !m_summaryReaders.empty() ) return m_summaryReaders.front()->unitSystem();
|
||||
|
||||
@@ -98,7 +98,7 @@ RiaDefines::EclipseUnitSystem RifSummaryReaderMultipleFiles::unitSystem() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RifSummaryReaderMultipleFiles::timeStepCount( RifSummaryReaderInterface* reader ) const
|
||||
size_t RifSummaryReaderAggregator::timeStepCount( RifSummaryReaderInterface* reader ) const
|
||||
{
|
||||
auto it = m_valueCountForReader.find( reader );
|
||||
if ( it != m_valueCountForReader.end() )
|
||||
@@ -112,7 +112,7 @@ size_t RifSummaryReaderMultipleFiles::timeStepCount( RifSummaryReaderInterface*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifSummaryReaderMultipleFiles::createReadersAndImportMetaData( RiaThreadSafeLogger* threadSafeLogger )
|
||||
bool RifSummaryReaderAggregator::createReadersAndImportMetaData( RiaThreadSafeLogger* threadSafeLogger )
|
||||
{
|
||||
for ( const auto& fileName : m_fileNames )
|
||||
{
|
||||
@@ -149,7 +149,7 @@ bool RifSummaryReaderMultipleFiles::createReadersAndImportMetaData( RiaThreadSaf
|
||||
// from the last reader to the first
|
||||
//
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifSummaryReaderMultipleFiles::calculateOverlappingTimeSteps()
|
||||
void RifSummaryReaderAggregator::calculateOverlappingTimeSteps()
|
||||
{
|
||||
if ( m_summaryReaders.empty() ) return;
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@ class RiaThreadSafeLogger;
|
||||
// ordered, and the start of history at the front of the vector
|
||||
//
|
||||
//==================================================================================================
|
||||
class RifSummaryReaderMultipleFiles : public RifSummaryReaderInterface
|
||||
class RifSummaryReaderAggregator : public RifSummaryReaderInterface
|
||||
{
|
||||
public:
|
||||
RifSummaryReaderMultipleFiles( const std::vector<std::string>& filesOrderedByStartOfHistory );
|
||||
RifSummaryReaderAggregator( const std::vector<std::string>& filesOrderedByStartOfHistory );
|
||||
|
||||
bool createReadersAndImportMetaData( RiaThreadSafeLogger* threadSafeLogger );
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "RifKeywordVectorUserData.h"
|
||||
#include "RifMultipleSummaryReaders.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
#include "RifSummaryReaderMultipleFiles.h"
|
||||
|
||||
#include "SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeatureUi.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "RifProjectSummaryDataWriter.h"
|
||||
#include "RifReaderEclipseSummary.h"
|
||||
#include "RifReaderOpmRft.h"
|
||||
#include "RifSummaryReaderMultipleFiles.h"
|
||||
#include "RifSummaryReaderAggregator.h"
|
||||
|
||||
#include "RimCalculatedSummaryCurveReader.h"
|
||||
#include "RimProject.h"
|
||||
@@ -188,7 +188,7 @@ RifSummaryReaderInterface* RimFileSummaryCase::findRelatedFilesAndCreateReader(
|
||||
// The ordering in intended to be start of history first, so we reverse the ordering
|
||||
std::reverse( summaryFileNames.begin(), summaryFileNames.end() );
|
||||
|
||||
auto summaryReader = new RifSummaryReaderMultipleFiles( summaryFileNames );
|
||||
auto summaryReader = new RifSummaryReaderAggregator ( summaryFileNames );
|
||||
if ( !summaryReader->createReadersAndImportMetaData( threadSafeLogger ) )
|
||||
{
|
||||
delete summaryReader;
|
||||
@@ -201,7 +201,7 @@ RifSummaryReaderInterface* RimFileSummaryCase::findRelatedFilesAndCreateReader(
|
||||
|
||||
RifReaderEclipseSummary* summaryFileReader = new RifReaderEclipseSummary;
|
||||
|
||||
// All restart data is taken care of by RifSummaryReaderMultipleFiles, never read restart data from native file
|
||||
// All restart data is taken care of by RifSummaryReaderAggregator, never read restart data from native file
|
||||
// readers
|
||||
if ( !summaryFileReader->open( headerFileName, threadSafeLogger ) )
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "RifEclEclipseSummary.h"
|
||||
#include "RifEclipseSummaryTools.h"
|
||||
#include "RifReaderEclipseSummary.h"
|
||||
#include "RifSummaryReaderMultipleFiles.h"
|
||||
#include "RifSummaryReaderAggregator.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
@@ -85,8 +85,8 @@ TEST( DISABLED_RifEclipseSummaryTest, TestRestartSummaryFileReferences_02 )
|
||||
smspecFilesNewFirst.push_back( s.toStdString() );
|
||||
}
|
||||
|
||||
RifSummaryReaderMultipleFiles multipleSummaryFiles( smspecFilesNewFirst );
|
||||
auto ts = multipleSummaryFiles.timeSteps( {} );
|
||||
RifSummaryReaderAggregator multipleSummaryFiles( smspecFilesNewFirst );
|
||||
auto ts = multipleSummaryFiles.timeSteps( {} );
|
||||
std::cout << ts.size();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user