mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1691 Move RigResultInfo into separate file
This commit is contained in:
parent
78da4c6469
commit
3253c8968e
@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include "RigActiveCellInfo.h"
|
#include "RigActiveCellInfo.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigGridManager.h"
|
#include "RigGridManager.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
|
#include "RigResultInfo.h"
|
||||||
|
|
||||||
#include "RimCaseCollection.h"
|
#include "RimCaseCollection.h"
|
||||||
#include "RimCellEdgeColors.h"
|
#include "RimCellEdgeColors.h"
|
||||||
@ -242,7 +242,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
|||||||
std::vector<double> daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0);
|
std::vector<double> daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0);
|
||||||
std::vector<int> reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0);
|
std::vector<int> reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0);
|
||||||
|
|
||||||
const std::vector<RigCaseCellResultsData::ResultInfo> resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex();
|
const std::vector<ResultInfo> resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex();
|
||||||
|
|
||||||
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
|
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -21,9 +21,10 @@
|
|||||||
|
|
||||||
#include "RigActiveCellInfo.h"
|
#include "RigActiveCellInfo.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigEclipseCaseData.h"
|
|
||||||
#include "RigCell.h"
|
#include "RigCell.h"
|
||||||
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
|
#include "RigResultInfo.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
@ -90,7 +91,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave()
|
|||||||
|
|
||||||
if (!m_cellResults) return;
|
if (!m_cellResults) return;
|
||||||
|
|
||||||
const std::vector<RigCaseCellResultsData::ResultInfo>& resInfo = m_cellResults->infoForEachResultIndex();
|
const std::vector<ResultInfo>& resInfo = m_cellResults->infoForEachResultIndex();
|
||||||
|
|
||||||
bool hasResultsToStore = false;
|
bool hasResultsToStore = false;
|
||||||
for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx)
|
for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx)
|
||||||
|
@ -58,6 +58,7 @@ ${CEE_CURRENT_LIST_DIR}RigSimulationWellCoordsAndMD.h
|
|||||||
${CEE_CURRENT_LIST_DIR}RigFishbonesGeometry.h
|
${CEE_CURRENT_LIST_DIR}RigFishbonesGeometry.h
|
||||||
${CEE_CURRENT_LIST_DIR}RigWellPathIntersectionTools.h
|
${CEE_CURRENT_LIST_DIR}RigWellPathIntersectionTools.h
|
||||||
${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.h
|
${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.h
|
||||||
|
${CEE_CURRENT_LIST_DIR}RigResultInfo.h
|
||||||
${CEE_CURRENT_LIST_DIR}RigTofAccumulatedPhaseFractionsCalculator.h
|
${CEE_CURRENT_LIST_DIR}RigTofAccumulatedPhaseFractionsCalculator.h
|
||||||
|
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ ${CEE_CURRENT_LIST_DIR}RigSimulationWellCoordsAndMD.cpp
|
|||||||
${CEE_CURRENT_LIST_DIR}RigFishbonesGeometry.cpp
|
${CEE_CURRENT_LIST_DIR}RigFishbonesGeometry.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RigWellPathIntersectionTools.cpp
|
${CEE_CURRENT_LIST_DIR}RigWellPathIntersectionTools.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.cpp
|
${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.cpp
|
||||||
|
${CEE_CURRENT_LIST_DIR}RigResultInfo.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RigTofAccumulatedPhaseFractionsCalculator.cpp
|
${CEE_CURRENT_LIST_DIR}RigTofAccumulatedPhaseFractionsCalculator.cpp
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -20,13 +20,15 @@
|
|||||||
|
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
|
|
||||||
#include "RigMainGrid.h"
|
|
||||||
#include "RigStatisticsDataCache.h"
|
|
||||||
#include "RigStatisticsMath.h"
|
|
||||||
#include "RigEclipseMultiPropertyStatCalc.h"
|
#include "RigEclipseMultiPropertyStatCalc.h"
|
||||||
#include "RigEclipseNativeStatCalc.h"
|
#include "RigEclipseNativeStatCalc.h"
|
||||||
|
#include "RigMainGrid.h"
|
||||||
|
#include "RigResultInfo.h"
|
||||||
|
#include "RigStatisticsDataCache.h"
|
||||||
|
#include "RigStatisticsMath.h"
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ class RifReaderInterface;
|
|||||||
class RigMainGrid;
|
class RigMainGrid;
|
||||||
class RigActiveCellInfo;
|
class RigActiveCellInfo;
|
||||||
class RigStatisticsDataCache;
|
class RigStatisticsDataCache;
|
||||||
|
class ResultInfo;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
/// Class containing the results for the complete number of active cells. Both main grid and LGR's
|
/// Class containing the results for the complete number of active cells. Both main grid and LGR's
|
||||||
@ -107,23 +108,6 @@ public:
|
|||||||
bool updateResultName(RiaDefines::ResultCatType resultType, QString& oldName, const QString& newName);
|
bool updateResultName(RiaDefines::ResultCatType resultType, QString& oldName, const QString& newName);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class ResultInfo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated, QString resultName, size_t gridScalarResultIndex)
|
|
||||||
: m_resultType(resultType), m_needsToBeStored(needsToBeStored), m_resultName(resultName), m_gridScalarResultIndex(gridScalarResultIndex), m_mustBeCalculated(mustBeCalculated) { }
|
|
||||||
|
|
||||||
public:
|
|
||||||
RiaDefines::ResultCatType m_resultType;
|
|
||||||
bool m_needsToBeStored;
|
|
||||||
bool m_mustBeCalculated;
|
|
||||||
QString m_resultName;
|
|
||||||
size_t m_gridScalarResultIndex;
|
|
||||||
std::vector<QDateTime> m_timeStepDates;
|
|
||||||
std::vector<int> m_timeStepReportNumbers;
|
|
||||||
std::vector<double> m_daysSinceSimulationStart;
|
|
||||||
};
|
|
||||||
|
|
||||||
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
||||||
|
|
||||||
bool mustBeCalculated(size_t scalarResultIndex) const;
|
bool mustBeCalculated(size_t scalarResultIndex) const;
|
||||||
|
32
ApplicationCode/ReservoirDataModel/RigResultInfo.cpp
Normal file
32
ApplicationCode/ReservoirDataModel/RigResultInfo.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2017 Statoil ASA
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "RigResultInfo.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
ResultInfo::ResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated,
|
||||||
|
QString resultName, size_t gridScalarResultIndex)
|
||||||
|
: m_resultType(resultType),
|
||||||
|
m_needsToBeStored(needsToBeStored),
|
||||||
|
m_mustBeCalculated(mustBeCalculated),
|
||||||
|
m_resultName(resultName),
|
||||||
|
m_gridScalarResultIndex(gridScalarResultIndex)
|
||||||
|
{
|
||||||
|
}
|
42
ApplicationCode/ReservoirDataModel/RigResultInfo.h
Normal file
42
ApplicationCode/ReservoirDataModel/RigResultInfo.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2017 Statoil ASA
|
||||||
|
//
|
||||||
|
// 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 <vector>
|
||||||
|
|
||||||
|
class QString;
|
||||||
|
|
||||||
|
class ResultInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated,
|
||||||
|
QString resultName, size_t gridScalarResultIndex);
|
||||||
|
|
||||||
|
public:
|
||||||
|
RiaDefines::ResultCatType m_resultType;
|
||||||
|
bool m_needsToBeStored;
|
||||||
|
bool m_mustBeCalculated;
|
||||||
|
QString m_resultName;
|
||||||
|
size_t m_gridScalarResultIndex;
|
||||||
|
std::vector<QDateTime> m_timeStepDates;
|
||||||
|
std::vector<int> m_timeStepReportNumbers;
|
||||||
|
std::vector<double> m_daysSinceSimulationStart;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user