mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
Add flag to control creation of summary addresses
This commit is contained in:
1 parent
56d0ba0931
commit
66ccc1201e
2 files changed
+17
No files matched your search
@@ -24,7 +24,9 @@
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
#include "RifSummaryCaseRestartSelector.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
@@ -79,6 +81,20 @@ std::vector<RimSummaryCase*> createSummaryCasesFromFiles( const QStringList& fil
|
||||
newCases.insert( newCases.end(), sumCases.begin(), sumCases.end() );
|
||||
}
|
||||
|
||||
if ( createConfig.buildSummaryAddresses )
|
||||
{
|
||||
// Build summary addresses for the new cases. This is disabled for ensemble import, as the buildup of summary addresses for
|
||||
// individual cases is not required and is resource demanding. Summary addresses are called explicit in
|
||||
// RimSummaryEnsemble::ensembleSummaryAddresses()
|
||||
for ( auto& sumCase : newCases )
|
||||
{
|
||||
if ( auto reader = sumCase->summaryReader() )
|
||||
{
|
||||
reader->createAndSetAddresses();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return newCases;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ struct CreateConfig
|
||||
RiaDefines::FileType fileType;
|
||||
bool ensembleOrGroup;
|
||||
bool allowDialogs;
|
||||
bool buildSummaryAddresses = true;
|
||||
};
|
||||
std::vector<RimSummaryCase*> createSummaryCasesFromFiles( const QStringList& fileNames, CreateConfig createConfig );
|
||||
|
||||
|
||||
Reference in new issue
Block a user