diff --git a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp index e91aac25f8..bc4aabebb6 100644 --- a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp +++ b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp @@ -22,10 +22,10 @@ #include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" #include "RigGridManager.h" #include "RigMainGrid.h" +#include "RigResultInfo.h" #include "RimCaseCollection.h" #include "RimCellEdgeColors.h" @@ -242,7 +242,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() std::vector daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0); std::vector reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0); - const std::vector resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex(); + const std::vector resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex(); for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++) { diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp index ecdb171056..e138268a9d 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp @@ -21,9 +21,10 @@ #include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigEclipseCaseData.h" #include "RigCell.h" +#include "RigEclipseCaseData.h" #include "RigMainGrid.h" +#include "RigResultInfo.h" #include "RimEclipseCase.h" #include "RimTools.h" @@ -90,7 +91,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave() if (!m_cellResults) return; - const std::vector& resInfo = m_cellResults->infoForEachResultIndex(); + const std::vector& resInfo = m_cellResults->infoForEachResultIndex(); bool hasResultsToStore = false; for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx) diff --git a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake index 332a8c46bd..4b77dc480d 100644 --- a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake +++ b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake @@ -58,6 +58,7 @@ ${CEE_CURRENT_LIST_DIR}RigSimulationWellCoordsAndMD.h ${CEE_CURRENT_LIST_DIR}RigFishbonesGeometry.h ${CEE_CURRENT_LIST_DIR}RigWellPathIntersectionTools.h ${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.h +${CEE_CURRENT_LIST_DIR}RigResultInfo.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}RigWellPathIntersectionTools.cpp ${CEE_CURRENT_LIST_DIR}RigTransmissibilityEquations.cpp +${CEE_CURRENT_LIST_DIR}RigResultInfo.cpp ${CEE_CURRENT_LIST_DIR}RigTofAccumulatedPhaseFractionsCalculator.cpp ) diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 69daee7d82..f0aaa551bb 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -20,13 +20,15 @@ #include "RigCaseCellResultsData.h" -#include "RigMainGrid.h" -#include "RigStatisticsDataCache.h" -#include "RigStatisticsMath.h" #include "RigEclipseMultiPropertyStatCalc.h" #include "RigEclipseNativeStatCalc.h" +#include "RigMainGrid.h" +#include "RigResultInfo.h" +#include "RigStatisticsDataCache.h" +#include "RigStatisticsMath.h" #include + #include diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h index 18c5e11b5c..f965031fe1 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h @@ -35,6 +35,7 @@ class RifReaderInterface; class RigMainGrid; class RigActiveCellInfo; class RigStatisticsDataCache; +class ResultInfo; //================================================================================================== /// 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); 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 m_timeStepDates; - std::vector m_timeStepReportNumbers; - std::vector m_daysSinceSimulationStart; - }; - const std::vector& infoForEachResultIndex() { return m_resultInfos;} bool mustBeCalculated(size_t scalarResultIndex) const; diff --git a/ApplicationCode/ReservoirDataModel/RigResultInfo.cpp b/ApplicationCode/ReservoirDataModel/RigResultInfo.cpp new file mode 100644 index 0000000000..3535f5c336 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigResultInfo.cpp @@ -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 +// 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) +{ +} diff --git a/ApplicationCode/ReservoirDataModel/RigResultInfo.h b/ApplicationCode/ReservoirDataModel/RigResultInfo.h new file mode 100644 index 0000000000..ccbc0885b2 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigResultInfo.h @@ -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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RiaDefines.h" + +#include + +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 m_timeStepDates; + std::vector m_timeStepReportNumbers; + std::vector m_daysSinceSimulationStart; +};