mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Prepare for dual porosity
Renamed active to matrixActive p4#: 20286
This commit is contained in:
parent
cd9d94f5f9
commit
1c8bb6e38e
@ -83,7 +83,7 @@ static const size_t cellMappingECLRi[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
|
||||
// Static functions
|
||||
//**************************************************************************************************
|
||||
|
||||
bool transferGridCellData(RigMainGrid* mainGrid, RigGridBase* localGrid, const ecl_grid_type* localEclGrid, size_t activeStartIndex)
|
||||
bool transferGridCellData(RigMainGrid* mainGrid, RigGridBase* localGrid, const ecl_grid_type* localEclGrid, size_t matrixActiveStartIndex)
|
||||
{
|
||||
int cellCount = ecl_grid_get_global_size(localEclGrid);
|
||||
size_t cellStartIndex = mainGrid->cells().size();
|
||||
@ -112,9 +112,9 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigGridBase* localGrid, const e
|
||||
//cell.setInvalid(invalid);
|
||||
|
||||
cell.setCellIndex(gIdx);
|
||||
bool active = ecl_grid_cell_active1(localEclGrid, gIdx);
|
||||
cell.setActive(active);
|
||||
cell.setGlobalMatrixActiveIndex(active ? activeStartIndex + ecl_grid_get_active_index1(localEclGrid, gIdx) : cvf::UNDEFINED_SIZE_T);
|
||||
bool matrixActive = ecl_grid_cell_active1(localEclGrid, gIdx);
|
||||
cell.setMatrixActive(matrixActive);
|
||||
cell.setGlobalMatrixActiveIndex(matrixActive ? matrixActiveStartIndex + ecl_grid_get_active_index1(localEclGrid, gIdx) : cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
int parentCellIndex = ecl_grid_get_parent_cell1(localEclGrid, gIdx);
|
||||
if (parentCellIndex == -1)
|
||||
@ -258,15 +258,15 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
|
||||
|
||||
progInfo.setProgress(3);
|
||||
|
||||
size_t globalActiveSize = ecl_grid_get_active_size(mainEclGrid);
|
||||
size_t globalMatrixActiveSize = ecl_grid_get_active_size(mainEclGrid);
|
||||
|
||||
for (lgrIdx = 0; lgrIdx < numLGRs; ++lgrIdx)
|
||||
{
|
||||
progInfo.setProgressDescription("LGR number " + QString::number(lgrIdx+1));
|
||||
|
||||
ecl_grid_type* localEclGrid = ecl_grid_iget_lgr(mainEclGrid, lgrIdx);
|
||||
transferGridCellData(mainGrid, static_cast<RigLocalGrid*>(mainGrid->gridByIndex(lgrIdx+1)), localEclGrid, globalActiveSize);
|
||||
globalActiveSize += ecl_grid_get_active_size(localEclGrid);
|
||||
transferGridCellData(mainGrid, static_cast<RigLocalGrid*>(mainGrid->gridByIndex(lgrIdx+1)), localEclGrid, globalMatrixActiveSize);
|
||||
globalMatrixActiveSize += ecl_grid_get_active_size(localEclGrid);
|
||||
progInfo.setProgress(3 + lgrIdx);
|
||||
}
|
||||
|
||||
|
@ -475,8 +475,8 @@ void RivReservoirViewPartMgr::computeNativeVisibility(cvf::UByteArray* cellVisib
|
||||
const RigCell& cell = grid->cell(cellIndex);
|
||||
|
||||
if ( !invalidCellsIsVisible && cell.isInvalid()
|
||||
|| !inactiveCellsIsVisible && !cell.active()
|
||||
|| !activeCellsIsVisible && cell.active()
|
||||
|| !inactiveCellsIsVisible && !cell.matrixActive()
|
||||
|| !activeCellsIsVisible && cell.matrixActive()
|
||||
|| mainGridIsVisible && (cell.subGrid() != NULL)
|
||||
|| cell.isWellCell()
|
||||
)
|
||||
|
@ -377,12 +377,12 @@ cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelNam
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
||||
reservoir->mainGrid()->cell(idx).setActive(false);
|
||||
reservoir->mainGrid()->cell(idx).setMatrixActive(false);
|
||||
}
|
||||
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
|
||||
reservoir->mainGrid()->cell(idx).setActive(false);
|
||||
reservoir->mainGrid()->cell(idx).setMatrixActive(false);
|
||||
}
|
||||
|
||||
// Add a property
|
||||
|
@ -1199,7 +1199,7 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
|
||||
for ( fIdx = 0; fIdx < cellCountFenceDirection; ++fIdx)
|
||||
{
|
||||
size_t fenceCellIndex = grid->cellIndexFromIJK(*pI,*pJ,*pK);
|
||||
if (grid->cell(fenceCellIndex).active())
|
||||
if (grid->cell(fenceCellIndex).matrixActive())
|
||||
{
|
||||
(*visibleCells)[fenceCellIndex] = true;
|
||||
}
|
||||
|
@ -118,12 +118,12 @@ cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelNa
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
||||
reservoir->mainGrid()->cell(idx).setActive(false);
|
||||
reservoir->mainGrid()->cell(idx).setMatrixActive(false);
|
||||
}
|
||||
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
|
||||
reservoir->mainGrid()->cell(idx).setActive(false);
|
||||
reservoir->mainGrid()->cell(idx).setMatrixActive(false);
|
||||
}
|
||||
}
|
||||
else if (modelName == "Result Mock Debug Model With Results")
|
||||
|
@ -38,7 +38,7 @@ RigCell::RigCell() :
|
||||
m_mainGridCellIndex(cvf::UNDEFINED_SIZE_T),
|
||||
m_subGrid(NULL),
|
||||
m_hostGrid(NULL),
|
||||
m_isActive(true),
|
||||
m_isMatrixActive(true),
|
||||
m_isInvalid(false),
|
||||
m_isWellCell(false),
|
||||
m_globalMatrixActiveIndex(cvf::UNDEFINED_SIZE_T),
|
||||
|
@ -37,8 +37,8 @@ public:
|
||||
caf::SizeTArray8& cornerIndices() { return m_cornerIndices;}
|
||||
const caf::SizeTArray8& cornerIndices() const { return m_cornerIndices;}
|
||||
|
||||
bool active() const { return m_isActive; }
|
||||
void setActive(bool val) { m_isActive = val; }
|
||||
bool matrixActive() const { return m_isMatrixActive; }
|
||||
void setMatrixActive(bool val) { m_isMatrixActive = val; }
|
||||
|
||||
bool isInvalid() const { return m_isInvalid; }
|
||||
void setInvalid( bool val ) { m_isInvalid = val; }
|
||||
@ -73,7 +73,7 @@ public:
|
||||
private:
|
||||
caf::SizeTArray8 m_cornerIndices;
|
||||
|
||||
bool m_isActive;
|
||||
bool m_isMatrixActive;
|
||||
bool m_isInvalid;
|
||||
bool m_isWellCell;
|
||||
|
||||
|
@ -357,7 +357,7 @@ bool RigGridBase::isCellActive(size_t i, size_t j, size_t k) const
|
||||
{
|
||||
size_t idx = cellIndexFromIJK(i, j, k);
|
||||
const RigCell& c = cell(idx);
|
||||
if (!c.active() || c.isInvalid())
|
||||
if (!c.matrixActive() || c.isInvalid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ size_t RigMainGrid::numActiveCells()
|
||||
size_t i;
|
||||
for (i = 0; i < m_cells.size(); i++)
|
||||
{
|
||||
if (m_cells[i].active()) numActiveCells++;
|
||||
if (m_cells[i].matrixActive()) numActiveCells++;
|
||||
}
|
||||
|
||||
m_activeCellCount = numActiveCells;
|
||||
@ -183,7 +183,7 @@ void RigMainGrid::computeActiveAndValidCellRanges()
|
||||
validBB.add(i, j, k);
|
||||
}
|
||||
|
||||
if (c.active())
|
||||
if (c.matrixActive())
|
||||
{
|
||||
activeBB.add(i, j, k);
|
||||
}
|
||||
@ -222,7 +222,7 @@ void RigMainGrid::computeBoundingBox()
|
||||
for (i = 0; i < cellCount(); i++)
|
||||
{
|
||||
const RigCell& c = cell(i);
|
||||
if (c.active())
|
||||
if (c.matrixActive())
|
||||
{
|
||||
const caf::SizeTArray8& indices = c.cornerIndices();
|
||||
|
||||
@ -286,7 +286,7 @@ void RigMainGrid::calculateActiveCellInfo(std::vector<qint32> &gridNumber,
|
||||
|
||||
for (size_t cIdx = 0; cIdx < m_cells.size(); ++cIdx)
|
||||
{
|
||||
if (m_cells[cIdx].active())
|
||||
if (m_cells[cIdx].matrixActive())
|
||||
{
|
||||
RigGridBase* grid = m_cells[cIdx].hostGrid();
|
||||
CVF_ASSERT(grid != NULL);
|
||||
|
@ -152,7 +152,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
||||
riCell.cornerIndices()[7] = nodeStartIndex + i * 8 + 7;
|
||||
|
||||
riCell.setParentCellIndex(0);
|
||||
if (!(i % 5)) riCell.setActive(false);
|
||||
if (!(i % 5)) riCell.setMatrixActive(false);
|
||||
|
||||
cells.push_back(riCell);
|
||||
}
|
||||
@ -288,7 +288,7 @@ bool RigReservoirBuilderMock::staticResult(RigReservoir* reservoir, const QStrin
|
||||
for (k = 0; k < reservoir->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = reservoir->mainGrid()->cells()[k];
|
||||
if (cell.active())
|
||||
if (cell.matrixActive())
|
||||
{
|
||||
if (cell.hostGrid() == reservoir->mainGrid())
|
||||
{
|
||||
@ -330,7 +330,7 @@ bool RigReservoirBuilderMock::dynamicResult(RigReservoir* reservoir, const QStri
|
||||
for (k = 0; k < reservoir->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = reservoir->mainGrid()->cells()[k];
|
||||
if (cell.active())
|
||||
if (cell.matrixActive())
|
||||
{
|
||||
if (cell.hostGrid() == reservoir->mainGrid())
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ void RigReservoirCellResults::computeDepthRelatedResults()
|
||||
{
|
||||
const RigCell& cell = m_ownerMainGrid->cells()[cellIdx];
|
||||
|
||||
if (computeValuesForActiveCellsOnly && !cell.active())
|
||||
if (computeValuesForActiveCellsOnly && !cell.matrixActive())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user