2017-10-11 12:46:52 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-11 12:46:52 -05: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 03:40:57 -05:00
|
|
|
//
|
2017-10-11 12:46:52 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-11 12:46:52 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RifEclipseSummaryAddress.h"
|
|
|
|
|
2017-10-24 02:44:50 -05:00
|
|
|
#include <QString>
|
|
|
|
|
2017-10-11 12:46:52 -05:00
|
|
|
#include <utility>
|
2017-10-16 15:04:00 -05:00
|
|
|
#include <vector>
|
2017-10-11 12:46:52 -05:00
|
|
|
|
2020-09-24 03:54:18 -05:00
|
|
|
#include <gsl/gsl>
|
|
|
|
|
2017-10-11 12:46:52 -05:00
|
|
|
class RimSummaryCase;
|
2018-05-10 14:29:55 -05:00
|
|
|
class RimSummaryCaseCollection;
|
2017-10-11 12:46:52 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 12:46:52 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RiaSummaryCurveDefinition
|
|
|
|
{
|
|
|
|
public:
|
2018-05-14 07:51:52 -05:00
|
|
|
RiaSummaryCurveDefinition();
|
2023-02-26 03:48:40 -06:00
|
|
|
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& summaryAddress, bool isEnsembleCurve );
|
2021-09-02 08:09:50 -05:00
|
|
|
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
2017-10-11 12:46:52 -05:00
|
|
|
|
|
|
|
RimSummaryCase* summaryCase() const;
|
|
|
|
const RifEclipseSummaryAddress& summaryAddress() const;
|
2018-05-10 14:29:55 -05:00
|
|
|
RimSummaryCaseCollection* ensemble() const;
|
|
|
|
bool isEnsembleCurve() const;
|
2022-03-31 01:57:52 -05:00
|
|
|
void setSummaryAddress( const RifEclipseSummaryAddress& address );
|
2017-10-11 12:46:52 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool operator<( const RiaSummaryCurveDefinition& other ) const;
|
2017-10-11 12:46:52 -05:00
|
|
|
|
2017-10-16 15:04:00 -05:00
|
|
|
// TODO: Consider moving to a separate tools class
|
2023-02-26 03:48:40 -06:00
|
|
|
static void resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values );
|
2023-02-13 05:40:08 -06:00
|
|
|
static std::vector<time_t> timeSteps( const RiaSummaryCurveDefinition& curveDefinition );
|
2017-10-16 15:04:00 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString curveDefinitionText() const;
|
2017-10-24 02:44:50 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
2017-10-24 02:44:50 -05:00
|
|
|
|
2017-10-11 12:46:52 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
RimSummaryCase* m_summaryCase;
|
|
|
|
RifEclipseSummaryAddress m_summaryAddress;
|
|
|
|
RimSummaryCaseCollection* m_ensemble;
|
2020-09-15 05:53:46 -05:00
|
|
|
bool m_isEnsembleCurve;
|
2017-10-11 12:46:52 -05:00
|
|
|
};
|
2020-04-21 01:56:27 -05:00
|
|
|
|
|
|
|
class RiaSummaryCurveDefinitionAnalyser
|
|
|
|
{
|
|
|
|
public:
|
2020-07-30 07:03:50 -05:00
|
|
|
RiaSummaryCurveDefinitionAnalyser() = default;
|
|
|
|
void setCurveDefinitions( const std::vector<RiaSummaryCurveDefinition>& curveDefs );
|
2020-04-21 01:56:27 -05: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 01:42:32 -06:00
|
|
|
std::set<RifEclipseSummaryAddress> m_summaryAdresses;
|
2022-05-06 09:34:37 -05:00
|
|
|
std::set<std::string> m_vectorNames;
|
2020-04-21 01:56:27 -05:00
|
|
|
};
|