diff --git a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp index 74a7892560..1211dc9208 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp @@ -88,17 +88,17 @@ bool readDoubleValuesForActiveCells(RigCaseData* reservoir, size_t resultIndex, newPropertyData.push_back(std::vector()); RigActiveCellInfo* activeCellInfo = reservoir->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); - if (activeCellInfo->globalCellCount() > 0 && activeCellInfo->globalCellCount() != activeCellInfo->globalActiveCellCount()) + if (activeCellInfo->reservoirCellCount() > 0 && activeCellInfo->reservoirCellCount() != activeCellInfo->reservoirActiveCellCount()) { std::vector valuesAllCells; valuesAllCells.resize(ecl_kw_get_size(eclKeyWordData), HUGE_VAL); ecl_kw_get_data_as_double(eclKeyWordData, valuesAllCells.data()); - newPropertyData[0].resize(activeCellInfo->globalActiveCellCount(), HUGE_VAL); + newPropertyData[0].resize(activeCellInfo->reservoirActiveCellCount(), HUGE_VAL); std::vector& valuesActiveCells = newPropertyData[0]; size_t acIdx = 0; - for (size_t gcIdx = 0; gcIdx < activeCellInfo->globalCellCount(); gcIdx++) + for (size_t gcIdx = 0; gcIdx < activeCellInfo->reservoirCellCount(); gcIdx++) { size_t activeCellResultIndex = activeCellInfo->cellResultIndex(gcIdx); if (activeCellResultIndex != cvf::UNDEFINED_SIZE_T) diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index 3018d29dd4..f96e70bba3 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -287,8 +287,8 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, totalCellCount += ecl_grid_get_global_size(localEclGrid); } - activeCellInfo->setGlobalCellCount(totalCellCount); - fractureActiveCellInfo->setGlobalCellCount(totalCellCount); + activeCellInfo->setReservoirCellCount(totalCellCount); + fractureActiveCellInfo->setReservoirCellCount(totalCellCount); // Reserve room for the cells and nodes and fill them with data @@ -570,8 +570,8 @@ bool RifReaderEclipseOutput::readActiveCellInfo() RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); RigActiveCellInfo* fractureActiveCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS); - activeCellInfo->setGlobalCellCount(globalCellCount); - fractureActiveCellInfo->setGlobalCellCount(globalCellCount); + activeCellInfo->setReservoirCellCount(globalCellCount); + fractureActiveCellInfo->setReservoirCellCount(globalCellCount); activeCellInfo->setGridCount(actnumKeywordCount); fractureActiveCellInfo->setGridCount(actnumKeywordCount); @@ -773,7 +773,7 @@ bool RifReaderEclipseOutput::staticResult(const QString& result, PorosityModelRe if (result.compare("ACTNUM", Qt::CaseInsensitive) == 0) { RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(matrixOrFracture); - values->resize(activeCellInfo->globalActiveCellCount(), 1.0); + values->resize(activeCellInfo->reservoirActiveCellCount(), 1.0); return true; } @@ -1551,7 +1551,7 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL if (matrixOrFracture == RifReaderInterface::FRACTURE_RESULTS) { - if (fractureActiveCellInfo->globalActiveCellCount() == 0) + if (fractureActiveCellInfo->reservoirActiveCellCount() == 0) { return QStringList(); } @@ -1564,16 +1564,16 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL QString keyword = keywords[i]; size_t keywordDataCount = keywordDataItemCounts[i]; - if (activeCellInfo->globalActiveCellCount() > 0) + if (activeCellInfo->reservoirActiveCellCount() > 0) { - size_t timeStepsAllCells = keywordDataItemCounts[i] / activeCellInfo->globalCellCount(); - size_t timeStepsAllCellsRest = keywordDataItemCounts[i] % activeCellInfo->globalCellCount(); + size_t timeStepsAllCells = keywordDataItemCounts[i] / activeCellInfo->reservoirCellCount(); + size_t timeStepsAllCellsRest = keywordDataItemCounts[i] % activeCellInfo->reservoirCellCount(); - size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->globalActiveCellCount(); - size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->globalActiveCellCount(); + size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->reservoirActiveCellCount(); + size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->reservoirActiveCellCount(); - size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount()); - size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount()); + size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount()); + size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount()); if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS) { @@ -1620,7 +1620,7 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(PorosityMod RigActiveCellInfo* fracActCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS); - if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->globalActiveCellCount() == 0) + if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->reservoirActiveCellCount() == 0) { destinationResultValues->insert(destinationResultValues->end(), sourceResultValues.begin(), sourceResultValues.end()); } diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index 752f4894f7..3bc4c76a18 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -117,8 +117,8 @@ void Rim3dOverlayInfoConfig::update3DInfo() { caseName = m_reservoirView->eclipseCase()->caseUserDescription(); totCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cells().size()); - size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount(); - size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount(); + size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount(); + size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount(); if (frActCellCount > 0) activeCellCountText += "Matrix : "; activeCellCountText += QString::number(mxActCellCount); if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount); diff --git a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp index 0ac3651308..1dec69908d 100644 --- a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp +++ b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp @@ -223,7 +223,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() //-------------------------------------------------------------------------------------------------- void RimIdenticalGridCaseGroup::computeUnionOfActiveCells() { - if (m_unionOfMatrixActiveCells->globalActiveCellCount() > 0) + if (m_unionOfMatrixActiveCells->reservoirActiveCellCount() > 0) { return; } @@ -235,8 +235,8 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells() return; } - m_unionOfMatrixActiveCells->setGlobalCellCount(m_mainGrid->cells().size()); - m_unionOfFractureActiveCells->setGlobalCellCount(m_mainGrid->cells().size()); + m_unionOfMatrixActiveCells->setReservoirCellCount(m_mainGrid->cells().size()); + m_unionOfFractureActiveCells->setReservoirCellCount(m_mainGrid->cells().size()); m_unionOfMatrixActiveCells->setGridCount(m_mainGrid->gridCount()); m_unionOfFractureActiveCells->setGridCount(m_mainGrid->gridCount()); diff --git a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp index b61801dc61..a15c100d9b 100644 --- a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp @@ -345,7 +345,7 @@ void RimResultDefinition::updateFieldVisibility() m_reservoirView->eclipseCase()->reservoirData() && m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS) ) { - if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount() == 0) + if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() == 0) { m_porosityModelUiField.setUiHidden(true); } diff --git a/ApplicationCode/ProjectDataModel/RimStatisticsCaseEvaluator.cpp b/ApplicationCode/ProjectDataModel/RimStatisticsCaseEvaluator.cpp index 85f7c999e9..147db21832 100644 --- a/ApplicationCode/ProjectDataModel/RimStatisticsCaseEvaluator.cpp +++ b/ApplicationCode/ProjectDataModel/RimStatisticsCaseEvaluator.cpp @@ -103,7 +103,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList& result RimDefines::ResultCatType resultType = resultSpecification[i].m_resType; QString resultName = resultSpecification[i].m_resVarName; - size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->globalActiveCellCount(); + size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount(); RigCaseCellResultsData* destCellResultsData = m_destinationCase->results(poroModel); // Special handling if SOIL is asked for @@ -172,7 +172,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList& result RimDefines::ResultCatType resultType = resultSpecification[resSpecIdx].m_resType; QString resultName = resultSpecification[resSpecIdx].m_resVarName; - size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->globalActiveCellCount(); + size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount(); if (activeCellCount == 0) continue; diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp b/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp index 57e99d4ec0..5252bbac88 100644 --- a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp +++ b/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp @@ -32,7 +32,7 @@ TEST(RigActiveCellInfo, BasicTest) RigActiveCellInfo rigActiveCellInfo; size_t globalActiveCellCount = 10; - rigActiveCellInfo.setGlobalCellCount(globalActiveCellCount); + rigActiveCellInfo.setReservoirCellCount(globalActiveCellCount); for (size_t i = 0; i < globalActiveCellCount; i++) { @@ -57,7 +57,7 @@ TEST(RigActiveCellInfo, GridCellCounts) rigActiveCellInfo.setGridActiveCellCounts(2, 2); rigActiveCellInfo.computeDerivedData(); - EXPECT_TRUE(rigActiveCellInfo.globalActiveCellCount() == 3); + EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 3); } { @@ -68,6 +68,6 @@ TEST(RigActiveCellInfo, GridCellCounts) rigActiveCellInfo.setGridActiveCellCounts(2, 5 ); rigActiveCellInfo.computeDerivedData(); - EXPECT_TRUE(rigActiveCellInfo.globalActiveCellCount() == 12); + EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 12); } } diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp index 7e9c07b5a3..0013a2da44 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp @@ -34,7 +34,7 @@ RigActiveCellInfo::RigActiveCellInfo() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount) +void RigActiveCellInfo::setReservoirCellCount(size_t globalCellCount) { m_cellIndexToResultIndex.resize(globalCellCount, cvf::UNDEFINED_SIZE_T); } @@ -42,7 +42,7 @@ void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RigActiveCellInfo::globalCellCount() const +size_t RigActiveCellInfo::reservoirCellCount() const { return m_cellIndexToResultIndex.size(); } @@ -50,7 +50,7 @@ size_t RigActiveCellInfo::globalCellCount() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RigActiveCellInfo::globalCellResultCount() const +size_t RigActiveCellInfo::reservoirCellResultCount() const { return m_globalCellResultCount; } @@ -134,7 +134,7 @@ void RigActiveCellInfo::computeDerivedData() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RigActiveCellInfo::globalActiveCellCount() const +size_t RigActiveCellInfo::reservoirActiveCellCount() const { return m_globalActiveCellCount; } diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h index 562d4e1074..a1118f1d54 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h @@ -32,10 +32,10 @@ class RigActiveCellInfo : public cvf::Object public: RigActiveCellInfo(); - void setGlobalCellCount(size_t globalCellCount); - size_t globalCellCount() const; - size_t globalActiveCellCount() const; - size_t globalCellResultCount() const; + void setReservoirCellCount(size_t globalCellCount); + size_t reservoirCellCount() const; + size_t reservoirActiveCellCount() const; + size_t reservoirCellResultCount() const; bool isCoarseningActive() const; bool isActive(size_t reservoirCellIndex) const; diff --git a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp index ec981ebc21..bca46da76c 100644 --- a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp +++ b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp @@ -247,7 +247,7 @@ void RigReservoirBuilderMock::populateReservoir(RigCaseData* eclipseCase) // Set all cells active RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); - activeCellInfo->setGlobalCellCount(eclipseCase->mainGrid()->cells().size()); + activeCellInfo->setReservoirCellCount(eclipseCase->mainGrid()->cells().size()); for (size_t i = 0; i < eclipseCase->mainGrid()->cells().size(); i++) { activeCellInfo->setCellResultIndex(i, i); diff --git a/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp b/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp index a10762e2a6..f80a0c54b7 100644 --- a/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp @@ -158,7 +158,7 @@ public: } RigActiveCellInfo* actCellInfo = reservoirCase->reservoirData()->activeCellInfo(porosityModel); - size_t numMatrixModelActiveCells = actCellInfo->globalActiveCellCount(); + size_t numMatrixModelActiveCells = actCellInfo->reservoirActiveCellCount(); gridNumber.reserve(numMatrixModelActiveCells); cellI.reserve(numMatrixModelActiveCells); diff --git a/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp b/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp index 7a07f09d4a..d7784f1997 100644 --- a/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp @@ -152,7 +152,7 @@ public: RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid(); - size_t activeCellCount = actCellInfo->globalActiveCellCount(); + size_t activeCellCount = actCellInfo->reservoirActiveCellCount(); size_t doubleValueCount = activeCellCount * 3; socketStream << (quint64)activeCellCount; @@ -321,7 +321,7 @@ public: RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid(); - size_t activeCellCount = actCellInfo->globalActiveCellCount(); + size_t activeCellCount = actCellInfo->reservoirActiveCellCount(); size_t doubleValueCount = activeCellCount * 3 * 8; socketStream << (quint64)activeCellCount; diff --git a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp index 101f9edcea..fa98846c15 100644 --- a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp @@ -138,7 +138,7 @@ public: // then the byte-size of the result values in one timestep const RigActiveCellInfo* activeInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); - size_t timestepResultCount = activeInfo->globalActiveCellCount(); + size_t timestepResultCount = activeInfo->reservoirActiveCellCount(); quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double)); socketStream << timestepByteCount ; @@ -148,7 +148,7 @@ public: std::vector values(valueCount); size_t valueIndex = 0; - size_t globalCellCount = activeInfo->globalCellCount(); + size_t globalCellCount = activeInfo->reservoirCellCount(); for (size_t tIdx = 0; tIdx < requestedTimesteps.size(); ++tIdx) { std::vector& doubleValues = scalarResultFrames->at(requestedTimesteps[tIdx]); @@ -159,7 +159,7 @@ public: if (resultIdx < doubleValues.size()) { - if (doubleValues.size() == activeInfo->globalCellCount()) + if (doubleValues.size() == activeInfo->reservoirCellCount()) { // When reading data from input text files, result data is read for all grid cells // Read out values from data vector using global cell index instead of active cell result index @@ -528,9 +528,9 @@ public: RigActiveCellInfo* activeCellInfo = m_currentReservoir->reservoirData()->activeCellInfo(m_porosityModelEnum); - size_t globalActiveCellCount = activeCellInfo->globalActiveCellCount(); - size_t totalCellCount = activeCellInfo->globalCellCount(); - size_t globalCellResultCount = activeCellInfo->globalCellResultCount(); + size_t globalActiveCellCount = activeCellInfo->reservoirActiveCellCount(); + size_t totalCellCount = activeCellInfo->reservoirCellCount(); + size_t globalCellResultCount = activeCellInfo->reservoirCellResultCount(); bool isCoarseningActive = globalCellResultCount != globalActiveCellCount;