2013-03-02 15:33:27 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-03-02 15:33:27 +01: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
|
|
|
//
|
2013-03-02 15:33:27 +01: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>
|
2013-03-02 15:33:27 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2017-06-13 15:41:52 +02:00
|
|
|
#include "RiaDefines.h"
|
2015-06-25 13:23:36 +02:00
|
|
|
#include "RimEclipseStatisticsCase.h"
|
2014-07-24 10:11:43 +02:00
|
|
|
|
2019-01-10 16:16:49 +01:00
|
|
|
#include <cmath>
|
2019-09-06 10:40:57 +02:00
|
|
|
#include <vector>
|
2013-03-18 14:34:29 +01:00
|
|
|
|
2015-05-15 08:40:27 +02:00
|
|
|
class RimEclipseCase;
|
2017-01-10 09:51:39 +01:00
|
|
|
class RigEclipseCaseData;
|
2013-03-22 15:43:42 +01:00
|
|
|
class RigCaseCellResultsData;
|
2013-03-13 07:58:49 +01:00
|
|
|
|
2013-03-22 10:03:51 +01:00
|
|
|
class RimStatisticsConfig
|
2013-03-02 15:33:27 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2013-03-22 10:03:51 +01:00
|
|
|
RimStatisticsConfig()
|
2019-09-06 10:40:57 +02:00
|
|
|
: m_calculatePercentiles( true )
|
|
|
|
|
, m_pMinPos( 10.0 )
|
|
|
|
|
, m_pMidPos( 50.0 )
|
|
|
|
|
, m_pMaxPos( 90.0 )
|
|
|
|
|
, m_pValMethod( RimEclipseStatisticsCase::INTERPOLATED_OBSERVATION )
|
2013-03-02 15:33:27 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_calculatePercentiles;
|
|
|
|
|
double m_pMinPos;
|
|
|
|
|
double m_pMidPos;
|
|
|
|
|
double m_pMaxPos;
|
2015-06-25 11:57:41 +02:00
|
|
|
RimEclipseStatisticsCase::PercentileCalcType m_pValMethod;
|
2013-03-02 15:33:27 +01:00
|
|
|
};
|
|
|
|
|
|
2015-06-25 12:01:08 +02:00
|
|
|
class RimEclipseStatisticsCaseEvaluator
|
2013-03-02 15:33:27 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
RimEclipseStatisticsCaseEvaluator( const std::vector<RimEclipseCase*>& sourceCases,
|
|
|
|
|
const std::vector<size_t>& timeStepIndices,
|
|
|
|
|
const RimStatisticsConfig& statisticsConfig,
|
|
|
|
|
RigEclipseCaseData* destinationCase,
|
|
|
|
|
RimIdenticalGridCaseGroup* identicalGridCaseGroup );
|
2013-03-02 15:33:27 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
struct ResSpec
|
2013-04-04 16:53:34 +02:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
ResSpec()
|
2020-04-23 23:25:22 +02:00
|
|
|
: m_resType( RiaDefines::ResultCatType::DYNAMIC_NATIVE )
|
2020-04-24 06:53:06 +02:00
|
|
|
, m_poroModel( RiaDefines::PorosityModelType::MATRIX_MODEL )
|
2019-09-06 10:40:57 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
ResSpec( RiaDefines::PorosityModelType poroModel, RiaDefines::ResultCatType resType, QString resVarName )
|
|
|
|
|
: m_poroModel( poroModel )
|
|
|
|
|
, m_resType( resType )
|
|
|
|
|
, m_resVarName( resVarName )
|
|
|
|
|
{
|
|
|
|
|
}
|
2013-04-04 16:53:34 +02:00
|
|
|
|
2017-08-11 14:05:59 +02:00
|
|
|
RiaDefines::PorosityModelType m_poroModel;
|
2019-09-06 10:40:57 +02:00
|
|
|
RiaDefines::ResultCatType m_resType;
|
|
|
|
|
QString m_resVarName;
|
2013-04-04 16:53:34 +02:00
|
|
|
};
|
2013-03-02 15:33:27 +01:00
|
|
|
|
2016-09-01 18:34:59 +02:00
|
|
|
void useZeroAsValueForInActiveCellsBasedOnUnionOfActiveCells();
|
2016-09-01 18:08:51 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void evaluateForResults( const QList<ResSpec>& resultSpecification );
|
2013-03-02 15:33:27 +01:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void addNamedResult( RigCaseCellResultsData* cellResults,
|
|
|
|
|
RiaDefines::ResultCatType resultType,
|
|
|
|
|
const QString& resultName,
|
|
|
|
|
size_t activeCellCount );
|
|
|
|
|
void buildSourceMetaData( RiaDefines::PorosityModelType poroModel,
|
|
|
|
|
RiaDefines::ResultCatType resultType,
|
|
|
|
|
const QString& resultName );
|
|
|
|
|
|
|
|
|
|
enum StatisticsParamType
|
|
|
|
|
{
|
|
|
|
|
MIN,
|
|
|
|
|
MAX,
|
|
|
|
|
SUM,
|
|
|
|
|
RANGE,
|
|
|
|
|
MEAN,
|
|
|
|
|
STDEV,
|
|
|
|
|
PMIN,
|
|
|
|
|
PMID,
|
|
|
|
|
PMAX,
|
|
|
|
|
STAT_PARAM_COUNT
|
|
|
|
|
};
|
2013-03-12 09:59:33 +01:00
|
|
|
|
2013-03-02 15:33:27 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<RimEclipseCase*> m_sourceCases;
|
|
|
|
|
std::vector<size_t> m_timeStepIndices;
|
2013-03-02 15:33:27 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t m_reservoirCellCount;
|
|
|
|
|
RimStatisticsConfig m_statisticsConfig;
|
|
|
|
|
RigEclipseCaseData* m_destinationCase;
|
2016-09-01 18:08:51 +02:00
|
|
|
RimIdenticalGridCaseGroup* m_identicalGridCaseGroup;
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_useZeroAsInactiveCellValue;
|
2013-03-02 15:33:27 +01:00
|
|
|
};
|