mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use opm-common to read restart file from summary file
Testing identified performance issues related to reading restart file name from summary files. Make sure the reading of timesteps is done only when required in new function getFileInfoAndTimeSteps. Add reading of restart file name using opm-common when opm-common is active. The performance of this reader is much better than resdata.
This commit is contained in:
@@ -167,16 +167,24 @@ RifSummaryReaderInterface* RimFileSummaryCase::findRelatedFilesAndCreateReader(
|
||||
{
|
||||
if ( lookForRestartFiles )
|
||||
{
|
||||
std::vector<QString> warnings;
|
||||
std::vector<RifRestartFileInfo> restartFileInfos = RifEclipseSummaryTools::getRestartFiles( headerFileName, warnings );
|
||||
std::vector<QString> warnings;
|
||||
std::vector<QString> restartFileNames;
|
||||
if ( RiaPreferencesSummary::current()->summaryDataReader() == RiaPreferencesSummary::SummaryReaderMode::OPM_COMMON )
|
||||
{
|
||||
restartFileNames = RifEclipseSummaryTools::getRestartFileNamesOpm( headerFileName, warnings );
|
||||
}
|
||||
else
|
||||
{
|
||||
restartFileNames = RifEclipseSummaryTools::getRestartFileNames( headerFileName, warnings );
|
||||
}
|
||||
|
||||
if ( !restartFileInfos.empty() )
|
||||
if ( !restartFileNames.empty() )
|
||||
{
|
||||
std::vector<std::string> summaryFileNames;
|
||||
summaryFileNames.push_back( headerFileName.toStdString() );
|
||||
for ( const auto& s : restartFileInfos )
|
||||
for ( const auto& fileName : restartFileNames )
|
||||
{
|
||||
summaryFileNames.push_back( s.fileName.toStdString() );
|
||||
summaryFileNames.push_back( fileName.toStdString() );
|
||||
}
|
||||
|
||||
// The ordering in intended to be start of history first, so we reverse the ordering
|
||||
|
||||
Reference in New Issue
Block a user