ResInsight/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h

98 lines
3.4 KiB
C
Raw Normal View History

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
#include "RiaDefines.h"
#include "RimEclipseStatisticsCase.h"
2013-03-02 08:39:33 -06:00
#include <vector>
#include <cmath>
2013-03-02 08:39:33 -06:00
class RimEclipseCase;
2017-01-10 02:51:39 -06:00
class RigEclipseCaseData;
class RigCaseCellResultsData;
2013-03-02 08:33:27 -06:00
class RimStatisticsConfig
2013-03-02 08:33:27 -06:00
{
public:
RimStatisticsConfig()
: m_calculatePercentiles(true),
m_pMinPos(10.0),
m_pMidPos(50.0),
m_pMaxPos(90.0),
m_pValMethod(RimEclipseStatisticsCase::INTERPOLATED_OBSERVATION)
2013-03-02 08:33:27 -06:00
{
}
public:
bool m_calculatePercentiles;
double m_pMinPos;
double m_pMidPos;
double m_pMaxPos;
RimEclipseStatisticsCase::PercentileCalcType m_pValMethod;
2013-03-02 08:33:27 -06:00
};
class RimEclipseStatisticsCaseEvaluator
2013-03-02 08:33:27 -06:00
{
public:
RimEclipseStatisticsCaseEvaluator(const std::vector<RimEclipseCase*>& sourceCases,
const std::vector<size_t>& timeStepIndices,
const RimStatisticsConfig& statisticsConfig,
2017-01-10 02:51:39 -06:00
RigEclipseCaseData* destinationCase,
RimIdenticalGridCaseGroup* identicalGridCaseGroup);
2013-03-02 08:33:27 -06:00
struct ResSpec
{
ResSpec() : m_resType(RiaDefines::DYNAMIC_NATIVE), m_poroModel(RiaDefines::MATRIX_MODEL) {}
ResSpec( RiaDefines::PorosityModelType poroModel,
RiaDefines::ResultCatType resType,
QString resVarName) : m_poroModel(poroModel), m_resType(resType), m_resVarName(resVarName) {}
RiaDefines::PorosityModelType m_poroModel;
RiaDefines::ResultCatType m_resType;
QString m_resVarName;
};
2013-03-02 08:33:27 -06:00
void useZeroAsValueForInActiveCellsBasedOnUnionOfActiveCells();
void evaluateForResults(const QList<ResSpec >& resultSpecification);
2013-03-02 08:33:27 -06:00
private:
void addNamedResult(RigCaseCellResultsData* cellResults, RiaDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
void buildSourceMetaData(RiaDefines::PorosityModelType poroModel, RiaDefines::ResultCatType resultType, const QString& resultName);
2016-08-09 08:32:43 -05:00
enum StatisticsParamType { MIN, MAX, SUM, 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:
std::vector<RimEclipseCase*> m_sourceCases;
std::vector<size_t> m_timeStepIndices;
2013-03-02 08:33:27 -06:00
size_t m_reservoirCellCount;
RimStatisticsConfig m_statisticsConfig;
2017-01-10 02:51:39 -06:00
RigEclipseCaseData* m_destinationCase;
RimIdenticalGridCaseGroup* m_identicalGridCaseGroup;
bool m_useZeroAsInactiveCellValue;
2013-03-02 08:33:27 -06:00
};