diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h index a6192328b7..77041f7b25 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h @@ -53,6 +53,8 @@ class RigCaseCellResultsData : public cvf::Object public: explicit RigCaseCellResultsData(RigEclipseCaseData* ownerCaseData); + // Initialization + void setReaderInterface(RifReaderInterface* readerInterface); void setHdf5Filename(const QString& hdf5SourSimFilename ); void setActiveFormationNames(RigFormationNames* activeFormationNames); @@ -63,7 +65,21 @@ public: RigActiveCellInfo* activeCellInfo(); const RigActiveCellInfo* activeCellInfo() const; - // Max and min values of the results + // Access the results data + + const std::vector< std::vector > & cellScalarResults(const RigEclipseResultAddress& resVarAddr) const; + std::vector< std::vector > & cellScalarResults(const RigEclipseResultAddress& resVarAddr); + const std::vector& cellScalarResults(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex) const; + std::vector& cellScalarResults(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex); + + bool isUsingGlobalActiveIndex(const RigEclipseResultAddress& resVarAddr) const; + + static const std::vector* getResultIndexableStaticResult(RigActiveCellInfo* actCellInfo, + RigCaseCellResultsData* gridCellResults, + QString porvResultName, + std::vector &activeCellsResultsTempContainer); + // Statistic values of the results + void recalculateStatistics(const RigEclipseResultAddress& resVarAddr); void minMaxCellScalarValues(const RigEclipseResultAddress& resVarAddr, double& min, double& max); void minMaxCellScalarValues(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex, double& min, double& max); @@ -85,9 +101,6 @@ public: size_t timeStepCount(const RigEclipseResultAddress& resVarAddr) const; size_t maxTimeStepCount(RigEclipseResultAddress* resultAddressWithMostTimeSteps = nullptr) const; - QStringList resultNames(RiaDefines::ResultCatType type) const; - bool isUsingGlobalActiveIndex(const RigEclipseResultAddress& resVarAddr) const; - bool hasFlowDiagUsableFluxes() const; std::vector allTimeStepDatesFromEclipseReader() const; std::vector timeStepDates() const; @@ -99,45 +112,31 @@ public: std::vector timeStepInfos(const RigEclipseResultAddress& resVarAddr) const; void setTimeStepInfos(const RigEclipseResultAddress& resVarAddr, const std::vector& timeStepInfos); - - QString makeResultNameUnique(const QString& resultNameProposal) const; - - void createPlaceholderResultEntries(); - void computeDepthRelatedResults(); - void computeCellVolumes(); - void clearScalarResult(RiaDefines::ResultCatType type, const QString & resultName); void clearScalarResult(const RigEclipseResultAddress& resultAddress); void clearAllResults(); void freeAllocatedResultsData(); - bool isResultLoaded(const RigEclipseResultAddress& resultAddress) const; void eraseAllSourSimData(); bool updateResultName(RiaDefines::ResultCatType resultType, QString& oldName, const QString& newName); + QStringList resultNames(RiaDefines::ResultCatType type) const; + QString makeResultNameUnique(const QString& resultNameProposal) const; + std::vector existingResults() const; + const RigEclipseResultInfo* resultInfo(const RigEclipseResultAddress& resVarAddr) const; void ensureKnownResultLoadedForTimeStep(const RigEclipseResultAddress& resultAddress, size_t timeStepIndex); bool ensureKnownResultLoaded(const RigEclipseResultAddress& resultAddress); bool hasResultEntry(const RigEclipseResultAddress& resultAddress) const; + bool isResultLoaded(const RigEclipseResultAddress& resultAddress) const; void createResultEntry(const RigEclipseResultAddress& resultAddress, bool needsToBeStored); + void createPlaceholderResultEntries(); + void computeDepthRelatedResults(); + void computeCellVolumes(); + bool hasFlowDiagUsableFluxes() const; - // Access the results data - - const std::vector< std::vector > & cellScalarResults(const RigEclipseResultAddress& resVarAddr) const; - std::vector< std::vector > & cellScalarResults(const RigEclipseResultAddress& resVarAddr); - const std::vector& cellScalarResults(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex) const; - std::vector& cellScalarResults(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex); - - static const std::vector* getResultIndexableStaticResult(RigActiveCellInfo* actCellInfo, - RigCaseCellResultsData* gridCellResults, - QString porvResultName, - std::vector &activeCellsResultsTempContainer); static void copyResultsMetaDataFromMainCase(RigEclipseCaseData* mainCaseResultsData, RiaDefines::PorosityModelType poroModel, std::vector destinationCases); - - std::vector existingResults() const; - const RigEclipseResultInfo* resultInfo(const RigEclipseResultAddress& resVarAddr) const; - private: size_t findOrLoadKnownScalarResult(RiaDefines::ResultCatType type, const QString& resultName); size_t findOrLoadKnownScalarResult(const QString& resultName); ///< Simplified search. Assumes unique names across types.