2020-04-17 02:31:42 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2020- Equinor ASA
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-09-16 12:33:44 -05:00
|
|
|
#include "RimAbstractCorrelationPlot.h"
|
|
|
|
#include "RimAbstractPlotCollection.h"
|
|
|
|
|
2020-04-17 02:31:42 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
2020-07-28 08:13:39 -05:00
|
|
|
#include <ctime>
|
2020-08-25 06:56:46 -05:00
|
|
|
#include <vector>
|
2020-07-28 08:13:39 -05:00
|
|
|
|
2020-04-17 02:31:42 -05:00
|
|
|
class RimCorrelationPlot;
|
2020-04-21 01:56:27 -05:00
|
|
|
class RimCorrelationMatrixPlot;
|
2020-04-29 01:11:30 -05:00
|
|
|
class RimCorrelationReportPlot;
|
2020-04-17 12:24:12 -05:00
|
|
|
class RimParameterResultCrossPlot;
|
2020-07-28 08:13:39 -05:00
|
|
|
class RimSummaryCaseCollection;
|
2020-04-17 02:31:42 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2020-09-16 12:33:44 -05:00
|
|
|
class RimCorrelationPlotCollection : public caf::PdmObject, public RimTypedPlotCollection<RimAbstractCorrelationPlot>
|
2020-04-17 02:31:42 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimCorrelationPlotCollection();
|
|
|
|
~RimCorrelationPlotCollection() override;
|
|
|
|
|
2020-07-28 08:13:39 -05:00
|
|
|
RimCorrelationPlot* createCorrelationPlot( bool defaultToFirstEnsembleFopt = true );
|
|
|
|
RimCorrelationPlot*
|
|
|
|
createCorrelationPlot( RimSummaryCaseCollection* ensemble, const QString& quantityName, std::time_t timeStep );
|
|
|
|
|
|
|
|
RimCorrelationMatrixPlot* createCorrelationMatrixPlot( bool defaultToFirstEnsembleField = true );
|
2020-08-25 06:56:46 -05:00
|
|
|
RimCorrelationMatrixPlot* createCorrelationMatrixPlot( RimSummaryCaseCollection* ensemble,
|
|
|
|
const std::vector<QString>& quantityNames,
|
|
|
|
std::time_t timeStep );
|
2020-07-28 08:13:39 -05:00
|
|
|
|
2020-04-22 07:36:27 -05:00
|
|
|
RimParameterResultCrossPlot* createParameterResultCrossPlot( bool defaultToFirstEnsembleFopt = true );
|
2020-07-28 08:13:39 -05:00
|
|
|
RimParameterResultCrossPlot* createParameterResultCrossPlot( RimSummaryCaseCollection* ensemble,
|
|
|
|
const QString& paramName,
|
|
|
|
const QString& quantityName,
|
|
|
|
std::time_t timeStep );
|
|
|
|
|
2020-09-08 06:54:28 -05:00
|
|
|
RimCorrelationReportPlot* createCorrelationReportPlot( bool defaultToFirstEnsembleField = true );
|
2020-08-25 06:56:46 -05:00
|
|
|
RimCorrelationReportPlot* createCorrelationReportPlot( RimSummaryCaseCollection* ensemble,
|
|
|
|
const std::vector<QString>& matrixQuantityNames,
|
|
|
|
const QString& tornadoAndCrossPlotQuantityName,
|
|
|
|
std::time_t timeStep );
|
2020-07-28 08:13:39 -05:00
|
|
|
|
|
|
|
void removeReport( RimCorrelationReportPlot* correlationReport );
|
2020-04-17 02:31:42 -05:00
|
|
|
|
2020-09-16 12:33:44 -05:00
|
|
|
std::vector<RimAbstractCorrelationPlot*> plots() const final;
|
|
|
|
size_t plotCount() const final;
|
|
|
|
void insertPlot( RimAbstractCorrelationPlot* plot, size_t index ) final;
|
|
|
|
void removePlot( RimAbstractCorrelationPlot* correlationPlot ) final;
|
|
|
|
void deleteAllPlots() final;
|
2021-05-05 02:43:49 -05:00
|
|
|
void loadDataAndUpdateAllPlots() override;
|
2020-04-17 02:31:42 -05:00
|
|
|
|
2020-09-16 12:33:44 -05:00
|
|
|
std::vector<RimCorrelationReportPlot*> reports() const;
|
2020-04-17 02:31:42 -05:00
|
|
|
|
2020-04-22 07:36:27 -05:00
|
|
|
private:
|
2020-08-25 06:56:46 -05:00
|
|
|
void applyFirstEnsembleFieldAddressesToPlot( RimAbstractCorrelationPlot* plot,
|
|
|
|
const std::vector<QString>& quantityNames = {} );
|
2020-07-28 08:13:39 -05:00
|
|
|
void applyEnsembleFieldAndTimeStepToPlot( RimAbstractCorrelationPlot* plot,
|
|
|
|
RimSummaryCaseCollection* ensemble,
|
2020-08-25 06:56:46 -05:00
|
|
|
const std::vector<QString>& quantityNames,
|
2020-07-28 08:13:39 -05:00
|
|
|
std::time_t timeStep );
|
2020-08-25 06:56:46 -05:00
|
|
|
void applyFirstEnsembleFieldAddressesToReport( RimCorrelationReportPlot* plot,
|
|
|
|
const std::vector<QString>& matrixQuantityNames,
|
|
|
|
const QString& tornadoAndCrossPlotQuantityName );
|
|
|
|
void applyEnsembleFieldAndTimeStepToReport( RimCorrelationReportPlot* plot,
|
|
|
|
RimSummaryCaseCollection* ensemble,
|
|
|
|
const std::vector<QString>& matrixQuantityNames,
|
|
|
|
const QString& tornadoAndCrossPlotQuantityName,
|
|
|
|
std::time_t timeStep );
|
2020-04-22 07:36:27 -05:00
|
|
|
|
2020-04-17 02:31:42 -05:00
|
|
|
private:
|
2020-04-17 12:24:12 -05:00
|
|
|
caf::PdmChildArrayField<RimAbstractCorrelationPlot*> m_correlationPlots;
|
2020-04-29 01:11:30 -05:00
|
|
|
caf::PdmChildArrayField<RimCorrelationReportPlot*> m_correlationReports;
|
2020-04-17 02:31:42 -05:00
|
|
|
};
|