mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
Python: Create ensemble curve sets when creating summary plot for ensemble
new_summary_plot() with an ensemble and an address string created an empty plot. The address filters were applied to an empty list of summary cases, and no curve sets were created. Use the summary cases of the ensemble, and make sure the summary addresses are created before the address filters are applied. Add example script showing how to create summary plots for an ensemble.
This commit is contained in:
1 parent
d575ae504b
commit
e2dc024854
2 files changed
+59
-1
No files matched your search
@@ -30,6 +30,8 @@
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "cafPdmAbstractFieldScriptingCapability.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
|
||||
@@ -62,7 +64,15 @@ std::expected<caf::PdmObjectHandle*, QString> RimcSummaryPlotCollection_newSumma
|
||||
{
|
||||
if ( !addressStrings.empty() )
|
||||
{
|
||||
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( std::vector<RimSummaryCase*>(), m_ensemble, addressStrings );
|
||||
auto summaryCases = m_ensemble->allSummaryCases();
|
||||
|
||||
// Summary addresses are created on demand, make sure they are available before applying address filters
|
||||
for ( auto summaryCase : summaryCases )
|
||||
{
|
||||
if ( auto reader = summaryCase ? summaryCase->summaryReader() : nullptr ) reader->createAddressesIfRequired();
|
||||
}
|
||||
|
||||
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( summaryCases, m_ensemble, addressStrings );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user