Rename of functions in RigActiveCellInfo

p4#: 21045
This commit is contained in:
Magne Sjaastad
2013-03-22 09:32:42 +01:00
parent 0bb4d5ddc3
commit 21065176f2
15 changed files with 114 additions and 91 deletions

View File

@@ -120,13 +120,13 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigActiveCellInfo* activeCellIn
int matrixActiveIndex = ecl_grid_get_active_index1(localEclGrid, localCellIdx);
if (matrixActiveIndex != -1)
{
activeCellInfo->setActiveIndexInMatrixModel(cellStartIndex + localCellIdx, matrixActiveStartIndex + matrixActiveIndex);
activeCellInfo->setCellResultIndex(cellStartIndex + localCellIdx, matrixActiveStartIndex + matrixActiveIndex);
}
int fractureActiveIndex = ecl_grid_get_active_fracture_index1(localEclGrid, localCellIdx);
if (fractureActiveIndex != -1)
{
fractureActiveCellInfo->setActiveIndexInMatrixModel(cellStartIndex + localCellIdx, fractureActiveStartIndex + fractureActiveIndex);
fractureActiveCellInfo->setCellResultIndex(cellStartIndex + localCellIdx, fractureActiveStartIndex + fractureActiveIndex);
}
// Parent cell index
@@ -490,13 +490,13 @@ bool RifReaderEclipseOutput::readActiveCellInfo()
{
if (actnumValues[i] == 1 || actnumValues[i] == 3)
{
activeCellInfo->setActiveIndexInMatrixModel(cellIdx, globalActiveMatrixIndex++);
activeCellInfo->setCellResultIndex(cellIdx, globalActiveMatrixIndex++);
activeMatrixIndex++;
}
if (actnumValues[i] == 2 || actnumValues[i] == 3)
{
fractureActiveCellInfo->setActiveIndexInMatrixModel(cellIdx, globalActiveFractureIndex++);
fractureActiveCellInfo->setCellResultIndex(cellIdx, globalActiveFractureIndex++);
activeFractureIndex++;
}
@@ -919,7 +919,7 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
if (matrixOrFracture == RifReaderInterface::FRACTURE_RESULTS)
{
if (fractureActiveCellInfo->globalMatrixModelActiveCellCount() == 0)
if (fractureActiveCellInfo->globalActiveCellCount() == 0)
{
return QStringList();
}
@@ -932,13 +932,13 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
QString keyword = keywords[i];
size_t keywordDataCount = keywordDataItemCounts[i];
if (activeCellInfo->globalMatrixModelActiveCellCount() > 0)
if (activeCellInfo->globalActiveCellCount() > 0)
{
size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->globalMatrixModelActiveCellCount();
size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->globalMatrixModelActiveCellCount();
size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->globalActiveCellCount();
size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->globalActiveCellCount();
size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->globalMatrixModelActiveCellCount() + fractureActiveCellInfo->globalMatrixModelActiveCellCount());
size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->globalMatrixModelActiveCellCount() + fractureActiveCellInfo->globalMatrixModelActiveCellCount());
size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount());
size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount());
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS)
{
@@ -976,7 +976,7 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(PorosityMod
RigActiveCellInfo* fracActCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS);
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->globalMatrixModelActiveCellCount() == 0)
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->globalActiveCellCount() == 0)
{
destinationResultValues->insert(destinationResultValues->end(), sourceResultValues.begin(), sourceResultValues.end());
}

View File

