2017-10-11 19:46:52 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-11 19:46:52 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-11 19:46:52 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-11 19:46:52 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RifEclipseSummaryAddress.h"
|
2023-09-18 09:55:14 +02:00
|
|
|
#include "RifEclipseSummaryAddressDefines.h"
|
2017-10-11 19:46:52 +02:00
|
|
|
|
2017-10-24 09:44:50 +02:00
|
|
|
#include <QString>
|
|
|
|
|
|
2017-10-11 19:46:52 +02:00
|
|
|
#include <utility>
|
2017-10-16 22:04:00 +02:00
|
|
|
#include <vector>
|
2017-10-11 19:46:52 +02:00
|
|
|
|
2020-09-24 10:54:18 +02:00
|
|
|
#include <gsl/gsl>
|
|
|
|
|
|
2017-10-11 19:46:52 +02:00
|
|
|
class RimSummaryCase;
|
2018-05-10 21:29:55 +02:00
|
|
|
class RimSummaryCaseCollection;
|
2023-09-27 10:18:52 +02:00
|
|
|
class RiaSummaryCurveAddress;
|
2017-10-11 19:46:52 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-11 19:46:52 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RiaSummaryCurveDefinition
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-05-14 14:51:52 +02:00
|
|
|
RiaSummaryCurveDefinition();
|
2023-09-25 12:45:47 +02:00
|
|
|
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCaseY, const RifEclipseSummaryAddress& summaryAddressY, bool isEnsembleCurve );
|
|
|
|
|
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddressY );
|
2023-09-27 10:18:52 +02:00
|
|
|
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RiaSummaryCurveAddress& summaryCurveAddress );
|
2017-10-11 19:46:52 +02:00
|
|
|
|
2023-09-27 10:18:52 +02:00
|
|
|
// X and Y Axis
|
2023-09-20 09:22:33 +02:00
|
|
|
RimSummaryCaseCollection* ensemble() const;
|
2023-09-27 10:18:52 +02:00
|
|
|
void setEnsemble( RimSummaryCaseCollection* ensemble );
|
|
|
|
|
|
|
|
|
|
// Y Axis
|
|
|
|
|
RimSummaryCase* summaryCaseY() const;
|
|
|
|
|
RifEclipseSummaryAddress summaryAddressY() const;
|
|
|
|
|
bool isEnsembleCurve() const;
|
|
|
|
|
void setSummaryAddressY( const RifEclipseSummaryAddress& address );
|
2017-10-11 19:46:52 +02:00
|
|
|
|
2023-09-18 09:55:14 +02:00
|
|
|
// X Axis
|
|
|
|
|
void setSummaryCaseX( RimSummaryCase* summaryCase );
|
|
|
|
|
void setSummaryAddressX( const RifEclipseSummaryAddress& summaryAddress );
|
|
|
|
|
RimSummaryCase* summaryCaseX() const;
|
|
|
|
|
RifEclipseSummaryAddress summaryAddressX() const;
|
|
|
|
|
|
2023-09-27 10:18:52 +02:00
|
|
|
RiaSummaryCurveAddress summaryCurveAddress() const;
|
|
|
|
|
|
2023-09-18 09:55:14 +02:00
|
|
|
void setIdentifierText( SummaryCategory category, const std::string& name );
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool operator<( const RiaSummaryCurveDefinition& other ) const;
|
2017-10-11 19:46:52 +02:00
|
|
|
|
2017-10-16 22:04:00 +02:00
|
|
|
// TODO: Consider moving to a separate tools class
|
2023-09-29 17:52:31 +02:00
|
|
|
static std::vector<double> resultValues( const RiaSummaryCurveDefinition& curveDefinition );
|
2023-02-13 12:40:08 +01:00
|
|
|
static std::vector<time_t> timeSteps( const RiaSummaryCurveDefinition& curveDefinition );
|
2017-10-16 22:04:00 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
QString curveDefinitionText() const;
|
2017-10-24 09:44:50 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
2017-10-24 09:44:50 +02:00
|
|
|
|
2017-10-11 19:46:52 +02:00
|
|
|
private:
|
2023-09-20 09:22:33 +02:00
|
|
|
RimSummaryCase* m_summaryCaseY;
|
|
|
|
|
RifEclipseSummaryAddress m_summaryAddressY;
|
2023-09-18 09:55:14 +02:00
|
|
|
RimSummaryCase* m_summaryCaseX;
|
|
|
|
|
RifEclipseSummaryAddress m_summaryAddressX;
|
2019-09-06 10:40:57 +02:00
|
|
|
RimSummaryCaseCollection* m_ensemble;
|
2020-09-15 12:53:46 +02:00
|
|
|
bool m_isEnsembleCurve;
|
2017-10-11 19:46:52 +02:00
|
|
|
};
|
2020-04-21 08:56:27 +02:00
|
|
|
|
|
|
|
|
class RiaSummaryCurveDefinitionAnalyser
|
|
|
|
|
{
|
|
|
|
|
public:
|
2020-07-30 14:03:50 +02:00
|
|
|
RiaSummaryCurveDefinitionAnalyser() = default;
|
|
|
|
|
void setCurveDefinitions( const std::vector<RiaSummaryCurveDefinition>& curveDefs );
|
2020-04-21 08:56:27 +02:00
|
|
|
|
|
|
|
|
std::set<RimSummaryCase*> m_singleSummaryCases; // All summary cases used
|
|
|
|
|
std::set<RimSummaryCaseCollection*> m_ensembles; // All the ensembles referenced by the summary cases
|
|
|
|
|
|
2021-02-17 08:42:32 +01:00
|
|
|
std::set<RifEclipseSummaryAddress> m_summaryAdresses;
|
2022-05-06 16:34:37 +02:00
|
|
|
std::set<std::string> m_vectorNames;
|
2020-04-21 08:56:27 +02:00
|
|
|
};
|