ResInsight/ApplicationCode/ProjectDataModel/RimStatisticsCaseEvaluator.h

80 lines
2.3 KiB
C
Raw Normal View History

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>
#include <QPair>
#include "RimDefines.h"
class RimReservoir;
class RigEclipseCase;
class RigReservoirCellResults;
2013-03-02 08:33:27 -06:00
class RimStatisticsConfig
2013-03-02 08:33:27 -06:00
{
public:
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;
};
class RimStatisticsCaseEvaluator
2013-03-02 08:33:27 -06:00
{
public:
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
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);
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:
std::vector<RimReservoir*> m_sourceCases;
std::vector<size_t> m_timeStepIndices;
2013-03-02 08:33:27 -06:00
size_t m_globalCellCount;
RimStatisticsConfig m_statisticsConfig;
RigEclipseCase* m_destinationCase;
2013-03-02 08:33:27 -06:00
};