Skip to content

Commit

Permalink
#11337 Summary import: Make sure ESMRY includes restart history
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Apr 8, 2024
1 parent 3f3b5a6 commit 8b1b9ac
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions ApplicationLibCode/ProjectDataModel/Summary/RimFileSummaryCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ QString RimFileSummaryCase::caseName() const
//--------------------------------------------------------------------------------------------------
void RimFileSummaryCase::createSummaryReaderInterfaceThreadSafe( RiaThreadSafeLogger* threadSafeLogger )
{
bool lookForRestartFiles = false;

if ( RiaPreferencesSummary::current()->summaryDataReader() == RiaPreferencesSummary::SummaryReaderMode::LIBECL )
{
// It is only the libecl reader that requires manual search for referenced restart files
// opm-common reader handles restart files internally based on m_includeRestartFiles in RifOpmCommonEclipseSummary::openFileReader
//
// The performance of the function looking for restart files is bad, and will affect the performance significantly
lookForRestartFiles = m_includeRestartFiles;
}

m_fileSummaryReader = RimFileSummaryCase::findRelatedFilesAndCreateReader( summaryHeaderFilename(), lookForRestartFiles, threadSafeLogger );
// RimFileSummaryCase::findRelatedFilesAndCreateReader is a performance bottleneck. The function
// RifEclipseSummaryTools::getRestartFile() should be refactored to use opm-common instead of libecl.
// It is not possible to use restart files in ESMRY file format, see see ESmry::make_esmry_file()
//
// https://github.com/OPM/ResInsight/issues/11342

m_fileSummaryReader =
RimFileSummaryCase::findRelatedFilesAndCreateReader( summaryHeaderFilename(), m_includeRestartFiles, threadSafeLogger );

m_multiSummaryReader = new RifMultipleSummaryReaders;
m_multiSummaryReader->addReader( m_fileSummaryReader.p() );
Expand Down

0 comments on commit 8b1b9ac

Please sign in to comment.