mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed active cell info from RigCell
Set all cells active for mock models p4#: 20614
This commit is contained in:
parent
edda92182b
commit
1a235529ac
@ -118,13 +118,8 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigActiveCellInfo* activeCellIn
|
||||
int matrixActiveIndex = ecl_grid_get_active_index1(localEclGrid, localCellIdx);
|
||||
if (matrixActiveIndex != -1)
|
||||
{
|
||||
cell.setActiveIndexInMatrixModel(matrixActiveStartIndex + matrixActiveIndex);
|
||||
activeCellInfo->setActiveIndexInMatrixModel(cellStartIndex + localCellIdx, matrixActiveStartIndex + matrixActiveIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
}
|
||||
|
||||
int fractureActiveIndex = ecl_grid_get_active_fracture_index1(localEclGrid, localCellIdx);
|
||||
if (fractureActiveIndex != -1)
|
||||
|
@ -383,12 +383,16 @@ cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelNam
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
||||
reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
//TODO: Rewrite active cell info in mock models
|
||||
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
}
|
||||
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
|
||||
reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
//TODO: Rewrite active cell info in mock models
|
||||
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
}
|
||||
|
||||
// Add a property
|
||||
|
@ -109,12 +109,16 @@ cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelNa
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
||||
reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
//TODO: Rewrite active cell info in mock models
|
||||
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
}
|
||||
|
||||
{
|
||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
|
||||
reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
//TODO: Rewrite active cell info in mock models
|
||||
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
}
|
||||
}
|
||||
else if (modelName == "Result Mock Debug Model With Results")
|
||||
|
@ -42,7 +42,6 @@ RigCell::RigCell() :
|
||||
m_hostGrid(NULL),
|
||||
m_isInvalid(false),
|
||||
m_isWellCell(false),
|
||||
m_activeIndexInMatrixModel(cvf::UNDEFINED_SIZE_T),
|
||||
m_cellIndex(cvf::UNDEFINED_SIZE_T),
|
||||
m_isInCoarseCell(false)
|
||||
{
|
||||
|
@ -37,10 +37,6 @@ public:
|
||||
caf::SizeTArray8& cornerIndices() { return m_cornerIndices;}
|
||||
const caf::SizeTArray8& cornerIndices() const { return m_cornerIndices;}
|
||||
|
||||
bool isActiveInMatrixModel() const { return m_activeIndexInMatrixModel != cvf::UNDEFINED_SIZE_T; }
|
||||
size_t activeIndexInMatrixModel() const { return m_activeIndexInMatrixModel; }
|
||||
void setActiveIndexInMatrixModel(size_t val) { m_activeIndexInMatrixModel = val; }
|
||||
|
||||
bool isInvalid() const { return m_isInvalid; }
|
||||
void setInvalid( bool val ) { m_isInvalid = val; }
|
||||
|
||||
@ -89,6 +85,4 @@ private:
|
||||
|
||||
// Result case specific data
|
||||
bool m_isWellCell;
|
||||
|
||||
size_t m_activeIndexInMatrixModel; ///< This cell's running index of all the active calls (matrix) in the reservoir
|
||||
};
|
||||
|
@ -152,6 +152,8 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
||||
|
||||
riCell.setParentCellIndex(0);
|
||||
|
||||
//TODO: Rewrite active cell info in mock models
|
||||
/*
|
||||
if (!(i % 5))
|
||||
{
|
||||
riCell.setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||
@ -160,6 +162,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
||||
{
|
||||
riCell.setActiveIndexInMatrixModel(activeCellIndex++);
|
||||
}
|
||||
*/
|
||||
|
||||
cells.push_back(riCell);
|
||||
}
|
||||
@ -242,6 +245,14 @@ void RigReservoirBuilderMock::populateReservoir(RigEclipseCase* eclipseCase)
|
||||
eclipseCase->mainGrid()->setGridPointDimensions(m_gridPointDimensions);
|
||||
|
||||
addWellData(eclipseCase, eclipseCase->mainGrid());
|
||||
|
||||
// Set all cells active
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo();
|
||||
activeCellInfo->setGlobalCellCount(eclipseCase->mainGrid()->cells().size());
|
||||
for (size_t i = 0; i < eclipseCase->mainGrid()->cells().size(); i++)
|
||||
{
|
||||
activeCellInfo->setActiveIndexInMatrixModel(i, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -293,18 +304,9 @@ bool RigReservoirBuilderMock::staticResult(RigEclipseCase* eclipseCase, const QS
|
||||
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = eclipseCase->mainGrid()->cells()[k];
|
||||
if (cell.isActiveInMatrixModel())
|
||||
{
|
||||
if (cell.hostGrid() == eclipseCase->mainGrid())
|
||||
{
|
||||
values->push_back((k * 2) % eclipseCase->mainGrid()->cells().size());
|
||||
}
|
||||
else
|
||||
{
|
||||
values->push_back(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -331,18 +333,10 @@ bool RigReservoirBuilderMock::dynamicResult(RigEclipseCase* eclipseCase, const Q
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = eclipseCase->mainGrid()->cells()[k];
|
||||
if (cell.isActiveInMatrixModel())
|
||||
{
|
||||
if (cell.hostGrid() == eclipseCase->mainGrid())
|
||||
{
|
||||
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % eclipseCase->mainGrid()->cells().size() );
|
||||
values->push_back(val);
|
||||
}
|
||||
else
|
||||
{
|
||||
values->push_back(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set result size to zero for some timesteps
|
||||
|
Loading…
Reference in New Issue
Block a user