2013-03-02 08:33:27 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
|
|
|
//
|
|
|
|
// 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 "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfCollection.h"
|
2013-03-02 08:39:33 -06:00
|
|
|
#include <vector>
|
|
|
|
#include <math.h>
|
|
|
|
|
2013-03-13 01:58:49 -05:00
|
|
|
#include <QPair>
|
2013-03-18 08:34:29 -05:00
|
|
|
#include "RimDefines.h"
|
|
|
|
|
|
|
|
class RimReservoir;
|
|
|
|
class RigEclipseCase;
|
|
|
|
class RigReservoirCellResults;
|
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-03-02 08:33:27 -06:00
|
|
|
: m_min(true),
|
|
|
|
m_max(true),
|
|
|
|
m_mean(true),
|
|
|
|
m_stdDev(true)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool m_min;
|
|
|
|
bool m_max;
|
|
|
|
bool m_mean;
|
|
|
|
bool m_stdDev;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-03-22 04:03:51 -05:00
|
|
|
class RimStatisticsCaseEvaluator
|
2013-03-02 08:33:27 -06:00
|
|
|
{
|
|
|
|
public:
|
2013-03-22 04:03:51 -05:00
|
|
|
RimStatisticsCaseEvaluator(const std::vector<RimReservoir*>& sourceCases,
|
|
|
|
const std::vector<size_t>& timeStepIndices,
|
|
|
|
const RimStatisticsConfig& statisticsConfig,
|
|
|
|
RigEclipseCase* destinationCase);
|
2013-03-02 08:33:27 -06:00
|
|
|
|
|
|
|
|
2013-03-22 04:03:51 -05:00
|
|
|
void evaluateForResults(const QList<QPair<RimDefines::ResultCatType, QString> >& resultSpecification);
|
2013-03-02 08:33:27 -06:00
|
|
|
|
|
|
|
void debugOutput(RimDefines::ResultCatType resultType, const QString& resultName, size_t timeStepIdx);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void addNamedResult(RigReservoirCellResults* cellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
|
2013-03-13 01:58:49 -05:00
|
|
|
void buildSourceMetaData(RimDefines::ResultCatType resultType, const QString& resultName);
|
2013-03-12 03:59:33 -05:00
|
|
|
|
2013-03-02 08:33:27 -06:00
|
|
|
private:
|
2013-03-22 04:03:51 -05:00
|
|
|
std::vector<RimReservoir*> m_sourceCases;
|
|
|
|
std::vector<size_t> m_timeStepIndices;
|
2013-03-02 08:33:27 -06:00
|
|
|
|
2013-03-22 04:03:51 -05:00
|
|
|
size_t m_globalCellCount;
|
|
|
|
RimStatisticsConfig m_statisticsConfig;
|
|
|
|
RigEclipseCase* m_destinationCase;
|
2013-03-02 08:33:27 -06:00
|
|
|
};
|
|
|
|
|