@@ -487,8 +487,8 @@ void RivReservoirViewPartMgr::computeNativeVisibility(cvf::UByteArray* cellVisib
size_t globalCellIndex = cell.mainGridCellIndex();
if ( !invalidCellsIsVisible && cell.isInvalid()
|| !inactiveCellsIsVisible && !activeCellInfo->isActiveInMatrixModel(globalCellIndex)
|| !activeCellsIsVisible && activeCellInfo->isActiveInMatrixModel(globalCellIndex)
|| !inactiveCellsIsVisible && !activeCellInfo->isActive(globalCellIndex)
|| !activeCellsIsVisible && activeCellInfo->isActive(globalCellIndex)
|| mainGridIsVisible && (cell.subGrid() != NULL)
|| (*cellIsInWellStatuses)[cellIndex]
)

View File

@@ -92,7 +92,7 @@ void RigStatistics::evaluateStatistics(const QList<QPair<RimDefines::ResultCatTy
{
CVF_ASSERT(m_destinationCase);
size_t activeMatrixCellCount = m_destinationCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalMatrixModelActiveCellCount();
size_t activeMatrixCellCount = m_destinationCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount();
RigReservoirCellResults* matrixResults = m_destinationCase->results(RifReaderInterface::MATRIX_RESULTS);
for (int i = 0; i < resultSpecification.size(); i++)
@@ -225,7 +225,7 @@ void RigStatistics::evaluateStatistics(const QList<QPair<RimDefines::ResultCatTy
std::vector<double> values(dataAccesObjectList.size(), HUGE_VAL);
size_t globalGridCellIdx = grid->globalGridCellIndex(cellIdx);
if (m_destinationCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActiveInMatrixModel(globalGridCellIdx))
if (m_destinationCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(globalGridCellIdx))
{
bool foundAnyValidValues = false;
for (size_t caseIdx = 0; caseIdx < dataAccesObjectList.size(); caseIdx++)

View File

@@ -91,8 +91,8 @@ void Rim3dOverlayInfoConfig::update3DInfo()
{
caseName = m_reservoirView->eclipseCase()->caseName();
totCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cells().size());
size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalMatrixModelActiveCellCount();
size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalMatrixModelActiveCellCount();
size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount();
size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount();
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
activeCellCountText += QString::number(mxActCellCount);
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);

View File

@@ -119,7 +119,7 @@ void RimCellRangeFilter::setDefaultValues()
if (actCellInfo)
{
cvf::Vec3st min, max;
actCellInfo->matrixModelActiveCellsBoundingBox(min, max);
actCellInfo->IJKBoundingBox(min, max);
// Adjust to Eclipse indexing
min.x() = min.x() + 1;
@@ -165,7 +165,7 @@ void RimCellRangeFilter::defineEditorAttribute(const caf::PdmFieldHandle* field,
if (actCellInfo)
{
cvf::Vec3st min, max;
actCellInfo->matrixModelActiveCellsBoundingBox(min, max);
actCellInfo->IJKBoundingBox(min, max);
// Adjust to Eclipse indexing
min.x() = min.x() + 1;

View File

@@ -213,7 +213,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
//--------------------------------------------------------------------------------------------------
void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
{
if (m_unionOfMatrixActiveCells->globalMatrixModelActiveCellCount() > 0)
if (m_unionOfMatrixActiveCells->globalActiveCellCount() > 0)
{
return;
}
@@ -248,7 +248,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
if (activeM[localGridCellIdx] == 0)
{
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActiveInMatrixModel(globalCellIdx))
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(globalCellIdx))
{
activeM[localGridCellIdx] = 1;
}
@@ -256,7 +256,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
if (activeF[localGridCellIdx] == 0)
{
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActiveInMatrixModel(globalCellIdx))
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActive(globalCellIdx))
{
activeF[localGridCellIdx] = 1;
}
@@ -273,13 +273,13 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
if (activeM[localGridCellIdx] != 0)
{
m_unionOfMatrixActiveCells->setActiveIndexInMatrixModel(globalCellIdx, globalActiveMatrixIndex++);
m_unionOfMatrixActiveCells->setCellResultIndex(globalCellIdx, globalActiveMatrixIndex++);
activeMatrixIndex++;
}
if (activeF[localGridCellIdx] != 0)
{
m_unionOfFractureActiveCells->setActiveIndexInMatrixModel(globalCellIdx, globalActiveFractureIndex++);
m_unionOfFractureActiveCells->setCellResultIndex(globalCellIdx, globalActiveFractureIndex++);
activeFractureIndex++;
}
}

View File

@@ -721,7 +721,7 @@ void RimReservoirView::loadDataAndUpdate()
CVF_ASSERT(this->cellResult() != NULL);
this->cellResult()->loadResult();
if (m_reservoir->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalMatrixModelActiveCellCount() == 0)
if (m_reservoir->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount() == 0)
{
this->cellResult->porosityModel.setUiHidden(true);
}
@@ -1268,7 +1268,7 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
size_t fenceCellIndex = grid->cellIndexFromIJK(*pI,*pJ,*pK);
size_t globalGridCellIndex = grid->globalGridCellIndex(fenceCellIndex);
if (activeCellInfo && activeCellInfo->isActiveInMatrixModel(globalGridCellIndex))
if (activeCellInfo && activeCellInfo->isActive(globalGridCellIndex))
{
(*visibleCells)[fenceCellIndex] = true;
}

View File

@@ -65,7 +65,7 @@ void RimResultDefinition::setReservoirView(RimReservoirView* ownerReservoirView)
m_reservoirView->eclipseCase()->reservoirData() &&
m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS) )
{
if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalMatrixModelActiveCellCount() == 0)
if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount() == 0)
{
porosityModel.setUiHidden(true);
}

View File

@@ -23,7 +23,7 @@
///
//--------------------------------------------------------------------------------------------------
RigActiveCellInfo::RigActiveCellInfo()
: m_globalMatrixModelActiveCellCount(0),
: m_globalActiveCellCount(0),
m_activeCellPositionMin(cvf::Vec3d::ZERO),
m_activeCellPositionMax(cvf::Vec3d::ZERO)
{
@@ -35,47 +35,47 @@ RigActiveCellInfo::RigActiveCellInfo()
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount)
{
m_activeInMatrixModel.resize(globalCellCount, cvf::UNDEFINED_SIZE_T);
m_cellIndexToResultIndex.resize(globalCellCount, cvf::UNDEFINED_SIZE_T);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigActiveCellInfo::isActiveInMatrixModel(size_t globalCellIndex) const
bool RigActiveCellInfo::isActive(size_t globalCellIndex) const
{
if (m_activeInMatrixModel.size() == 0)
if (m_cellIndexToResultIndex.size() == 0)
{
return true;
}
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInMatrixModel.size());
CVF_TIGHT_ASSERT(globalCellIndex < m_cellIndexToResultIndex.size());
return m_activeInMatrixModel[globalCellIndex] != cvf::UNDEFINED_SIZE_T;
return m_cellIndexToResultIndex[globalCellIndex] != cvf::UNDEFINED_SIZE_T;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::activeIndexInMatrixModel(size_t globalCellIndex) const
size_t RigActiveCellInfo::cellResultIndex(size_t globalCellIndex) const
{
if (m_activeInMatrixModel.size() == 0)
if (m_cellIndexToResultIndex.size() == 0)
{
return globalCellIndex;
}
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInMatrixModel.size());
CVF_TIGHT_ASSERT(globalCellIndex < m_cellIndexToResultIndex.size());
return m_activeInMatrixModel[globalCellIndex];
return m_cellIndexToResultIndex[globalCellIndex];
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setActiveIndexInMatrixModel(size_t globalCellIndex, size_t globalActiveCellIndex)
void RigActiveCellInfo::setCellResultIndex(size_t globalCellIndex, size_t globalActiveCellIndex)
{
CVF_TIGHT_ASSERT(globalActiveCellIndex < m_activeInMatrixModel.size());
CVF_TIGHT_ASSERT(globalActiveCellIndex < m_cellIndexToResultIndex.size());
m_activeInMatrixModel[globalCellIndex] = globalActiveCellIndex;
m_cellIndexToResultIndex[globalCellIndex] = globalActiveCellIndex;
}
//--------------------------------------------------------------------------------------------------
@@ -89,11 +89,11 @@ void RigActiveCellInfo::setGridCount(size_t gridCount)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setGridActiveCellCounts(size_t gridIndex, size_t matrixActiveCellCount)
void RigActiveCellInfo::setGridActiveCellCounts(size_t gridIndex, size_t activeCellCount)
{
CVF_ASSERT(gridIndex < m_perGridActiveCellInfo.size());
m_perGridActiveCellInfo[gridIndex].setMatrixModelActiveCellCount(matrixActiveCellCount);
m_perGridActiveCellInfo[gridIndex].setActiveCellCount(activeCellCount);
}
//--------------------------------------------------------------------------------------------------
@@ -101,26 +101,26 @@ void RigActiveCellInfo::setGridActiveCellCounts(size_t gridIndex, size_t matrixA
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::computeDerivedData()
{
m_globalMatrixModelActiveCellCount = 0;
m_globalActiveCellCount = 0;
for (size_t i = 0; i < m_perGridActiveCellInfo.size(); i++)
{
m_globalMatrixModelActiveCellCount += m_perGridActiveCellInfo[i].matrixModelActiveCellCount();
m_globalActiveCellCount += m_perGridActiveCellInfo[i].activeCellCount();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::globalMatrixModelActiveCellCount() const
size_t RigActiveCellInfo::globalActiveCellCount() const
{
return m_globalMatrixModelActiveCellCount;
return m_globalActiveCellCount;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setMatrixModelActiveCellsBoundingBox(const cvf::Vec3st& min, const cvf::Vec3st& max)
void RigActiveCellInfo::setIJKBoundingBox(const cvf::Vec3st& min, const cvf::Vec3st& max)
{
m_activeCellPositionMin = min;
m_activeCellPositionMax = max;
@@ -129,7 +129,7 @@ void RigActiveCellInfo::setMatrixModelActiveCellsBoundingBox(const cvf::Vec3st&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::matrixModelActiveCellsBoundingBox(cvf::Vec3st& min, cvf::Vec3st& max) const
void RigActiveCellInfo::IJKBoundingBox(cvf::Vec3st& min, cvf::Vec3st& max) const
{
min = m_activeCellPositionMin;
max = m_activeCellPositionMax;
@@ -138,24 +138,24 @@ void RigActiveCellInfo::matrixModelActiveCellsBoundingBox(cvf::Vec3st& min, cvf:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::gridActiveCellCounts(size_t gridIndex, size_t& matrixActiveCellCount)
void RigActiveCellInfo::gridActiveCellCounts(size_t gridIndex, size_t& activeCellCount)
{
matrixActiveCellCount = m_perGridActiveCellInfo[gridIndex].matrixModelActiveCellCount();
activeCellCount = m_perGridActiveCellInfo[gridIndex].activeCellCount();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::BoundingBox RigActiveCellInfo::matrixActiveCellsGeometryBoundingBox() const
cvf::BoundingBox RigActiveCellInfo::geometryBoundingBox() const
{
return m_matrixActiveCellsBoundingBox;
return m_activeCellsBoundingBox;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setMatrixActiveCellsGeometryBoundingBox(cvf::BoundingBox bb)
void RigActiveCellInfo::setGeometryBoundingBox(cvf::BoundingBox bb)
{
m_matrixActiveCellsBoundingBox = bb;
m_activeCellsBoundingBox = bb;
}
//--------------------------------------------------------------------------------------------------
@@ -164,25 +164,25 @@ void RigActiveCellInfo::setMatrixActiveCellsGeometryBoundingBox(cvf::BoundingBox
void RigActiveCellInfo::clear()
{
m_perGridActiveCellInfo.clear();
m_activeInMatrixModel.clear();
m_globalMatrixModelActiveCellCount = 0;
m_cellIndexToResultIndex.clear();
m_globalActiveCellCount = 0;
m_activeCellPositionMin = cvf::Vec3st(0,0,0);
m_activeCellPositionMax = cvf::Vec3st(0,0,0);
m_matrixActiveCellsBoundingBox.reset();
m_activeCellsBoundingBox.reset();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::GridActiveCellCounts::matrixModelActiveCellCount() const
size_t RigActiveCellInfo::GridActiveCellCounts::activeCellCount() const
{
return m_matrixModelActiveCellCount;
return m_activeCellCount;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::GridActiveCellCounts::setMatrixModelActiveCellCount(size_t activeMatrixModelCellCount)
void RigActiveCellInfo::GridActiveCellCounts::setActiveCellCount(size_t activeCellCount)
{
m_matrixModelActiveCellCount = activeMatrixModelCellCount;
m_activeCellCount = activeCellCount;
}

View File

@@ -34,22 +34,22 @@ public:
void setGlobalCellCount(size_t globalCellCount);
bool isActiveInMatrixModel(size_t globalCellIndex) const;
size_t activeIndexInMatrixModel(size_t globalCellIndex) const;
void setActiveIndexInMatrixModel(size_t globalCellIndex, size_t globalActiveCellIndex);
bool isActive(size_t globalCellIndex) const;
size_t cellResultIndex(size_t globalCellIndex) const;
void setCellResultIndex(size_t globalCellIndex, size_t globalActiveCellIndex);
void setGridCount(size_t gridCount);
void setGridActiveCellCounts(size_t gridIndex, size_t matrixActiveCellCount);
void gridActiveCellCounts(size_t gridIndex, size_t& matrixActiveCellCount);
void setGridActiveCellCounts(size_t gridIndex, size_t activeCellCount);
void gridActiveCellCounts(size_t gridIndex, size_t& activeCellCount);
void computeDerivedData();
size_t globalMatrixModelActiveCellCount() const;
size_t globalActiveCellCount() const;
void setMatrixModelActiveCellsBoundingBox(const cvf::Vec3st& min, const cvf::Vec3st& max);
void matrixModelActiveCellsBoundingBox(cvf::Vec3st& min, cvf::Vec3st& max) const;
void setIJKBoundingBox(const cvf::Vec3st& min, const cvf::Vec3st& max);
void IJKBoundingBox(cvf::Vec3st& min, cvf::Vec3st& max) const;
cvf::BoundingBox matrixActiveCellsGeometryBoundingBox() const;
void setMatrixActiveCellsGeometryBoundingBox(cvf::BoundingBox bb);
cvf::BoundingBox geometryBoundingBox() const;
void setGeometryBoundingBox(cvf::BoundingBox bb);
void clear();
@@ -57,23 +57,23 @@ private:
class GridActiveCellCounts
{
public:
size_t matrixModelActiveCellCount() const;
void setMatrixModelActiveCellCount(size_t activeMatrixModelCellCount);
size_t activeCellCount() const;
void setActiveCellCount(size_t activeCellCount);
private:
size_t m_matrixModelActiveCellCount;
size_t m_activeCellCount;
};
private:
std::vector<GridActiveCellCounts> m_perGridActiveCellInfo;
std::vector<size_t> m_activeInMatrixModel;
std::vector<size_t> m_cellIndexToResultIndex;
size_t m_globalMatrixModelActiveCellCount;
size_t m_globalActiveCellCount;
cvf::Vec3st m_activeCellPositionMin;
cvf::Vec3st m_activeCellPositionMax;
cvf::BoundingBox m_matrixActiveCellsBoundingBox;
cvf::BoundingBox m_activeCellsBoundingBox;
};

View File

@@ -288,19 +288,19 @@ void RigEclipseCase::computeActiveCellIJKBBox()
size_t i, j, k;
m_mainGrid->ijkFromCellIndex(idx, &i, &j, &k);
if (m_activeCellInfo->isActiveInMatrixModel(idx))
if (m_activeCellInfo->isActive(idx))
{
matrixModelActiveBB.add(i, j, k);
}
if (m_fractureActiveCellInfo->isActiveInMatrixModel(idx))
if (m_fractureActiveCellInfo->isActive(idx))
{
fractureModelActiveBB.add(i, j, k);
}
}
m_activeCellInfo->setMatrixModelActiveCellsBoundingBox(matrixModelActiveBB.m_min, matrixModelActiveBB.m_max);
m_fractureActiveCellInfo->setMatrixModelActiveCellsBoundingBox(fractureModelActiveBB.m_min, fractureModelActiveBB.m_max);
m_activeCellInfo->setIJKBoundingBox(matrixModelActiveBB.m_min, matrixModelActiveBB.m_max);
m_fractureActiveCellInfo->setIJKBoundingBox(fractureModelActiveBB.m_min, fractureModelActiveBB.m_max);
}
//--------------------------------------------------------------------------------------------------
@@ -362,8 +362,8 @@ void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
if (m_mainGrid.isNull())
{
cvf::BoundingBox bb;
m_activeCellInfo->setMatrixActiveCellsGeometryBoundingBox(bb);
m_fractureActiveCellInfo->setMatrixActiveCellsGeometryBoundingBox(bb);
m_activeCellInfo->setGeometryBoundingBox(bb);
m_fractureActiveCellInfo->setGeometryBoundingBox(bb);
return;
}
@@ -383,7 +383,7 @@ void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
{
for (size_t i = 0; i < m_mainGrid->cellCount(); i++)
{
if (activeInfos[acIdx]->isActiveInMatrixModel(i))
if (activeInfos[acIdx]->isActive(i))
{
const RigCell& c = m_mainGrid->cells()[i];
const caf::SizeTArray8& indices = c.cornerIndices();
@@ -397,7 +397,7 @@ void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
}
}
activeInfos[acIdx]->setMatrixActiveCellsGeometryBoundingBox(bb);
activeInfos[acIdx]->setGeometryBoundingBox(bb);
}
m_mainGrid->setDisplayModelOffset(bb.min());

View File

@@ -102,7 +102,7 @@ public:
if (m_reservoirResultValues->size() == 0 ) return HUGE_VAL;
size_t globalGridCellIndex = m_grid->globalGridCellIndex(gridLocalCellIndex);
size_t resultValueIndex = m_activeCellInfo->activeIndexInMatrixModel(globalGridCellIndex);
size_t resultValueIndex = m_activeCellInfo->cellResultIndex(globalGridCellIndex);
if (resultValueIndex == cvf::UNDEFINED_SIZE_T) return HUGE_VAL;
CVF_TIGHT_ASSERT(resultValueIndex < m_reservoirResultValues->size());
@@ -116,7 +116,7 @@ public:
virtual void setCellScalar(size_t gridLocalCellIndex, double scalarValue)
{
size_t globalGridCellIndex = m_grid->globalGridCellIndex(gridLocalCellIndex);
size_t resultValueIndex = m_activeCellInfo->activeIndexInMatrixModel(globalGridCellIndex);
size_t resultValueIndex = m_activeCellInfo->cellResultIndex(globalGridCellIndex);
CVF_TIGHT_ASSERT(resultValueIndex < m_reservoirResultValues->size());

View File

@@ -252,7 +252,7 @@ void RigReservoirBuilderMock::populateReservoir(RigEclipseCase* eclipseCase)
activeCellInfo->setGlobalCellCount(eclipseCase->mainGrid()->cells().size());
for (size_t i = 0; i < eclipseCase->mainGrid()->cells().size(); i++)
{
activeCellInfo->setActiveIndexInMatrixModel(i, i);
activeCellInfo->setCellResultIndex(i, i);
}
}

View File

@@ -446,7 +446,7 @@ void RiaSocketServer::readPropertyDataFromOctave()
size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double);
size_t gridActiveCellCount = m_currentReservoir->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalMatrixModelActiveCellCount();
size_t gridActiveCellCount = m_currentReservoir->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount();
size_t gridTotalCellCount = m_currentReservoir->reservoirData()->mainGrid()->cellCount();
if (cellCountFromOctave != gridActiveCellCount && cellCountFromOctave != gridTotalCellCount)
@@ -635,7 +635,7 @@ void RiaSocketServer::calculateMatrixModelActiveCellInfo(std::vector<qint32>& gr
}
RigActiveCellInfo* actCellInfo = m_currentReservoir->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS);
size_t numMatrixModelActiveCells = actCellInfo->globalMatrixModelActiveCellCount();
size_t numMatrixModelActiveCells = actCellInfo->globalActiveCellCount();
gridNumber.reserve(numMatrixModelActiveCells);
cellI.reserve(numMatrixModelActiveCells);
@@ -650,7 +650,7 @@ void RiaSocketServer::calculateMatrixModelActiveCellInfo(std::vector<qint32>& gr
for (size_t cIdx = 0; cIdx < globalCells.size(); ++cIdx)
{
if (actCellInfo->isActiveInMatrixModel(cIdx))
if (actCellInfo->isActive(cIdx))
{
RigGridBase* grid = globalCells[cIdx].hostGrid();
CVF_ASSERT(grid != NULL);

View File

@@ -1271,6 +1271,7 @@ void RIMainWindow::slotOpenMultipleCases()
{
RIApplication* app = RIApplication::instance();
/*
RiuMultiCaseImportDialog dialog;
int action = dialog.exec();
if (action == QDialog::Accepted)
@@ -1278,4 +1279,26 @@ void RIMainWindow::slotOpenMultipleCases()
QStringList gridFileNames = dialog.eclipseCaseFileNames();
app->addEclipseCases(gridFileNames);
}
*/
QStringList gridFileNames;
if (1)
{
gridFileNames += "Result Mock Debug Model With Results";
gridFileNames += "Result Mock Debug Model With Results";
gridFileNames += "Result Mock Debug Model With Results";
}
else
{
gridFileNames += "d:/Models/Statoil/MultipleRealisations/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID";
gridFileNames += "d:/Models/Statoil/MultipleRealisations/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID";
gridFileNames += "d:/Models/Statoil/MultipleRealisations/Case_with_10_timesteps/Real30/BRUGGE_0030.EGRID";
gridFileNames += "d:/Models/Statoil/MultipleRealisations/Case_with_10_timesteps/Real40/BRUGGE_0040.EGRID";
}
app->addEclipseCases(gridFileNames);
}