Moved functionality from main grid to active cell info

p4#: 20457
This commit is contained in:
Magne Sjaastad 2013-02-12 11:50:23 +01:00
parent 996f2fc7eb
commit 6101209d40
3 changed files with 3 additions and 14 deletions

View File

@ -89,7 +89,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
{
caseName = m_reservoirView->eclipseCase()->caseName();
totCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cells().size());
activeCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->globalMatrixModelActiveCellCount());
activeCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo()->globalMatrixModelActiveCellCount());
iSize = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cellCountI());
jSize = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cellCountJ());
kSize = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cellCountK());

View File

@ -512,18 +512,11 @@ void RigReservoirCellResults::computeDepthRelatedResults()
std::vector< std::vector<double> >& tops = cellScalarResults(topsResultGridIndex);
std::vector< std::vector<double> >& bottom = cellScalarResults(bottomResultGridIndex);
bool computeValuesForActiveCellsOnly = m_ownerMainGrid->globalMatrixModelActiveCellCount() > 0;
size_t cellIdx = 0;
for (cellIdx = 0; cellIdx < m_ownerMainGrid->cells().size(); cellIdx++)
{
const RigCell& cell = m_ownerMainGrid->cells()[cellIdx];
if (computeValuesForActiveCellsOnly && !cell.isActiveInMatrixModel())
{
continue;
}
if (computeDepth)
{
depth[0][cellIdx] = cvf::Math::abs(cell.center().z());
@ -653,13 +646,9 @@ bool RigReservoirCellResults::isUsingGlobalActiveIndex(size_t scalarResultIndex)
if (!m_cellScalarResults[scalarResultIndex].size()) return true;
size_t firstTimeStepResultValueCount = m_cellScalarResults[scalarResultIndex][0].size();
if (firstTimeStepResultValueCount == m_ownerMainGrid->globalMatrixModelActiveCellCount()) return true;
if (firstTimeStepResultValueCount == m_ownerMainGrid->globalFractureModelActiveCellCount()) return true;
if (firstTimeStepResultValueCount == m_ownerMainGrid->cells().size()) return false;
CVF_TIGHT_ASSERT(false); // Wrong number of results
return false;
return true;
}
//--------------------------------------------------------------------------------------------------

View File

@ -441,7 +441,7 @@ void RiaSocketServer::readPropertyDataFromOctave()
size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double);
size_t gridActiveCellCount = m_currentReservoir->reservoirData()->mainGrid()->globalMatrixModelActiveCellCount();
size_t gridActiveCellCount = m_currentReservoir->reservoirData()->activeCellInfo()->globalMatrixModelActiveCellCount();
size_t gridTotalCellCount = m_currentReservoir->reservoirData()->mainGrid()->cellCount();
if (cellCountFromOctave != gridActiveCellCount && cellCountFromOctave != gridTotalCellCount)