Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary import: Make sure ESMRY includes restart history #11343

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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