diff --git a/ApplicationCode/ProjectDataModel/RigStatistics.cpp b/ApplicationCode/ProjectDataModel/RigStatistics.cpp index fb5cb26129..45de3423fe 100644 --- a/ApplicationCode/ProjectDataModel/RigStatistics.cpp +++ b/ApplicationCode/ProjectDataModel/RigStatistics.cpp @@ -156,7 +156,7 @@ void RigStatistics::buildSourceMetaData(RimDefines::ResultCatType resultType, co { RigEclipseCase* eclipseCase = m_sourceCases.at(caseIdx)->reservoirData(); - RimReservoirCellResultsCacher* matrixResults = m_sourceCases[caseIdx]->results(RifReaderInterface::MATRIX_RESULTS); + RimReservoirCellResultsStorage* matrixResults = m_sourceCases[caseIdx]->results(RifReaderInterface::MATRIX_RESULTS); size_t scalarResultIndex = matrixResults->findOrLoadScalarResult(resultType, resultName); if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) { diff --git a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp index ad47fc70c6..f1aad6768c 100644 --- a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp @@ -143,7 +143,7 @@ void RimCellPropertyFilter::setDefaultValues() size_t scalarIndex = resultDefinition->gridScalarIndex(); if (scalarIndex != cvf::UNDEFINED_SIZE_T) { - RimReservoirCellResultsCacher* results = m_parentContainer->reservoirView()->currentGridCellResults(); + RimReservoirCellResultsStorage* results = m_parentContainer->reservoirView()->currentGridCellResults(); if (results) { results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); diff --git a/ApplicationCode/ProjectDataModel/RimInputReservoir.cpp b/ApplicationCode/ProjectDataModel/RimInputReservoir.cpp index c221244c7b..d1c55cafb7 100644 --- a/ApplicationCode/ProjectDataModel/RimInputReservoir.cpp +++ b/ApplicationCode/ProjectDataModel/RimInputReservoir.cpp @@ -191,8 +191,8 @@ bool RimInputReservoir::openEclipseGridFile() RIApplication* app = RIApplication::instance(); if (app->preferences()->autocomputeDepthRelatedProperties) { - RimReservoirCellResultsCacher* matrixResults = results(RifReaderInterface::MATRIX_RESULTS); - RimReservoirCellResultsCacher* fractureResults = results(RifReaderInterface::FRACTURE_RESULTS); + RimReservoirCellResultsStorage* matrixResults = results(RifReaderInterface::MATRIX_RESULTS); + RimReservoirCellResultsStorage* fractureResults = results(RifReaderInterface::FRACTURE_RESULTS); matrixResults->computeDepthRelatedResults(); fractureResults->computeDepthRelatedResults(); diff --git a/ApplicationCode/ProjectDataModel/RimReservoir.cpp b/ApplicationCode/ProjectDataModel/RimReservoir.cpp index 4078d2eeb1..dab4e7566d 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoir.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoir.cpp @@ -47,10 +47,12 @@ RimReservoir::RimReservoir() CAF_PDM_InitFieldNoDefault(&reservoirViews, "ReservoirViews", "", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_matrixModelResults, "MatrixModelResults", "", "", "", ""); + m_matrixModelResults.setUiHidden(true); CAF_PDM_InitFieldNoDefault(&m_fractureModelResults, "FractureModelResults", "", "", "", ""); + m_fractureModelResults.setUiHidden(true); - m_matrixModelResults = new RimReservoirCellResultsCacher; - m_fractureModelResults = new RimReservoirCellResultsCacher; + m_matrixModelResults = new RimReservoirCellResultsStorage; + m_fractureModelResults = new RimReservoirCellResultsStorage; this->setReservoirData( NULL ); } @@ -316,7 +318,7 @@ void RimReservoir::setReservoirData(RigEclipseCase* eclipseCase) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacher* RimReservoir::results(RifReaderInterface::PorosityModelResultType porosityModel) +RimReservoirCellResultsStorage* RimReservoir::results(RifReaderInterface::PorosityModelResultType porosityModel) { if (porosityModel == RifReaderInterface::MATRIX_RESULTS) { diff --git a/ApplicationCode/ProjectDataModel/RimReservoir.h b/ApplicationCode/ProjectDataModel/RimReservoir.h index 05b634e706..5f6bc4ca30 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoir.h +++ b/ApplicationCode/ProjectDataModel/RimReservoir.h @@ -55,7 +55,7 @@ public: RigEclipseCase* reservoirData(); const RigEclipseCase* reservoirData() const; - RimReservoirCellResultsCacher* results(RifReaderInterface::PorosityModelResultType porosityModel); + RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel); RimReservoirView* createAndAddReservoirView(); void removeReservoirView(RimReservoirView* reservoirView); @@ -83,7 +83,7 @@ private: cvf::ref m_rigEclipseCase; private: - caf::PdmField m_matrixModelResults; - caf::PdmField m_fractureModelResults; + caf::PdmField m_matrixModelResults; + caf::PdmField m_fractureModelResults; }; diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.cpp b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.cpp index 5891016eb1..650da7597c 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.cpp @@ -23,12 +23,12 @@ #include "RigMainGrid.h" #include "RigCell.h" -CAF_PDM_SOURCE_INIT(RimReservoirCellResultsCacher, "ReservoirCellResultCacher"); +CAF_PDM_SOURCE_INIT(RimReservoirCellResultsStorage, "ReservoirCellResultStorage"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacher::RimReservoirCellResultsCacher() +RimReservoirCellResultsStorage::RimReservoirCellResultsStorage() : m_cellResults(NULL), m_ownerMainGrid(NULL) { @@ -44,7 +44,7 @@ RimReservoirCellResultsCacher::RimReservoirCellResultsCacher() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacher::~RimReservoirCellResultsCacher() +RimReservoirCellResultsStorage::~RimReservoirCellResultsStorage() { m_resultCacheMetaData.deleteAllChildObjects(); } @@ -56,7 +56,7 @@ RimReservoirCellResultsCacher::~RimReservoirCellResultsCacher() /// MagicNumber, Version, ResultVariables< Array < TimeStep< CellDataArraySize, CellData< Array > > > /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::setupBeforeSave() +void RimReservoirCellResultsStorage::setupBeforeSave() { if (!m_cellResults) return; @@ -90,7 +90,7 @@ void RimReservoirCellResultsCacher::setupBeforeSave() if (timestepCount) { // Create and setup the cache information for this result - RimReservoirCellResultsCacheEntryInfo* cacheEntry = new RimReservoirCellResultsCacheEntryInfo; + RimReservoirCellResultsStorageEntryInfo* cacheEntry = new RimReservoirCellResultsStorageEntryInfo; m_resultCacheMetaData.push_back(cacheEntry); cacheEntry->m_resultType = resInfo[rIdx].m_resultType; @@ -132,7 +132,7 @@ void RimReservoirCellResultsCacher::setupBeforeSave() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimReservoirCellResultsCacher::getValidCacheFileName() +QString RimReservoirCellResultsStorage::getValidCacheFileName() { QString cacheFileName; if (m_resultCacheFileName().isEmpty()) @@ -155,7 +155,7 @@ QString RimReservoirCellResultsCacher::getValidCacheFileName() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimReservoirCellResultsCacher::getCacheDirectoryPath() +QString RimReservoirCellResultsStorage::getCacheDirectoryPath() { QString cacheDirPath; QString projectFileName = RIApplication::instance()->project()->fileName(); @@ -168,7 +168,7 @@ QString RimReservoirCellResultsCacher::getCacheDirectoryPath() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::setReaderInterface(RifReaderInterface* readerInterface) +void RimReservoirCellResultsStorage::setReaderInterface(RifReaderInterface* readerInterface) { m_readerInterface = readerInterface; } @@ -177,7 +177,7 @@ void RimReservoirCellResultsCacher::setReaderInterface(RifReaderInterface* reade //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifReaderInterface* RimReservoirCellResultsCacher::readerInterface() +RifReaderInterface* RimReservoirCellResultsStorage::readerInterface() { return m_readerInterface.p(); } @@ -185,7 +185,7 @@ RifReaderInterface* RimReservoirCellResultsCacher::readerInterface() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RimReservoirCellResultsCacher::findOrLoadScalarResultForTimeStep(RimDefines::ResultCatType type, const QString& resultName, size_t timeStepIndex) +size_t RimReservoirCellResultsStorage::findOrLoadScalarResultForTimeStep(RimDefines::ResultCatType type, const QString& resultName, size_t timeStepIndex) { // Special handling for SOIL if (type == RimDefines::DYNAMIC_NATIVE && resultName.toUpper() == "SOIL") @@ -248,7 +248,7 @@ size_t RimReservoirCellResultsCacher::findOrLoadScalarResultForTimeStep(RimDefin //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RimReservoirCellResultsCacher::findOrLoadScalarResult(RimDefines::ResultCatType type, const QString& resultName) +size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RimDefines::ResultCatType type, const QString& resultName) { size_t resultGridIndex = cvf::UNDEFINED_SIZE_T; @@ -308,7 +308,7 @@ size_t RimReservoirCellResultsCacher::findOrLoadScalarResult(RimDefines::ResultC //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::loadOrComputeSOIL() +void RimReservoirCellResultsStorage::loadOrComputeSOIL() { for (size_t timeStepIdx = 0; timeStepIdx < m_cellResults->maxTimeStepCount(); timeStepIdx++) { @@ -320,7 +320,7 @@ void RimReservoirCellResultsCacher::loadOrComputeSOIL() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::loadOrComputeSOILForTimeStep(size_t timeStepIndex) +void RimReservoirCellResultsStorage::loadOrComputeSOILForTimeStep(size_t timeStepIndex) { size_t scalarIndexSWAT = findOrLoadScalarResultForTimeStep(RimDefines::DYNAMIC_NATIVE, "SWAT", timeStepIndex); size_t scalarIndexSGAS = findOrLoadScalarResultForTimeStep(RimDefines::DYNAMIC_NATIVE, "SGAS", timeStepIndex); @@ -404,7 +404,7 @@ void RimReservoirCellResultsCacher::loadOrComputeSOILForTimeStep(size_t timeStep //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::computeDepthRelatedResults() +void RimReservoirCellResultsStorage::computeDepthRelatedResults() { size_t depthResultGridIndex = findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "DEPTH"); size_t dxResultGridIndex = findOrLoadScalarResult(RimDefines::STATIC_NATIVE, "DX"); @@ -509,7 +509,7 @@ void RimReservoirCellResultsCacher::computeDepthRelatedResults() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RimReservoirCellResultsCacher::findOrLoadScalarResult(const QString& resultName) +size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(const QString& resultName) { size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; @@ -536,7 +536,7 @@ size_t RimReservoirCellResultsCacher::findOrLoadScalarResult(const QString& resu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::setCellResults(RigReservoirCellResults* cellResults) +void RimReservoirCellResultsStorage::setCellResults(RigReservoirCellResults* cellResults) { m_cellResults = cellResults; } @@ -544,18 +544,18 @@ void RimReservoirCellResultsCacher::setCellResults(RigReservoirCellResults* cell //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimReservoirCellResultsCacher::setMainGrid(RigMainGrid* mainGrid) +void RimReservoirCellResultsStorage::setMainGrid(RigMainGrid* mainGrid) { m_ownerMainGrid = mainGrid; } -CAF_PDM_SOURCE_INIT(RimReservoirCellResultsCacheEntryInfo, "ResultCacheEntryInfo"); +CAF_PDM_SOURCE_INIT(RimReservoirCellResultsStorageEntryInfo, "ResultStorageEntryInfo"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacheEntryInfo::RimReservoirCellResultsCacheEntryInfo() +RimReservoirCellResultsStorageEntryInfo::RimReservoirCellResultsStorageEntryInfo() { CAF_PDM_InitObject("Cache Entry", "", "", ""); @@ -569,7 +569,7 @@ RimReservoirCellResultsCacheEntryInfo::RimReservoirCellResultsCacheEntryInfo() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacheEntryInfo::~RimReservoirCellResultsCacheEntryInfo() +RimReservoirCellResultsStorageEntryInfo::~RimReservoirCellResultsStorageEntryInfo() { } diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.h b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.h index e49637729e..19141d7c6a 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.h +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsCacher.h @@ -24,21 +24,21 @@ #include "cafAppEnum.h" #include "RimDefines.h" -class RimReservoirCellResultsCacheEntryInfo; +class RimReservoirCellResultsStorageEntryInfo; class RigReservoirCellResults; class RifReaderInterface; class RigMainGrid; -class RimReservoirCellResultsCacher : public caf::PdmObject +class RimReservoirCellResultsStorage : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimReservoirCellResultsCacher(); - virtual ~RimReservoirCellResultsCacher(); + RimReservoirCellResultsStorage(); + virtual ~RimReservoirCellResultsStorage(); // Fields caf::PdmField m_resultCacheFileName; - caf::PdmPointersField + caf::PdmPointersField m_resultCacheMetaData; RigReservoirCellResults* cellResults() { return m_cellResults; } @@ -70,12 +70,12 @@ private: RigMainGrid* m_ownerMainGrid; }; -class RimReservoirCellResultsCacheEntryInfo : public caf::PdmObject +class RimReservoirCellResultsStorageEntryInfo : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimReservoirCellResultsCacheEntryInfo(); - virtual ~RimReservoirCellResultsCacheEntryInfo(); + RimReservoirCellResultsStorageEntryInfo(); + virtual ~RimReservoirCellResultsStorageEntryInfo(); caf::PdmField > m_resultType; caf::PdmField m_resultName; diff --git a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp index 353698c7bd..93b19388da 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp @@ -711,7 +711,7 @@ void RimReservoirView::loadDataAndUpdate() RIApplication* app = RIApplication::instance(); if (app->preferences()->autocomputeSOIL) { - RimReservoirCellResultsCacher* results = currentGridCellResults(); + RimReservoirCellResultsStorage* results = currentGridCellResults(); CVF_ASSERT(results); results->loadOrComputeSOIL(); } @@ -970,7 +970,7 @@ void RimReservoirView::setupBeforeSave() //-------------------------------------------------------------------------------------------------- /// Convenience for quick access to results //-------------------------------------------------------------------------------------------------- -RimReservoirCellResultsCacher* RimReservoirView::currentGridCellResults() +RimReservoirCellResultsStorage* RimReservoirView::currentGridCellResults() { if (m_reservoir) { diff --git a/ApplicationCode/ProjectDataModel/RimReservoirView.h b/ApplicationCode/ProjectDataModel/RimReservoirView.h index 24c75fdaae..75cbae54d1 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirView.h +++ b/ApplicationCode/ProjectDataModel/RimReservoirView.h @@ -117,7 +117,7 @@ public: caf::PdmField animationMode; // Access internal objects - RimReservoirCellResultsCacher* currentGridCellResults(); + RimReservoirCellResultsStorage* currentGridCellResults(); RigActiveCellInfo* currentActiveCellInfo(); void setEclipseCase(RimReservoir* reservoir); diff --git a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp index c3fbd388eb..44826426bc 100644 --- a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp @@ -119,7 +119,7 @@ size_t RimResultDefinition::gridScalarIndex() const { if (m_gridScalarResultIndex == cvf::UNDEFINED_SIZE_T) { - const RimReservoirCellResultsCacher* gridCellResults = m_reservoirView->currentGridCellResults(); + const RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->currentGridCellResults(); if (gridCellResults) m_gridScalarResultIndex = gridCellResults->cellResults()->findScalarResultIndex(resultType(), resultVariable()); } return m_gridScalarResultIndex; @@ -130,7 +130,7 @@ size_t RimResultDefinition::gridScalarIndex() const //-------------------------------------------------------------------------------------------------- void RimResultDefinition::loadResult() { - RimReservoirCellResultsCacher* gridCellResults = m_reservoirView->currentGridCellResults(); + RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->currentGridCellResults(); if (gridCellResults) { m_gridScalarResultIndex = gridCellResults->findOrLoadScalarResult(resultType(), resultVariable); @@ -148,7 +148,7 @@ void RimResultDefinition::loadResult() //-------------------------------------------------------------------------------------------------- bool RimResultDefinition::hasStaticResult() const { - const RimReservoirCellResultsCacher* gridCellResults = m_reservoirView->currentGridCellResults(); + const RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->currentGridCellResults(); if (hasResult() && gridCellResults->cellResults()->timeStepCount(m_gridScalarResultIndex) == 1 ) { return true;