Moved result value vectors from MainGrid to Reservoir

p4#: 20499
This commit is contained in:
Magne Sjaastad
2013-02-13 13:10:54 +01:00
parent f14c03f172
commit b1cb8a6716
22 changed files with 143 additions and 127 deletions
@@ -96,8 +96,8 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
const RigGridBase* grid = dynamic_cast<const RigGridBase*>(generator->activeGrid());
CVF_ASSERT(grid != NULL);
RigActiveCellInfo* activeCellInfo = cellResultSlot->reservoirView()->eclipseCase()->reservoirData()->activeCellInfo();
CVF_ASSERT(activeCellInfo != NULL);
RigReservoir* reservoir = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
CVF_ASSERT(reservoir != NULL);
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = NULL;
if (cellResultSlot->hasResult())
@@ -109,7 +109,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
}
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
cellCenterDataAccessObject = grid->dataAccessObject(activeCellInfo, porosityModel, timeStepIndex, cellResultSlot->gridScalarIndex());
cellCenterDataAccessObject = reservoir->dataAccessObject(grid, porosityModel, timeStepIndex, cellResultSlot->gridScalarIndex());
}
CVF_ASSERT(cellEdgeResultSlot->hasResult());
@@ -128,7 +128,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
{
// Assuming static values to be mapped onto cell edge, always using time step zero
// TODO: Now hardcoded matrix results, should it be possible to use fracture results?
daObj = grid->dataAccessObject(activeCellInfo, RifReaderInterface::MATRIX_RESULTS, 0, resultIndices[cubeFaceIdx]);
daObj = reservoir->dataAccessObject(grid, RifReaderInterface::MATRIX_RESULTS, 0, resultIndices[cubeFaceIdx]);
}
cellEdgeDataAccessObjects.push_back(daObj.p());
@@ -223,8 +223,8 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
RigActiveCellInfo* activeCellInfo = cellResultSlot->reservoirView()->eclipseCase()->reservoirData()->activeCellInfo();
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = m_grid->dataAccessObject(activeCellInfo, porosityModel, resTimeStepIdx, scalarSetIndex);
RigReservoir* reservoir = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(m_grid.p(), porosityModel, resTimeStepIdx, scalarSetIndex);
if (dataAccessObject.isNull()) return;
@@ -605,9 +605,9 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
const RimCellFilter::FilterModeType filterType = (*pfIt)->filterMode();
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel((*pfIt)->resultDefinition()->porosityModel());
RigActiveCellInfo* activeCellInfo = propFilterColl->reservoirView()->eclipseCase()->reservoirData()->activeCellInfo();
RigReservoir* reservoir = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = grid->dataAccessObject(activeCellInfo, porosityModel, timeStepIndex, scalarResultIndex);
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(grid, porosityModel, timeStepIndex, scalarResultIndex);
CVF_ASSERT(dataAccessObject.notNull());
#pragma omp parallel for schedule(dynamic)