2019-08-09 02:54:55 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2019- Equinor ASA
|
2019-08-28 06:38:06 -05:00
|
|
|
//
|
2019-08-09 02:54:55 -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-08-28 06:38:06 -05:00
|
|
|
//
|
2019-08-09 02:54:55 -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-08-28 06:38:06 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2019-08-09 02:54:55 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
2019-08-28 06:38:06 -05:00
|
|
|
#include "RifEclipseSummaryAddress.h"
|
|
|
|
|
2020-03-13 02:34:05 -05:00
|
|
|
#include <QString>
|
|
|
|
|
2019-08-28 06:38:06 -05:00
|
|
|
#include <set>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-10-25 06:15:02 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
|
|
|
class PdmObject;
|
|
|
|
}
|
|
|
|
|
2019-08-09 02:54:55 -05:00
|
|
|
class RimSummaryCurve;
|
|
|
|
class RimSummaryPlot;
|
|
|
|
class RimSummaryCase;
|
2020-03-13 02:34:05 -05:00
|
|
|
class RimSummaryCaseCollection;
|
2021-11-16 02:23:45 -06:00
|
|
|
class RimEnsembleCurveSet;
|
2019-08-09 02:54:55 -05:00
|
|
|
|
2019-08-13 04:48:57 -05:00
|
|
|
class QStringList;
|
|
|
|
|
2019-08-09 02:54:55 -05:00
|
|
|
class RicSummaryPlotFeatureImpl
|
|
|
|
{
|
|
|
|
public:
|
2020-03-13 02:34:05 -05:00
|
|
|
enum class EnsembleColoringType
|
|
|
|
{
|
|
|
|
SINGLE_COLOR,
|
|
|
|
PARAMETER,
|
|
|
|
LOG_PARAMETER,
|
|
|
|
NONE
|
|
|
|
};
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<RimSummaryCurve*> addDefaultCurvesToPlot( RimSummaryPlot* plot, RimSummaryCase* summaryCase );
|
2022-04-06 10:39:07 -05:00
|
|
|
static caf::PdmObject* createDefaultSummaryPlot( RimSummaryCase* summaryCase );
|
2019-08-28 06:38:06 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static void createSummaryPlotsFromArgumentLine( const QStringList& arguments );
|
2019-08-20 08:40:40 -05:00
|
|
|
|
2020-03-13 02:34:05 -05:00
|
|
|
static RimSummaryPlot*
|
2022-04-06 10:39:07 -05:00
|
|
|
createSummaryPlotForEnsemble( const std::vector<RimSummaryCase*>& summaryCasesToUse,
|
2021-11-16 02:23:45 -06:00
|
|
|
RimSummaryCaseCollection* ensemble,
|
|
|
|
QStringList summaryAddressFilters,
|
|
|
|
bool addHistoryCurves = false,
|
|
|
|
EnsembleColoringType ensembleColoringStyle = EnsembleColoringType::NONE,
|
|
|
|
QString ensembleColoringParameter = "" );
|
|
|
|
|
2022-04-06 10:39:07 -05:00
|
|
|
static RimSummaryPlot* createSummaryPlotForCases( const std::vector<RimSummaryCase*>& summaryCasesToUse,
|
2021-11-16 02:23:45 -06:00
|
|
|
QStringList summaryAddressFilters,
|
|
|
|
bool addHistoryCurves = false );
|
2020-03-13 02:34:05 -05:00
|
|
|
|
|
|
|
static std::vector<RimSummaryPlot*>
|
2022-04-06 10:39:07 -05:00
|
|
|
createMultipleSummaryPlotsFromAddresses( const std::vector<RimSummaryCase*>& summaryCasesToUse,
|
2020-03-13 02:34:05 -05:00
|
|
|
RimSummaryCaseCollection* ensemble,
|
|
|
|
QStringList summaryAddressFilters,
|
|
|
|
bool addHistoryCurves = false,
|
|
|
|
EnsembleColoringType ensembleColoringStyle = EnsembleColoringType::NONE,
|
|
|
|
QString ensembleColoringParameter = "" );
|
|
|
|
|
2021-11-16 02:23:45 -06:00
|
|
|
static void insertFilteredAddressesInSet( const QStringList& curveFilters,
|
|
|
|
const std::set<RifEclipseSummaryAddress>& allAddressesInCase,
|
|
|
|
std::set<RifEclipseSummaryAddress>* setToInsertFilteredAddressesIn,
|
|
|
|
std::vector<bool>* usedFilters );
|
2019-09-13 04:31:49 -05:00
|
|
|
|
2019-09-27 08:15:09 -05:00
|
|
|
static QString summaryPlotCommandLineHelpText();
|
|
|
|
|
2019-08-20 08:40:40 -05:00
|
|
|
private:
|
2021-11-16 02:23:45 -06:00
|
|
|
static RimEnsembleCurveSet* createCurveSet( RimSummaryCaseCollection* ensemble,
|
|
|
|
const RifEclipseSummaryAddress& addr,
|
|
|
|
EnsembleColoringType ensembleColoringStyle,
|
|
|
|
QString ensembleColoringParameter );
|
|
|
|
|
|
|
|
static RimSummaryCurve* createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address );
|
|
|
|
|
|
|
|
static RimSummaryCurve* createHistoryCurve( const RifEclipseSummaryAddress& addr, RimSummaryCase* summaryCasesToUse );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<RimSummaryCurve*> addCurvesFromAddressFiltersToPlot( const QStringList& curveFilters,
|
|
|
|
RimSummaryPlot* plot,
|
|
|
|
RimSummaryCase* summaryCase,
|
|
|
|
bool addHistoryCurves );
|
2019-09-13 04:31:49 -05:00
|
|
|
|
2019-08-28 06:38:06 -05:00
|
|
|
static std::set<RifEclipseSummaryAddress>
|
2019-09-13 04:31:49 -05:00
|
|
|
applySummaryAddressFiltersToCases( const std::vector<RimSummaryCase*>& summaryCasesToUse,
|
|
|
|
const QStringList& summaryAddressFilters );
|
|
|
|
};
|
|
|
|
|
|
|
|
#include "RigEclipseResultAddress.h"
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
class RigGridCellResultAddress
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigGridCellResultAddress()
|
|
|
|
: gridIndex( -1 )
|
|
|
|
, i( -1 )
|
|
|
|
, j( -1 )
|
|
|
|
, k( -1 )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
RigGridCellResultAddress( size_t gridIndex, size_t i, size_t j, size_t k, const RigEclipseResultAddress& eclipseResultAddress )
|
2019-09-13 04:31:49 -05:00
|
|
|
: gridIndex( gridIndex )
|
|
|
|
, i( i )
|
|
|
|
, j( j )
|
|
|
|
, k( k )
|
|
|
|
, eclipseResultAddress( eclipseResultAddress )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static std::vector<RigGridCellResultAddress> createGridCellAddressesFromFilter( const QString& text );
|
|
|
|
// Using zero based ijk
|
|
|
|
|
|
|
|
size_t gridIndex;
|
|
|
|
size_t i;
|
|
|
|
size_t j;
|
|
|
|
size_t k;
|
|
|
|
RigEclipseResultAddress eclipseResultAddress;
|
2019-08-09 02:54:55 -05:00
|
|
|
};
|