2017-10-20 10:00:16 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-20 10:00:16 +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-20 10:00:16 +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-20 10:00:16 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-03-14 09:18:48 +01:00
|
|
|
#include "RiaDateTimeDefines.h"
|
2023-03-15 13:39:57 +01:00
|
|
|
#include "RimObservedDataCollection.h"
|
2021-02-12 10:50:58 +01:00
|
|
|
|
2020-09-04 10:01:12 +02:00
|
|
|
#include <QString>
|
2024-04-16 14:22:15 +02:00
|
|
|
#include <QStringList>
|
2020-09-04 10:01:12 +02:00
|
|
|
|
2019-12-11 14:51:18 +01:00
|
|
|
#include <vector>
|
|
|
|
|
|
2024-01-25 10:41:57 +01:00
|
|
|
class RifEclipseSummaryAddress;
|
2017-11-15 07:07:26 +01:00
|
|
|
class RimSummaryPlot;
|
2022-04-06 17:39:07 +02:00
|
|
|
class RimSummaryMultiPlot;
|
|
|
|
|
class RimSummaryMultiPlotCollection;
|
2018-05-23 13:33:10 +02:00
|
|
|
class RimSummaryCaseMainCollection;
|
2019-12-11 14:51:18 +01:00
|
|
|
class RimSummaryCase;
|
2022-02-22 11:32:35 +01:00
|
|
|
class RimSummaryCaseCollection;
|
2023-03-23 14:10:30 +01:00
|
|
|
class RimSummaryTable;
|
|
|
|
|
class RimSummaryTableCollection;
|
2023-03-15 13:39:57 +01:00
|
|
|
class RimObservedDataCollection;
|
2023-09-20 09:48:03 +02:00
|
|
|
class RimSummaryCurve;
|
2024-01-25 10:41:57 +01:00
|
|
|
class RimUserDefinedCalculation;
|
2017-10-20 10:00:16 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
namespace caf
|
|
|
|
|
{
|
|
|
|
|
class PdmObject;
|
2022-06-17 17:24:58 +02:00
|
|
|
class PdmOptionItemInfo;
|
|
|
|
|
} // namespace caf
|
2017-11-15 07:07:26 +01:00
|
|
|
|
2017-10-20 10:00:16 +02:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-20 10:00:16 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RiaSummaryTools
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-12-09 23:18:15 +01:00
|
|
|
static RimSummaryCaseMainCollection* summaryCaseMainCollection();
|
2022-04-06 17:39:07 +02:00
|
|
|
static RimSummaryMultiPlotCollection* summaryMultiPlotCollection();
|
2023-03-15 13:39:57 +01:00
|
|
|
static RimObservedDataCollection* observedDataCollection();
|
2019-12-09 09:21:06 +01:00
|
|
|
|
2023-01-27 10:29:11 +01:00
|
|
|
static std::vector<RimSummaryCase*> singleTopLevelSummaryCases();
|
|
|
|
|
|
2019-12-09 09:21:06 +01:00
|
|
|
static void notifyCalculatedCurveNameHasChanged( int calculationId, const QString& currentCurveName );
|
2017-11-15 07:07:26 +01:00
|
|
|
|
2022-04-06 17:39:07 +02:00
|
|
|
static RimSummaryPlot* parentSummaryPlot( caf::PdmObject* object );
|
|
|
|
|
static RimSummaryMultiPlot* parentSummaryMultiPlot( caf::PdmObject* object );
|
|
|
|
|
static RimSummaryMultiPlotCollection* parentSummaryPlotCollection( caf::PdmObject* object );
|
2017-11-15 07:07:26 +01:00
|
|
|
|
2023-03-23 14:10:30 +01:00
|
|
|
static RimSummaryTable* parentSummaryTable( caf::PdmObject* object );
|
|
|
|
|
static RimSummaryTableCollection* parentSummaryTableCollection( caf::PdmObject* object );
|
|
|
|
|
|
2019-12-11 14:51:18 +01:00
|
|
|
static bool hasAccumulatedData( const RifEclipseSummaryAddress& address );
|
|
|
|
|
static void getSummaryCasesAndAddressesForCalculation( int id,
|
|
|
|
|
std::vector<RimSummaryCase*>& cases,
|
|
|
|
|
std::vector<RifEclipseSummaryAddress>& addresses );
|
2020-09-04 10:01:12 +02:00
|
|
|
|
2023-02-26 10:48:40 +01:00
|
|
|
static std::pair<std::vector<time_t>, std::vector<double>> resampledValuesForPeriod( const RifEclipseSummaryAddress& address,
|
|
|
|
|
const std::vector<time_t>& timeSteps,
|
2023-03-23 14:10:30 +01:00
|
|
|
const std::vector<double>& values,
|
2023-02-26 10:48:40 +01:00
|
|
|
RiaDefines::DateTimePeriod period );
|
2022-01-21 14:32:51 +01:00
|
|
|
|
2022-02-22 11:32:35 +01:00
|
|
|
static RimSummaryCase* summaryCaseById( int caseId );
|
|
|
|
|
static RimSummaryCaseCollection* ensembleById( int ensembleId );
|
2022-06-17 17:24:58 +02:00
|
|
|
|
|
|
|
|
static QList<caf::PdmOptionItemInfo> optionsForAllSummaryCases();
|
|
|
|
|
static QList<caf::PdmOptionItemInfo> optionsForSummaryCases( const std::vector<RimSummaryCase*>& cases );
|
2023-09-20 09:48:03 +02:00
|
|
|
|
|
|
|
|
static void copyCurveDataSources( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve );
|
|
|
|
|
static void copyCurveAxisData( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve );
|
2024-01-25 10:41:57 +01:00
|
|
|
|
|
|
|
|
static void reloadSummaryCase( RimSummaryCase* summaryCase );
|
2024-07-05 09:31:16 +02:00
|
|
|
static void reloadSummaryEnsemble( RimSummaryCaseCollection* ensemble );
|
2024-01-25 10:41:57 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static void updateRequiredCalculatedCurves( RimSummaryCase* sourceSummaryCase );
|
|
|
|
|
static bool isCalculationRequired( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase );
|
2017-10-20 10:00:16 +02:00
|
|
|
};
|