From cd9d94f5f9ecbad81278461c6a08855c31874586 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 29 Jan 2013 14:56:55 +0100 Subject: [PATCH] Prepare for dual porosity data structures. Renamed from activeCellIndex to activeMatrixCellIndex p4#: 20285 --- ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp | 2 +- .../ModelVisualization/RivCellEdgeEffectGenerator.cpp | 4 ++-- .../ModelVisualization/RivReservoirViewPartMgr.cpp | 2 +- ApplicationCode/ReservoirDataModel/RigCell.cpp | 2 +- ApplicationCode/ReservoirDataModel/RigCell.h | 8 ++++---- ApplicationCode/ReservoirDataModel/RigGridBase.cpp | 2 +- .../ReservoirDataModel/RigReservoirBuilderMock.cpp | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index fa5e7d02c2..2c3bd8da2e 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -114,7 +114,7 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigGridBase* localGrid, const e cell.setCellIndex(gIdx); bool active = ecl_grid_cell_active1(localEclGrid, gIdx); cell.setActive(active); - cell.setGlobalActiveIndex(active ? activeStartIndex + ecl_grid_get_active_index1(localEclGrid, gIdx) : cvf::UNDEFINED_SIZE_T); + cell.setGlobalMatrixActiveIndex(active ? activeStartIndex + ecl_grid_get_active_index1(localEclGrid, gIdx) : cvf::UNDEFINED_SIZE_T); int parentCellIndex = ecl_grid_get_parent_cell1(localEclGrid, gIdx); if (parentCellIndex == -1) diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.cpp b/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.cpp index e1f22f7dbd..c01f6e7ef2 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.cpp +++ b/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.cpp @@ -140,7 +140,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo( size_t resultValueIndex = cellIndex; if (cellScalarResultUseGlobalActiveIndex) { - resultValueIndex = grid->cell(cellIndex).globalActiveIndex(); + resultValueIndex = grid->cell(cellIndex).globalMatrixActiveIndex(); } { @@ -169,7 +169,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo( resultValueIndex = cellIndex; if (edgeScalarResultUseGlobalActiveIndex[cubeFaceIdx]) { - resultValueIndex = grid->cell(cellIndex).globalActiveIndex(); + resultValueIndex = grid->cell(cellIndex).globalMatrixActiveIndex(); } // Assuming static values to be mapped onto cell edge, always using time step zero diff --git a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp index f3e1266dc4..08a6b0d99b 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp @@ -607,7 +607,7 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis size_t resultValueIndex = cellIndex; if (useGlobalActiveIndex) { - resultValueIndex = grid->cell(cellIndex).globalActiveIndex(); + resultValueIndex = grid->cell(cellIndex).globalMatrixActiveIndex(); } double scalarValue = grid->mainGrid()->results()->cellScalarResult(timeStepIndex, scalarResultIndex, resultValueIndex); diff --git a/ApplicationCode/ReservoirDataModel/RigCell.cpp b/ApplicationCode/ReservoirDataModel/RigCell.cpp index 382164479b..a47f9d5e3e 100644 --- a/ApplicationCode/ReservoirDataModel/RigCell.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCell.cpp @@ -41,7 +41,7 @@ RigCell::RigCell() : m_isActive(true), m_isInvalid(false), m_isWellCell(false), - m_globalActiveIndex(cvf::UNDEFINED_SIZE_T), + m_globalMatrixActiveIndex(cvf::UNDEFINED_SIZE_T), m_cellIndex(cvf::UNDEFINED_SIZE_T) { memcpy(m_cornerIndices.m_array, undefinedCornersArray, 8*sizeof(size_t)); diff --git a/ApplicationCode/ReservoirDataModel/RigCell.h b/ApplicationCode/ReservoirDataModel/RigCell.h index 914666f0b7..ce647446c8 100644 --- a/ApplicationCode/ReservoirDataModel/RigCell.h +++ b/ApplicationCode/ReservoirDataModel/RigCell.h @@ -49,8 +49,8 @@ public: size_t cellIndex() const { return m_cellIndex; } void setCellIndex(size_t val) { m_cellIndex = val; } - size_t globalActiveIndex() const { return m_globalActiveIndex; } - void setGlobalActiveIndex(size_t val) { m_globalActiveIndex = val; } + size_t globalMatrixActiveIndex() const { return m_globalMatrixActiveIndex; } + void setGlobalMatrixActiveIndex(size_t val) { m_globalMatrixActiveIndex = val; } RigLocalGrid* subGrid() const { return m_subGrid; } void setSubGrid(RigLocalGrid* subGrid) { m_subGrid = subGrid; } @@ -85,6 +85,6 @@ private: size_t m_parentCellIndex; ///< Grid cell index of the cell in the parent grid containing this cell size_t m_mainGridCellIndex; - size_t m_globalActiveIndex; ///< This cell's running index of all the active calls in the reservoir. Used for result mapping - size_t m_cellIndex; ///< This cells index in the grid it belongs to. + size_t m_globalMatrixActiveIndex; ///< This cell's running index of all the active calls in the reservoir. Used for result mapping + size_t m_cellIndex; ///< This cells index in the grid it belongs to. }; diff --git a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp index c4369c16c7..3b23660915 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp @@ -255,7 +255,7 @@ double RigGridBase::cellScalar(size_t timeStepIndex, size_t scalarSetIndex, size bool useGlobalActiveIndex = m_mainGrid->results()->isUsingGlobalActiveIndex(scalarSetIndex); if (useGlobalActiveIndex) { - resultValueIndex = cell(cellIndex).globalActiveIndex(); + resultValueIndex = cell(cellIndex).globalMatrixActiveIndex(); if (resultValueIndex == cvf::UNDEFINED_SIZE_T) return HUGE_VAL; } diff --git a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp index 3a16ac780a..00c3d50c45 100644 --- a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp +++ b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp @@ -299,7 +299,7 @@ bool RigReservoirBuilderMock::staticResult(RigReservoir* reservoir, const QStrin values->push_back(500); } - cell.setGlobalActiveIndex(rIdx); + cell.setGlobalMatrixActiveIndex(rIdx); ++rIdx; } @@ -342,7 +342,7 @@ bool RigReservoirBuilderMock::dynamicResult(RigReservoir* reservoir, const QStri values->push_back(500); } - cell.setGlobalActiveIndex(rIdx); + cell.setGlobalMatrixActiveIndex(rIdx); ++rIdx; } }