2013-03-02 08:33:27 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2013-03-02 08:33:27 -06: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.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "RimDefines.h"
|
|
|
|
#include "RimStatisticsCase.h"
|
|
|
|
|
2013-03-02 08:39:33 -06:00
|
|
|
#include <vector>
|
|
|
|
#include <math.h>
|
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
|
2015-05-15 01:40:27 -05:00
|
|
|
class RimEclipseCase;
|
2013-03-22 09:43:42 -05:00
|
|
|
class RigCaseData;
|
|
|
|
class RigCaseCellResultsData;
|
2013-03-13 01:58:49 -05:00
|
|
|
|
2013-03-02 08:33:27 -06:00
|
|
|
|
2013-03-22 04:03:51 -05:00
|
|
|
class RimStatisticsConfig
|
2013-03-02 08:33:27 -06:00
|
|
|
{
|
|
|
|
public:
|
2013-03-22 04:03:51 -05:00
|
|
|
RimStatisticsConfig()
|
2013-04-04 09:53:34 -05:00
|
|
|
: m_calculatePercentiles(true),
|
|
|
|
m_pMinPos(10.0),
|
|
|
|
m_pMidPos(50.0),
|
|
|
|
m_pMaxPos(90.0),
|
2015-06-25 04:57:41 -05:00
|
|
|
m_pValMethod(RimEclipseStatisticsCase::INTERPOLATED_OBSERVATION)
|
2013-03-02 08:33:27 -06:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
2013-04-04 09:53:34 -05:00
|
|
|
bool m_calculatePercentiles;
|
|
|
|
double m_pMinPos;
|
|
|
|
double m_pMidPos;
|
|
|
|
double m_pMaxPos;
|
2015-06-25 04:57:41 -05:00
|
|
|
RimEclipseStatisticsCase::PercentileCalcType m_pValMethod;
|
2013-03-02 08:33:27 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-06-25 05:01:08 -05:00
|
|
|
class RimEclipseStatisticsCaseEvaluator
|
2013-03-02 08:33:27 -06:00
|
|
|
{
|
|
|
|
public:
|
2015-06-25 05:01:08 -05:00
|
|
|
RimEclipseStatisticsCaseEvaluator(const std::vector<RimEclipseCase*>& sourceCases,
|
2013-03-22 04:03:51 -05:00
|
|
|
const std::vector<size_t>& timeStepIndices,
|
|
|
|
const RimStatisticsConfig& statisticsConfig,
|
2013-03-22 09:43:42 -05:00
|
|
|
RigCaseData* destinationCase);
|
2013-03-02 08:33:27 -06:00
|
|
|
|
2013-04-04 09:53:34 -05:00
|
|
|
struct ResSpec
|
|
|
|
{
|
|
|
|
ResSpec() : m_resType(RimDefines::DYNAMIC_NATIVE), m_poroModel(RifReaderInterface::MATRIX_RESULTS) {}
|
|
|
|
ResSpec( RifReaderInterface::PorosityModelResultType poroModel,
|
|
|
|
RimDefines::ResultCatType resType,
|
|
|
|
QString resVarName) : m_poroModel(poroModel), m_resType(resType), m_resVarName(resVarName) {}
|
|
|
|
|
|
|
|
RifReaderInterface::PorosityModelResultType m_poroModel;
|
|
|
|
RimDefines::ResultCatType m_resType;
|
|
|
|
QString m_resVarName;
|
|
|
|
};
|
2013-03-02 08:33:27 -06:00
|
|
|
|
2013-04-04 09:53:34 -05:00
|
|
|
void evaluateForResults(const QList<ResSpec >& resultSpecification);
|
2013-03-02 08:33:27 -06:00
|
|
|
|
|
|
|
private:
|
2013-03-22 09:43:42 -05:00
|
|
|
void addNamedResult(RigCaseCellResultsData* cellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
|
2013-04-04 09:53:34 -05:00
|
|
|
void buildSourceMetaData(RifReaderInterface::PorosityModelResultType poroModel, RimDefines::ResultCatType resultType, const QString& resultName);
|
|
|
|
|
|
|
|
enum StatisticsParamType { MIN, MAX, RANGE, MEAN, STDEV, PMIN, PMID, PMAX, STAT_PARAM_COUNT };
|
2013-03-12 03:59:33 -05:00
|
|
|
|
2013-03-02 08:33:27 -06:00
|
|
|
private:
|
2015-05-15 01:40:27 -05:00
|
|
|
std::vector<RimEclipseCase*> m_sourceCases;
|
2013-04-04 09:53:34 -05:00
|
|
|
std::vector<size_t> m_timeStepIndices;
|
2013-03-02 08:33:27 -06:00
|
|
|
|
2014-08-08 03:45:52 -05:00
|
|
|
size_t m_reservoirCellCount;
|
2013-04-04 09:53:34 -05:00
|
|
|
RimStatisticsConfig m_statisticsConfig;
|
|
|
|
RigCaseData* m_destinationCase;
|
2013-03-02 08:33:27 -06:00
|
|
|
};
|
|
|
|
|