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);
|
int matrixActiveIndex = ecl_grid_get_active_index1(localEclGrid, localCellIdx);
|
||||||
if (matrixActiveIndex != -1)
|
if (matrixActiveIndex != -1)
|
||||||
{
|
{
|
||||||
cell.setActiveIndexInMatrixModel(matrixActiveStartIndex + matrixActiveIndex);
|
|
||||||
activeCellInfo->setActiveIndexInMatrixModel(cellStartIndex + localCellIdx, 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);
|
int fractureActiveIndex = ecl_grid_get_active_fracture_index1(localEclGrid, localCellIdx);
|
||||||
if (fractureActiveIndex != -1)
|
if (fractureActiveIndex != -1)
|
||||||
|
@ -383,12 +383,16 @@ cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelNam
|
|||||||
mockFileInterface->open("", reservoir.p());
|
mockFileInterface->open("", reservoir.p());
|
||||||
{
|
{
|
||||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
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);
|
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
|
// Add a property
|
||||||
|
@ -109,12 +109,16 @@ cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelNa
|
|||||||
mockFileInterface->open("", reservoir.p());
|
mockFileInterface->open("", reservoir.p());
|
||||||
{
|
{
|
||||||
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
|
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);
|
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")
|
else if (modelName == "Result Mock Debug Model With Results")
|
||||||
|
@ -42,7 +42,6 @@ RigCell::RigCell() :
|
|||||||
m_hostGrid(NULL),
|
m_hostGrid(NULL),
|
||||||
m_isInvalid(false),
|
m_isInvalid(false),
|
||||||
m_isWellCell(false),
|
m_isWellCell(false),
|
||||||
m_activeIndexInMatrixModel(cvf::UNDEFINED_SIZE_T),
|
|
||||||
m_cellIndex(cvf::UNDEFINED_SIZE_T),
|
m_cellIndex(cvf::UNDEFINED_SIZE_T),
|
||||||
m_isInCoarseCell(false)
|
m_isInCoarseCell(false)
|
||||||
{
|
{
|
||||||
|
@ -37,10 +37,6 @@ public:
|
|||||||
caf::SizeTArray8& cornerIndices() { return m_cornerIndices;}
|
caf::SizeTArray8& cornerIndices() { return m_cornerIndices;}
|
||||||
const caf::SizeTArray8& cornerIndices() const { 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; }
|
bool isInvalid() const { return m_isInvalid; }
|
||||||
void setInvalid( bool val ) { m_isInvalid = val; }
|
void setInvalid( bool val ) { m_isInvalid = val; }
|
||||||
|
|
||||||
@ -89,6 +85,4 @@ private:
|
|||||||
|
|
||||||
// Result case specific data
|
// Result case specific data
|
||||||
bool m_isWellCell;
|
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);
|
riCell.setParentCellIndex(0);
|
||||||
|
|
||||||
|
//TODO: Rewrite active cell info in mock models
|
||||||
|
/*
|
||||||
if (!(i % 5))
|
if (!(i % 5))
|
||||||
{
|
{
|
||||||
riCell.setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
riCell.setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
|
||||||
@ -160,6 +162,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
|||||||
{
|
{
|
||||||
riCell.setActiveIndexInMatrixModel(activeCellIndex++);
|
riCell.setActiveIndexInMatrixModel(activeCellIndex++);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
cells.push_back(riCell);
|
cells.push_back(riCell);
|
||||||
}
|
}
|
||||||
@ -242,6 +245,14 @@ void RigReservoirBuilderMock::populateReservoir(RigEclipseCase* eclipseCase)
|
|||||||
eclipseCase->mainGrid()->setGridPointDimensions(m_gridPointDimensions);
|
eclipseCase->mainGrid()->setGridPointDimensions(m_gridPointDimensions);
|
||||||
|
|
||||||
addWellData(eclipseCase, eclipseCase->mainGrid());
|
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,17 +304,8 @@ bool RigReservoirBuilderMock::staticResult(RigEclipseCase* eclipseCase, const QS
|
|||||||
|
|
||||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
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());
|
||||||
{
|
|
||||||
values->push_back((k * 2) % eclipseCase->mainGrid()->cells().size());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
values->push_back(500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,17 +333,9 @@ bool RigReservoirBuilderMock::dynamicResult(RigEclipseCase* eclipseCase, const Q
|
|||||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||||
{
|
{
|
||||||
RigCell& cell = eclipseCase->mainGrid()->cells()[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);
|
||||||
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % eclipseCase->mainGrid()->cells().size() );
|
|
||||||
values->push_back(val);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
values->push_back(500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user