#739 Added summary case classes. Use those from the summary curves. Made save/restore work again for the summary plots. File format for Summary stuff are changed.

This commit is contained in:
Jacob Støren
2016-05-31 13:42:27 +02:00
parent 5732b5008f
commit 40388b308b
23 changed files with 864 additions and 20 deletions

View File

@@ -100,6 +100,9 @@
#endif
#include "RimSummaryPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCase.h"
#include "RimGridSummaryCase.h"
namespace caf
{
@@ -387,6 +390,17 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
if (oilField->wellPathCollection) oilField->wellPathCollection->readWellPathFiles();
}
for (RimOilField* oilField: m_project->oilFields)
{
if (oilField == NULL) continue;
// Temporary
if(!oilField->summaryCaseCollection())
{
oilField->summaryCaseCollection = new RimSummaryCaseCollection();
}
oilField->summaryCaseCollection()->createSummaryCasesFromRelevantEclipseResultCases();
oilField->summaryCaseCollection()->loadAllSummaryCaseData();
}
// If load action is specified to recalculate statistics, do it now.
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will be clamped
@@ -776,11 +790,21 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
riv->loadDataAndUpdate();
// Add a corresponding summary case if it exists
{
RimSummaryCaseCollection* sumCaseColl = m_project->activeOilField() ? m_project->activeOilField()->summaryCaseCollection() : NULL;
if(sumCaseColl)
{
RimGridSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromEclipseResultCase(rimResultReservoir);
if(newSumCase) newSumCase->loadCase();
}
}
if (!riv->cellResult()->hasResult())
{
riv->cellResult()->setResultVariable(RimDefines::undefinedResultName());
}
analysisModels->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(riv->cellResult());