#1035 Removed obsolete code, and used the createFromResultDefinition method in CellEdge and property filter

This commit is contained in:
Jacob Støren 2016-12-15 07:47:54 +01:00
parent ec5ad417f3
commit fd604f844b
2 changed files with 2 additions and 18 deletions

View File

@ -332,14 +332,7 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAcce
if (cellResultColors->hasResult())
{
if (!cellResultColors->hasDynamicResult())
{
// Static result values are located at time step 0
timeStepIndex = 0;
}
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
resultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, grid->gridIndex(), porosityModel, timeStepIndex, cellResultColors->resultVariable());
resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, cellResultColors);
}
if (resultAccessor.isNull())

View File

@ -789,16 +789,7 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
RigCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
size_t adjustedTimeStepIndex = timeStepIndex;
// Set time step to zero for static results
if (propertyFilter->resultDefinition()->hasStaticResult())
{
adjustedTimeStepIndex = 0;
}
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(propertyFilter->resultDefinition()->porosityModel());
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStepIndex, propertyFilter->resultDefinition->resultVariable(), propertyFilter->resultDefinition->resultType());
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, propertyFilter->resultDefinition);
CVF_ASSERT(resultAccessor.notNull());