Renamed variables according to newly renamed class names

"Result slot" -> "Result colors"
This commit is contained in:
Pål Hagen 2015-06-25 14:34:20 +02:00
parent fa75a46ecb
commit 7315dd5318
31 changed files with 244 additions and 244 deletions

View File

@ -214,11 +214,11 @@ void RivFemPartPartMgr::updateCellColor(cvf::Color4f color)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultSlot) void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultColors)
{ {
CVF_ASSERT(cellResultSlot); CVF_ASSERT(cellResultColors);
// RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); // RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::Color3ubArray> surfaceFacesColorArray; cvf::ref<cvf::Color3ubArray> surfaceFacesColorArray;
@ -226,24 +226,24 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
if (m_surfaceFaces.notNull()) if (m_surfaceFaces.notNull())
{ {
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
RigGeoMechCaseData* caseData = cellResultSlot->ownerCaseData(); RigGeoMechCaseData* caseData = cellResultColors->ownerCaseData();
if (!caseData) return; if (!caseData) return;
RigFemResultAddress resVarAddress = cellResultSlot->resultAddress(); RigFemResultAddress resVarAddress = cellResultColors->resultAddress();
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, m_gridIdx, (int)timeStepIndex); const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, m_gridIdx, (int)timeStepIndex);
const std::vector<size_t>* vxToResultMapping = NULL; const std::vector<size_t>* vxToResultMapping = NULL;
if (cellResultSlot->resultPositionType() == RIG_NODAL) if (cellResultColors->resultPositionType() == RIG_NODAL)
{ {
vxToResultMapping = &(m_surfaceGenerator.quadVerticesToNodeIdxMapping()); vxToResultMapping = &(m_surfaceGenerator.quadVerticesToNodeIdxMapping());
} }
else if ( cellResultSlot->resultPositionType() == RIG_ELEMENT_NODAL else if ( cellResultColors->resultPositionType() == RIG_ELEMENT_NODAL
|| cellResultSlot->resultPositionType() == RIG_INTEGRATION_POINT) || cellResultColors->resultPositionType() == RIG_INTEGRATION_POINT)
{ {
vxToResultMapping = &(m_surfaceGenerator.quadVerticesToGlobalElmNodeIdx()); vxToResultMapping = &(m_surfaceGenerator.quadVerticesToGlobalElmNodeIdx());
} }
@ -276,7 +276,7 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
} }
} }
RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultSlot->reservoirView()->isLightingDisabled()); RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled());
} }
} }

View File

@ -54,7 +54,7 @@ public:
cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility;} cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility;}
void updateCellColor(cvf::Color4f color); void updateCellColor(cvf::Color4f color);
void updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultSlot); void updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultColors);
void appendPartsToModel(cvf::ModelBasicList* model); void appendPartsToModel(cvf::ModelBasicList* model);

View File

@ -106,11 +106,11 @@ void RivGeoMechPartMgr::updateCellColor(cvf::Color4f color)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivGeoMechPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultSlot) void RivGeoMechPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultColors)
{ {
for (size_t i = 0; i < m_femPartPartMgrs.size() ; ++i) for (size_t i = 0; i < m_femPartPartMgrs.size() ; ++i)
{ {
m_femPartPartMgrs[i]->updateCellResultColor(timeStepIndex, cellResultSlot); m_femPartPartMgrs[i]->updateCellResultColor(timeStepIndex, cellResultColors);
} }
} }

View File

@ -56,7 +56,7 @@ public:
cellVisibility(size_t partIndex); cellVisibility(size_t partIndex);
void updateCellColor(cvf::Color4f color); void updateCellColor(cvf::Color4f color);
void updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultSlot); void updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultColors);
void appendGridPartsToModel(cvf::ModelBasicList* model, const std::vector<size_t>& partIndices); void appendGridPartsToModel(cvf::ModelBasicList* model, const std::vector<size_t>& partIndices);
void appendGridPartsToModel(cvf::ModelBasicList* model); void appendGridPartsToModel(cvf::ModelBasicList* model);

View File

@ -80,13 +80,13 @@ void RivGeoMechVizLogic::appendPartsToModel(int timeStepIndex, cvf::ModelBasicLi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivGeoMechVizLogic::updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultSlot) void RivGeoMechVizLogic::updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors)
{ {
std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs = keysToVisiblePartMgrs(timeStepIndex); std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs = keysToVisiblePartMgrs(timeStepIndex);
for (size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx) for (size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx)
{ {
RivGeoMechPartMgr* partMgr = m_partMgrCache->partMgr(visiblePartMgrs[pmIdx]); RivGeoMechPartMgr* partMgr = m_partMgrCache->partMgr(visiblePartMgrs[pmIdx]);
partMgr->updateCellResultColor(timeStepIndex, cellResultSlot); partMgr->updateCellResultColor(timeStepIndex, cellResultColors);
} }
} }

View File

@ -44,7 +44,7 @@ public:
void appendNoAnimPartsToModel(cvf::ModelBasicList* model); void appendNoAnimPartsToModel(cvf::ModelBasicList* model);
void appendPartsToModel(int timeStepIndex, cvf::ModelBasicList* model); void appendPartsToModel(int timeStepIndex, cvf::ModelBasicList* model);
void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultSlot); void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors);
void updateStaticCellColors(int timeStepIndex); void updateStaticCellColors(int timeStepIndex);
void scheduleGeometryRegen(RivCellSetEnum geometryType); void scheduleGeometryRegen(RivCellSetEnum geometryType);
private: private:

View File

@ -43,20 +43,20 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo( void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
size_t timeStepIndex, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
cvf::DrawableGeo* geo, cvf::DrawableGeo* geo,
size_t gridIndex, size_t gridIndex,
float opacityLevel) float opacityLevel)
{ {
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
CVF_ASSERT(eclipseCase != NULL); CVF_ASSERT(eclipseCase != NULL);
// Create result access objects // Create result access objects
cvf::ref<RigResultAccessor> cellCenterDataAccessObject = createCellCenterResultAccessor(cellResultSlot, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); cvf::ref<RigResultAccessor> cellCenterDataAccessObject = createCellCenterResultAccessor(cellResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultSlot, cellEdgeResultSlot, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
size_t vertexCount = geo->vertexArray()->size(); size_t vertexCount = geo->vertexArray()->size();
size_t quadCount = vertexCount / 4; size_t quadCount = vertexCount / 4;
@ -80,17 +80,17 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
cellEdgeColorTextureCoordsArrays.push_back(colorArray.p()); cellEdgeColorTextureCoordsArrays.push_back(colorArray.p());
} }
cvf::ScalarMapper* cellResultScalarMapper = cellResultSlot->legendConfig()->scalarMapper(); cvf::ScalarMapper* cellResultScalarMapper = cellResultColors->legendConfig()->scalarMapper();
cvf::ScalarMapper* edgeResultScalarMapper = cellEdgeResultSlot->legendConfig()->scalarMapper(); cvf::ScalarMapper* edgeResultScalarMapper = cellEdgeResultColors->legendConfig()->scalarMapper();
double ignoredScalarValue = cellEdgeResultSlot->ignoredScalarValue(); double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue();
const std::vector<cvf::ubyte>* isWellPipeVisible = NULL; const std::vector<cvf::ubyte>* isWellPipeVisible = NULL;
cvf::ref<cvf::UIntArray> gridCellToWellindexMap; cvf::ref<cvf::UIntArray> gridCellToWellindexMap;
if (opacityLevel < 1.0f) if (opacityLevel < 1.0f)
{ {
isWellPipeVisible = &(cellResultSlot->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex)); isWellPipeVisible = &(cellResultColors->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex));
gridCellToWellindexMap = eclipseCase->gridCellToWellIndex(gridIndex); gridCellToWellindexMap = eclipseCase->gridCellToWellIndex(gridIndex);
} }
@ -187,14 +187,14 @@ bool RivCellEdgeGeometryUtils::hideScalarValue(double scalarValue, double scalar
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot, void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors,
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel) cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
{ {
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
CVF_ASSERT(eclipseCase != NULL); CVF_ASSERT(eclipseCase != NULL);
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultSlot, cellEdgeResultSlot, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
size_t vertexCount = geo->vertexArray()->size(); size_t vertexCount = geo->vertexArray()->size();
size_t quadCount = vertexCount / 4; size_t quadCount = vertexCount / 4;
@ -218,12 +218,12 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
cellEdgeColorTextureCoordsArrays.push_back(colorArray.p()); cellEdgeColorTextureCoordsArrays.push_back(colorArray.p());
} }
RivTernaryScalarMapper* ternaryCellResultScalarMapper = cellResultSlot->ternaryLegendConfig()->scalarMapper(); RivTernaryScalarMapper* ternaryCellResultScalarMapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
cvf::ScalarMapper* edgeResultScalarMapper = cellEdgeResultSlot->legendConfig()->scalarMapper(); cvf::ScalarMapper* edgeResultScalarMapper = cellEdgeResultColors->legendConfig()->scalarMapper();
double ignoredScalarValue = cellEdgeResultSlot->ignoredScalarValue(); double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue();
RivTernaryTextureCoordsCreator texturer(cellResultSlot, cellResultSlot->ternaryLegendConfig(), RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(),
timeStepIndex, timeStepIndex,
gridIndex, gridIndex,
quadToCellFaceMapper); quadToCellFaceMapper);
@ -285,8 +285,8 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeCenterResultAccessor( cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeCenterResultAccessor(
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
size_t timeStepIndex, size_t timeStepIndex,
RigCaseData* eclipseCase, RigCaseData* eclipseCase,
const RigGridBase* grid) const RigGridBase* grid)
@ -294,8 +294,8 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeCenterResult
cvf::ref<RigCellEdgeResultAccessor> cellEdgeResultAccessor = new RigCellEdgeResultAccessor(); cvf::ref<RigCellEdgeResultAccessor> cellEdgeResultAccessor = new RigCellEdgeResultAccessor();
{ {
size_t resultIndices[6]; size_t resultIndices[6];
cellEdgeResultSlot->gridScalarIndices(resultIndices); cellEdgeResultColors->gridScalarIndices(resultIndices);
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
size_t cubeFaceIdx; size_t cubeFaceIdx;
for (cubeFaceIdx = 0; cubeFaceIdx < 6; cubeFaceIdx++) for (cubeFaceIdx = 0; cubeFaceIdx < 6; cubeFaceIdx++)
@ -312,20 +312,20 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeCenterResult
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultSlot, size_t timeStepIndex, RigCaseData* eclipseCase, const RigGridBase* grid) cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigCaseData* eclipseCase, const RigGridBase* grid)
{ {
cvf::ref<RigResultAccessor> resultAccessor = NULL; cvf::ref<RigResultAccessor> resultAccessor = NULL;
if (cellResultSlot->hasResult()) if (cellResultColors->hasResult())
{ {
if (!cellResultSlot->hasDynamicResult()) if (!cellResultColors->hasDynamicResult())
{ {
// Static result values are located at time step 0 // Static result values are located at time step 0
timeStepIndex = 0; timeStepIndex = 0;
} }
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, timeStepIndex, cellResultSlot->resultVariable()); resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, timeStepIndex, cellResultColors->resultVariable());
} }
if (resultAccessor.isNull()) if (resultAccessor.isNull())

View File

@ -39,16 +39,16 @@ class RivCellEdgeGeometryUtils
{ {
public: public:
static void addCellEdgeResultsToDrawableGeo(size_t timeStepIndex, static void addCellEdgeResultsToDrawableGeo(size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
cvf::DrawableGeo* geo, cvf::DrawableGeo* geo,
size_t gridIndex, size_t gridIndex,
float opacityLevel); float opacityLevel);
static void addTernaryCellEdgeResultsToDrawableGeo(size_t timeStepIndex, static void addTernaryCellEdgeResultsToDrawableGeo(size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
cvf::DrawableGeo* geo, cvf::DrawableGeo* geo,
size_t gridIndex, size_t gridIndex,
@ -57,14 +57,14 @@ public:
private: private:
static cvf::ref<RigResultAccessor> createCellCenterResultAccessor( static cvf::ref<RigResultAccessor> createCellCenterResultAccessor(
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
size_t timeStepIndex, size_t timeStepIndex,
RigCaseData* eclipseCase, RigCaseData* eclipseCase,
const RigGridBase* grid); const RigGridBase* grid);
static cvf::ref<RigResultAccessor> createCellEdgeCenterResultAccessor( static cvf::ref<RigResultAccessor> createCellEdgeCenterResultAccessor(
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
size_t timeStepIndex, size_t timeStepIndex,
RigCaseData* eclipseCase, RigCaseData* eclipseCase,
const RigGridBase* grid); const RigGridBase* grid);

View File

@ -94,40 +94,40 @@ void RivFaultPartMgr::applySingleColorEffect()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
CVF_ASSERT(cellResultSlot); CVF_ASSERT(cellResultColors);
updateNNCColors(cellResultSlot); updateNNCColors(cellResultColors);
size_t scalarSetIndex = cellResultSlot->scalarResultIndex(); size_t scalarSetIndex = cellResultColors->scalarResultIndex();
// If the result is static, only read that. // If the result is static, only read that.
size_t resTimeStepIdx = timeStepIndex; size_t resTimeStepIdx = timeStepIndex;
if (cellResultSlot->hasStaticResult()) resTimeStepIdx = 0; if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
RimEclipseView* eclipseView = cellResultSlot->reservoirView(); RimEclipseView* eclipseView = cellResultColors->reservoirView();
RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
// Faults // Faults
if (m_nativeFaultFaces.notNull()) if (m_nativeFaultFaces.notNull())
{ {
if (cellResultSlot->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivTernaryTextureCoordsCreator texturer(cellResultSlot, cellResultSlot->ternaryLegendConfig(), RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(),
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_nativeFaultGenerator->quadToCellFaceMapper()); m_nativeFaultGenerator->quadToCellFaceMapper());
texturer.createTextureCoords(m_nativeFaultFacesTextureCoords.p()); texturer.createTextureCoords(m_nativeFaultFacesTextureCoords.p());
const RivTernaryScalarMapper* mapper = cellResultSlot->ternaryLegendConfig()->scalarMapper(); const RivTernaryScalarMapper* mapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_nativeFaultFaces.p(), m_nativeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled()); RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_nativeFaultFaces.p(), m_nativeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled());
} }
else else
{ {
RivTextureCoordsCreator texturer(cellResultSlot, RivTextureCoordsCreator texturer(cellResultColors,
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_nativeFaultGenerator->quadToCellFaceMapper()); m_nativeFaultGenerator->quadToCellFaceMapper());
@ -139,28 +139,28 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
texturer.createTextureCoords(m_nativeFaultFacesTextureCoords.p()); texturer.createTextureCoords(m_nativeFaultFacesTextureCoords.p());
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
RivScalarMapperUtils::applyTextureResultsToPart(m_nativeFaultFaces.p(), m_nativeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled()); RivScalarMapperUtils::applyTextureResultsToPart(m_nativeFaultFaces.p(), m_nativeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled());
} }
} }
if (m_oppositeFaultFaces.notNull()) if (m_oppositeFaultFaces.notNull())
{ {
if (cellResultSlot->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivTernaryTextureCoordsCreator texturer(cellResultSlot, cellResultSlot->ternaryLegendConfig(), RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(),
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_oppositeFaultGenerator->quadToCellFaceMapper()); m_oppositeFaultGenerator->quadToCellFaceMapper());
texturer.createTextureCoords(m_oppositeFaultFacesTextureCoords.p()); texturer.createTextureCoords(m_oppositeFaultFacesTextureCoords.p());
const RivTernaryScalarMapper* mapper = cellResultSlot->ternaryLegendConfig()->scalarMapper(); const RivTernaryScalarMapper* mapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_oppositeFaultFaces.p(), m_oppositeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled()); RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_oppositeFaultFaces.p(), m_oppositeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled());
} }
else else
{ {
RivTextureCoordsCreator texturer(cellResultSlot, RivTextureCoordsCreator texturer(cellResultColors,
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_oppositeFaultGenerator->quadToCellFaceMapper()); m_oppositeFaultGenerator->quadToCellFaceMapper());
@ -172,7 +172,7 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
texturer.createTextureCoords(m_oppositeFaultFacesTextureCoords.p()); texturer.createTextureCoords(m_oppositeFaultFacesTextureCoords.p());
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
RivScalarMapperUtils::applyTextureResultsToPart(m_oppositeFaultFaces.p(), m_oppositeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled()); RivScalarMapperUtils::applyTextureResultsToPart(m_oppositeFaultFaces.p(), m_oppositeFaultFacesTextureCoords.p(), mapper, m_opacityLevel, this->faceCullingMode(), eclipseView->isLightingDisabled());
} }
} }
@ -181,9 +181,9 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
updateNNCColors(cellResultSlot); updateNNCColors(cellResultColors);
if (m_nativeFaultFaces.notNull()) if (m_nativeFaultFaces.notNull())
{ {
@ -192,7 +192,7 @@ void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipse
{ {
cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_nativeFaultGenerator->quadToCellFaceMapper(), cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_nativeFaultGenerator->quadToCellFaceMapper(),
m_grid->gridIndex(), m_grid->gridIndex(),
timeStepIndex, cellResultSlot, cellEdgeResultSlot, m_opacityLevel, m_defaultColor, this->faceCullingMode(), cellResultSlot->reservoirView()->isLightingDisabled()); timeStepIndex, cellResultColors, cellEdgeResultColors, m_opacityLevel, m_defaultColor, this->faceCullingMode(), cellResultColors->reservoirView()->isLightingDisabled());
m_nativeFaultFaces->setEffect(eff.p()); m_nativeFaultFaces->setEffect(eff.p());
} }
@ -204,7 +204,7 @@ void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipse
if (dg) if (dg)
{ {
cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_oppositeFaultGenerator->quadToCellFaceMapper(), m_grid->gridIndex(), cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_oppositeFaultGenerator->quadToCellFaceMapper(), m_grid->gridIndex(),
timeStepIndex, cellResultSlot, cellEdgeResultSlot, m_opacityLevel, m_defaultColor, this->faceCullingMode(), cellResultSlot->reservoirView()->isLightingDisabled()); timeStepIndex, cellResultColors, cellEdgeResultColors, m_opacityLevel, m_defaultColor, this->faceCullingMode(), cellResultColors->reservoirView()->isLightingDisabled());
m_oppositeFaultFaces->setEffect(eff.p()); m_oppositeFaultFaces->setEffect(eff.p());
} }
@ -643,15 +643,15 @@ caf::FaceCulling RivFaultPartMgr::faceCullingMode() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFaultPartMgr::updateNNCColors(RimEclipseCellColors* cellResultSlot) void RivFaultPartMgr::updateNNCColors(RimEclipseCellColors* cellResultColors)
{ {
if (m_NNCFaces.isNull()) return; if (m_NNCFaces.isNull()) return;
bool showNncsWithScalarMappedColor = false; bool showNncsWithScalarMappedColor = false;
if (cellResultSlot) if (cellResultColors)
{ {
size_t scalarSetIndex = cellResultSlot->scalarResultIndex(); size_t scalarSetIndex = cellResultColors->scalarResultIndex();
if (m_grid->mainGrid()->nncData()->hasScalarValues(scalarSetIndex)) if (m_grid->mainGrid()->nncData()->hasScalarValues(scalarSetIndex))
{ {
@ -661,9 +661,9 @@ void RivFaultPartMgr::updateNNCColors(RimEclipseCellColors* cellResultSlot)
if (showNncsWithScalarMappedColor) if (showNncsWithScalarMappedColor)
{ {
size_t scalarSetIndex = cellResultSlot->scalarResultIndex(); size_t scalarSetIndex = cellResultColors->scalarResultIndex();
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
m_NNCGenerator->textureCoordinates(m_NNCTextureCoords.p(), mapper, scalarSetIndex); m_NNCGenerator->textureCoordinates(m_NNCTextureCoords.p(), mapper, scalarSetIndex);

View File

@ -55,8 +55,8 @@ public:
void applySingleColorEffect(); void applySingleColorEffect();
void setOpacityLevel(float opacity) { m_opacityLevel = opacity; } void setOpacityLevel(float opacity) { m_opacityLevel = opacity; }
void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot); void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors);
void appendNativeFaultFacesToModel(cvf::ModelBasicList* model); void appendNativeFaultFacesToModel(cvf::ModelBasicList* model);
void appendOppositeFaultFacesToModel(cvf::ModelBasicList* model); void appendOppositeFaultFacesToModel(cvf::ModelBasicList* model);
@ -68,7 +68,7 @@ private:
void generatePartGeometry(); void generatePartGeometry();
void updatePartEffect(); void updatePartEffect();
void updateNNCColors(RimEclipseCellColors* cellResultSlot); void updateNNCColors(RimEclipseCellColors* cellResultColors);
caf::FaceCulling faceCullingMode() const; caf::FaceCulling faceCullingMode() const;

View File

@ -221,32 +221,32 @@ void RivGridPartMgr::updateCellColor(cvf::Color4f color)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
CVF_ASSERT(cellResultSlot); CVF_ASSERT(cellResultColors);
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::Color3ubArray> surfaceFacesColorArray; cvf::ref<cvf::Color3ubArray> surfaceFacesColorArray;
// Outer surface // Outer surface
if (m_surfaceFaces.notNull()) if (m_surfaceFaces.notNull())
{ {
if (cellResultSlot->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivTernaryTextureCoordsCreator texturer(cellResultSlot, cellResultSlot->ternaryLegendConfig(), RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(),
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_surfaceGenerator.quadToCellFaceMapper()); m_surfaceGenerator.quadToCellFaceMapper());
texturer.createTextureCoords(m_surfaceFacesTextureCoords.p()); texturer.createTextureCoords(m_surfaceFacesTextureCoords.p());
const RivTernaryScalarMapper* mapper = cellResultSlot->ternaryLegendConfig()->scalarMapper(); const RivTernaryScalarMapper* mapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultSlot->reservoirView()->isLightingDisabled()); RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled());
} }
else else
{ {
RivTextureCoordsCreator texturer(cellResultSlot, RivTextureCoordsCreator texturer(cellResultColors,
timeStepIndex, timeStepIndex,
m_grid->gridIndex(), m_grid->gridIndex(),
m_surfaceGenerator.quadToCellFaceMapper()); m_surfaceGenerator.quadToCellFaceMapper());
@ -257,8 +257,8 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC
texturer.createTextureCoords(m_surfaceFacesTextureCoords.p()); texturer.createTextureCoords(m_surfaceFacesTextureCoords.p());
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultSlot->reservoirView()->isLightingDisabled()); RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled());
} }
} }
} }
@ -266,7 +266,7 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivGridPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivGridPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
if (m_surfaceFaces.notNull()) if (m_surfaceFaces.notNull())
{ {
@ -274,7 +274,7 @@ void RivGridPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseC
if (dg) if (dg)
{ {
cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_surfaceGenerator.quadToCellFaceMapper(), m_grid->gridIndex(), cvf::ref<cvf::Effect> eff = RivScalarMapperUtils::createCellEdgeEffect(dg, m_surfaceGenerator.quadToCellFaceMapper(), m_grid->gridIndex(),
timeStepIndex, cellResultSlot, cellEdgeResultSlot, m_opacityLevel, m_defaultColor, caf::FC_NONE, cellResultSlot->reservoirView()->isLightingDisabled()); timeStepIndex, cellResultColors, cellEdgeResultColors, m_opacityLevel, m_defaultColor, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled());
m_surfaceFaces->setEffect(eff.p()); m_surfaceFaces->setEffect(eff.p());
} }

View File

@ -57,10 +57,10 @@ public:
cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility;} cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility;}
void updateCellColor(cvf::Color4f color); void updateCellColor(cvf::Color4f color);
void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
void appendPartsToModel(cvf::ModelBasicList* model); void appendPartsToModel(cvf::ModelBasicList* model);

View File

@ -142,8 +142,8 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
} }
// Parts that is not overridden by the grid settings // Parts that is not overridden by the grid settings
RimEclipseFaultColors* faultResultSlot = m_reservoirView->faultResultSettings(); RimEclipseFaultColors* faultResultColors = m_reservoirView->faultResultSettings();
RimEclipseCellColors* cellResultSlot = m_reservoirView->cellResult(); RimEclipseCellColors* cellResultColors = m_reservoirView->cellResult();
if (rimFault->showFault() && faultCollection->showFaultCollection()) if (rimFault->showFault() && faultCollection->showFaultCollection())
{ {
@ -153,13 +153,13 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
if (faultCollection->hideNncsWhenNoResultIsAvailable()) if (faultCollection->hideNncsWhenNoResultIsAvailable())
{ {
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
if (faultResultSlot->showCustomFaultResult()) if (faultResultColors->showCustomFaultResult())
{ {
scalarResultIndex = faultResultSlot->customFaultResult()->scalarResultIndex(); scalarResultIndex = faultResultColors->customFaultResult()->scalarResultIndex();
} }
else else
{ {
scalarResultIndex = cellResultSlot->scalarResultIndex(); scalarResultIndex = cellResultColors->scalarResultIndex();
} }
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid(); RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
@ -200,7 +200,7 @@ void RivReservoirFaultsPartMgr::applySingleColorEffect()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirFaultsPartMgr::updateColors(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivReservoirFaultsPartMgr::updateColors(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
if (!m_reservoirView) return; if (!m_reservoirView) return;
@ -211,9 +211,9 @@ void RivReservoirFaultsPartMgr::updateColors(size_t timeStepIndex, RimEclipseCel
{ {
RimFault* rimFault = faultCollection->faults[i]; RimFault* rimFault = faultCollection->faults[i];
if (cellResultSlot && (cellResultSlot->hasResult() || cellResultSlot->isTernarySaturationSelected()) ) if (cellResultColors && (cellResultColors->hasResult() || cellResultColors->isTernarySaturationSelected()) )
{ {
m_faultParts[i]->updateCellResultColor(timeStepIndex, cellResultSlot); m_faultParts[i]->updateCellResultColor(timeStepIndex, cellResultColors);
} }
else else
{ {
@ -225,11 +225,11 @@ void RivReservoirFaultsPartMgr::updateColors(size_t timeStepIndex, RimEclipseCel
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirFaultsPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivReservoirFaultsPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
for (size_t i = 0; i < m_faultParts.size(); i++) for (size_t i = 0; i < m_faultParts.size(); i++)
{ {
m_faultParts[i]->updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot); m_faultParts[i]->updateCellEdgeResultColor(timeStepIndex, cellResultColors, cellEdgeResultColors);
} }
} }

View File

@ -49,9 +49,9 @@ public:
void setOpacityLevel(float opacity); void setOpacityLevel(float opacity);
void applySingleColorEffect(); void applySingleColorEffect();
void updateColors(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateColors(size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
void appendPartsToModel(cvf::ModelBasicList* model); void appendPartsToModel(cvf::ModelBasicList* model);

View File

@ -111,22 +111,22 @@ void RivReservoirPartMgr::updateCellColor(cvf::Color4f color)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivReservoirPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
for (size_t i = 0; i < m_allGrids.size() ; ++i) for (size_t i = 0; i < m_allGrids.size() ; ++i)
{ {
m_allGrids[i]->updateCellResultColor(timeStepIndex, cellResultSlot); m_allGrids[i]->updateCellResultColor(timeStepIndex, cellResultColors);
} }
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivReservoirPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
for (size_t i = 0; i < m_allGrids.size() ; ++i) for (size_t i = 0; i < m_allGrids.size() ; ++i)
{ {
m_allGrids[i]->updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot); m_allGrids[i]->updateCellEdgeResultColor(timeStepIndex, cellResultColors, cellEdgeResultColors);
} }
} }
@ -158,11 +158,11 @@ void RivReservoirPartMgr::appendGridPartsToModel(cvf::ModelBasicList* model, con
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirPartMgr::updateFaultColors(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivReservoirPartMgr::updateFaultColors(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
if (m_faultsPartMgr.notNull()) if (m_faultsPartMgr.notNull())
{ {
m_faultsPartMgr->updateColors(timeStepIndex, cellResultSlot); m_faultsPartMgr->updateColors(timeStepIndex, cellResultColors);
} }
} }
@ -202,11 +202,11 @@ void RivReservoirPartMgr::setFaultForceVisibility(bool isGeneratedByFilter)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirPartMgr::updateFaultCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivReservoirPartMgr::updateFaultCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
if (m_faultsPartMgr.notNull()) if (m_faultsPartMgr.notNull())
{ {
m_faultsPartMgr->updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot); m_faultsPartMgr->updateCellEdgeResultColor(timeStepIndex, cellResultColors, cellEdgeResultColors);
} }
} }

View File

@ -57,17 +57,17 @@ public:
cellVisibility(size_t gridIdx); cellVisibility(size_t gridIdx);
void updateCellColor(cvf::Color4f color); void updateCellColor(cvf::Color4f color);
void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, void updateCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
void appendGridPartsToModel(cvf::ModelBasicList* model, const std::vector<size_t>& gridIdxes); void appendGridPartsToModel(cvf::ModelBasicList* model, const std::vector<size_t>& gridIdxes);
void appendGridPartsToModel(cvf::ModelBasicList* model); void appendGridPartsToModel(cvf::ModelBasicList* model);
// Faults // Faults
void updateFaultColors(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateFaultColors(size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateFaultCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, void updateFaultCellEdgeResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
void appendFaultPartsToModel(cvf::ModelBasicList* model); void appendFaultPartsToModel(cvf::ModelBasicList* model);
void appendFaultLabelPartsToModel(cvf::ModelBasicList* model); void appendFaultLabelPartsToModel(cvf::ModelBasicList* model);
private: private:

View File

@ -789,28 +789,28 @@ void RivReservoirViewPartMgr::updateCellColor(RivCellSetEnum geometryType, cvf::
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivReservoirViewPartMgr::updateCellResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex ); RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex );
pmgr->updateCellResultColor(timeStepIndex, cellResultSlot); pmgr->updateCellResultColor(timeStepIndex, cellResultColors);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivReservoirViewPartMgr::updateCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex ); RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex );
pmgr->updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot); pmgr->updateCellEdgeResultColor(timeStepIndex, cellResultColors, cellEdgeResultColors);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateFaultCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultSlot, RimCellEdgeColors* cellEdgeResultSlot) void RivReservoirViewPartMgr::updateFaultCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors)
{ {
RivReservoirPartMgr * pmgr = reservoirPartManager(geometryType, timeStepIndex); RivReservoirPartMgr * pmgr = reservoirPartManager(geometryType, timeStepIndex);
pmgr->updateFaultCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot); pmgr->updateFaultCellEdgeResultColor(timeStepIndex, cellResultColors, cellEdgeResultColors);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -841,7 +841,7 @@ RivReservoirPartMgr * RivReservoirViewPartMgr::reservoirPartManager(RivCellSetEn
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateFaultColors(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultSlot) void RivReservoirViewPartMgr::updateFaultColors(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
{ {
if (geometryType == PROPERTY_FILTERED && timeStepIndex >= m_propFilteredGeometryFrames.size()) if (geometryType == PROPERTY_FILTERED && timeStepIndex >= m_propFilteredGeometryFrames.size())
{ {
@ -854,7 +854,7 @@ void RivReservoirViewPartMgr::updateFaultColors(RivCellSetEnum geometryType, siz
} }
RivReservoirPartMgr* pmgr = reservoirPartManager(geometryType, timeStepIndex); RivReservoirPartMgr* pmgr = reservoirPartManager(geometryType, timeStepIndex);
pmgr->updateFaultColors(timeStepIndex, cellResultSlot); pmgr->updateFaultColors(timeStepIndex, cellResultColors);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -50,18 +50,18 @@ public:
void updateCellColor (RivCellSetEnum geometryType, size_t timeStepIndex, void updateCellColor (RivCellSetEnum geometryType, size_t timeStepIndex,
cvf::Color4f color); cvf::Color4f color);
void updateCellResultColor (RivCellSetEnum geometryType, size_t timeStepIndex, void updateCellResultColor (RivCellSetEnum geometryType, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot); RimEclipseCellColors* cellResultColors);
void updateCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex, void updateCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
// Faults // Faults
void appendFaultsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType); void appendFaultsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType);
void appendFaultsDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex); void appendFaultsDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex);
void updateFaultColors(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultSlot); void updateFaultColors(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
void updateFaultCellEdgeResultColor( RivCellSetEnum geometryType, size_t timeStepIndex, void updateFaultCellEdgeResultColor( RivCellSetEnum geometryType, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot); RimCellEdgeColors* cellEdgeResultColors);
// Fault labels // Fault labels
RivCellSetEnum geometryTypeForFaultLabels(const std::vector<RivCellSetEnum>& geometryTypes) const; RivCellSetEnum geometryTypeForFaultLabels(const std::vector<RivCellSetEnum>& geometryTypes) const;

View File

@ -71,29 +71,29 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createCellEdgeEffect(cvf::DrawableGe
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
size_t gridIndex, size_t gridIndex,
size_t timeStepIndex, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
float opacityLevel, float opacityLevel,
cvf::Color3f defaultColor, cvf::Color3f defaultColor,
caf::FaceCulling faceCulling, caf::FaceCulling faceCulling,
bool disableLighting) bool disableLighting)
{ {
CellEdgeEffectGenerator cellFaceEffectGen(cellEdgeResultSlot->legendConfig()->scalarMapper()); CellEdgeEffectGenerator cellFaceEffectGen(cellEdgeResultColors->legendConfig()->scalarMapper());
if (cellResultSlot->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultSlot, cellEdgeResultSlot, RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors,
quadToCellFaceMapper, dg, gridIndex, opacityLevel); quadToCellFaceMapper, dg, gridIndex, opacityLevel);
RivTernaryScalarMapper* ternaryCellScalarMapper = cellResultSlot->ternaryLegendConfig()->scalarMapper(); RivTernaryScalarMapper* ternaryCellScalarMapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
cellFaceEffectGen.setTernaryScalarMapper(ternaryCellScalarMapper); cellFaceEffectGen.setTernaryScalarMapper(ternaryCellScalarMapper);
} }
else else
{ {
RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultSlot, cellEdgeResultSlot, RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors,
quadToCellFaceMapper, dg, gridIndex, opacityLevel); quadToCellFaceMapper, dg, gridIndex, opacityLevel);
cvf::ScalarMapper* cellScalarMapper = cellResultSlot->legendConfig()->scalarMapper(); cvf::ScalarMapper* cellScalarMapper = cellResultColors->legendConfig()->scalarMapper();
cellFaceEffectGen.setScalarMapper(cellScalarMapper); cellFaceEffectGen.setScalarMapper(cellScalarMapper);
} }

View File

@ -50,8 +50,8 @@ public:
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
size_t gridIndex, size_t gridIndex,
size_t timeStepIndex, size_t timeStepIndex,
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimCellEdgeColors* cellEdgeResultSlot, RimCellEdgeColors* cellEdgeResultColors,
float opacityLevel, float opacityLevel,
cvf::Color3f defaultColor, cvf::Color3f defaultColor,
caf::FaceCulling faceCulling, caf::FaceCulling faceCulling,

View File

@ -38,22 +38,22 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
RimEclipseCellColors* cellResultSlot, RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig, RimTernaryLegendConfig* ternaryLegendConfig,
size_t timeStepIndex, size_t timeStepIndex,
size_t gridIndex, size_t gridIndex,
const cvf::StructGridQuadToCellFaceMapper* quadMapper) const cvf::StructGridQuadToCellFaceMapper* quadMapper)
{ {
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
m_quadMapper = quadMapper; m_quadMapper = quadMapper;
CVF_ASSERT(quadMapper && eclipseCase ); CVF_ASSERT(quadMapper && eclipseCase );
size_t resTimeStepIdx = timeStepIndex; size_t resTimeStepIdx = timeStepIndex;
if (cellResultSlot->hasStaticResult()) resTimeStepIdx = 0; if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL");
cvf::ref<RigResultAccessor> sgas = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); cvf::ref<RigResultAccessor> sgas = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS");
@ -62,7 +62,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
m_resultAccessor = new RigTernaryResultAccessor(); m_resultAccessor = new RigTernaryResultAccessor();
m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p()); m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p());
cvf::ref<RigPipeInCellEvaluator> pipeInCellEval = new RigPipeInCellEvaluator( cellResultSlot->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex), cvf::ref<RigPipeInCellEvaluator> pipeInCellEval = new RigPipeInCellEvaluator( cellResultColors->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex),
eclipseCase->gridCellToWellIndex(gridIndex)); eclipseCase->gridCellToWellIndex(gridIndex));
const RivTernaryScalarMapper* mapper = ternaryLegendConfig->scalarMapper(); const RivTernaryScalarMapper* mapper = ternaryLegendConfig->scalarMapper();

View File

@ -41,7 +41,7 @@ namespace cvf
class RivTernaryTextureCoordsCreator class RivTernaryTextureCoordsCreator
{ {
public: public:
RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultSlot, RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig, RimTernaryLegendConfig* ternaryLegendConfig,
size_t timeStepIndex, size_t timeStepIndex,
size_t gridIndex, size_t gridIndex,

View File

@ -32,25 +32,25 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultSlot, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper) RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper)
{ {
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData(); RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
m_quadMapper = quadMapper; m_quadMapper = quadMapper;
CVF_ASSERT(quadMapper && eclipseCase ); CVF_ASSERT(quadMapper && eclipseCase );
size_t resTimeStepIdx = timeStepIndex; size_t resTimeStepIdx = timeStepIndex;
if (cellResultSlot->hasStaticResult()) resTimeStepIdx = 0; if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
m_resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, cellResultSlot->resultVariable()); m_resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, cellResultColors->resultVariable());
cvf::ref<RigPipeInCellEvaluator> pipeInCellEval = new RigPipeInCellEvaluator(cellResultSlot->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex), cvf::ref<RigPipeInCellEvaluator> pipeInCellEval = new RigPipeInCellEvaluator(cellResultColors->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex),
eclipseCase->gridCellToWellIndex(gridIndex)); eclipseCase->gridCellToWellIndex(gridIndex));
const cvf::ScalarMapper* mapper = cellResultSlot->legendConfig()->scalarMapper(); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
m_texMapper = new RivResultToTextureMapper(mapper, pipeInCellEval.p()); m_texMapper = new RivResultToTextureMapper(mapper, pipeInCellEval.p());
CVF_ASSERT(m_texMapper.notNull()); CVF_ASSERT(m_texMapper.notNull());

View File

@ -36,7 +36,7 @@ namespace cvf
class RivTextureCoordsCreator class RivTextureCoordsCreator
{ {
public: public:
RivTextureCoordsCreator(RimEclipseCellColors* cellResultSlot, RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors,
size_t timeStepIndex, size_t timeStepIndex,
size_t gridIndex, size_t gridIndex,
const cvf::StructGridQuadToCellFaceMapper* quadMapper); const cvf::StructGridQuadToCellFaceMapper* quadMapper);

View File

@ -906,7 +906,7 @@ void RimEclipseView::updateLegends()
updateMinMaxValuesAndAddLegendToView(QString("Cell Results: \n"), this->cellResult(), results); updateMinMaxValuesAndAddLegendToView(QString("Cell Results: \n"), this->cellResult(), results);
if (this->faultResultSettings()->showCustomFaultResult() && this->faultResultSettings()->hasValidCustomResult()) if (this->faultResultSettings()->showCustomFaultResult() && this->faultResultSettings()->hasValidCustomResult())
{ {
updateMinMaxValuesAndAddLegendToView(QString("Fault Results: \n"), this->currentFaultResultSlot(), results); updateMinMaxValuesAndAddLegendToView(QString("Fault Results: \n"), this->currentFaultResultColors(), results);
} }
if (this->cellEdgeResult()->hasResult()) if (this->cellEdgeResult()->hasResult())
@ -932,21 +932,21 @@ void RimEclipseView::updateLegends()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultSlot, RigCaseCellResultsData* cellResultsData) void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData)
{ {
if (resultSlot->hasResult()) if (resultColors->hasResult())
{ {
double globalMin, globalMax; double globalMin, globalMax;
double globalPosClosestToZero, globalNegClosestToZero; double globalPosClosestToZero, globalNegClosestToZero;
cellResultsData->minMaxCellScalarValues(resultSlot->scalarResultIndex(), globalMin, globalMax); cellResultsData->minMaxCellScalarValues(resultColors->scalarResultIndex(), globalMin, globalMax);
cellResultsData->posNegClosestToZero(resultSlot->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero); cellResultsData->posNegClosestToZero(resultColors->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero);
double localMin, localMax; double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero; double localPosClosestToZero, localNegClosestToZero;
if (resultSlot->hasDynamicResult()) if (resultColors->hasDynamicResult())
{ {
cellResultsData->minMaxCellScalarValues(resultSlot->scalarResultIndex(), m_currentTimeStep, localMin, localMax); cellResultsData->minMaxCellScalarValues(resultColors->scalarResultIndex(), m_currentTimeStep, localMin, localMax);
cellResultsData->posNegClosestToZero(resultSlot->scalarResultIndex(), m_currentTimeStep, localPosClosestToZero, localNegClosestToZero); cellResultsData->posNegClosestToZero(resultColors->scalarResultIndex(), m_currentTimeStep, localPosClosestToZero, localNegClosestToZero);
} }
else else
{ {
@ -957,22 +957,22 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
localNegClosestToZero = globalNegClosestToZero; localNegClosestToZero = globalNegClosestToZero;
} }
resultSlot->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); resultColors->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
resultSlot->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax); resultColors->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
m_viewer->addColorLegendToBottomLeftCorner(resultSlot->legendConfig->legend()); m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig->legend());
resultSlot->legendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel + resultSlot->resultVariable())); resultColors->legendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable()));
} }
else else
{ {
resultSlot->legendConfig->setClosestToZeroValues(0, 0, 0, 0); resultColors->legendConfig->setClosestToZeroValues(0, 0, 0, 0);
resultSlot->legendConfig->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE); resultColors->legendConfig->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
} }
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount(); size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
if (resultSlot->isTernarySaturationSelected() && maxTimeStepCount > 1) if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1)
{ {
RimReservoirCellResultsStorage* gridCellResults = resultSlot->currentGridCellResults(); RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults();
{ {
double globalMin = 0.0; double globalMin = 0.0;
double globalMax = 1.0; double globalMax = 1.0;
@ -985,7 +985,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax); resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax);
} }
} }
@ -1001,7 +1001,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax); resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax);
} }
} }
@ -1017,14 +1017,14 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax); cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax); resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax);
} }
} }
if (resultSlot->ternaryLegendConfig->legend()) if (resultColors->ternaryLegendConfig->legend())
{ {
resultSlot->ternaryLegendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel)); resultColors->ternaryLegendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel));
m_viewer->addColorLegendToBottomLeftCorner(resultSlot->ternaryLegendConfig->legend()); m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->legend());
} }
} }
} }
@ -1371,17 +1371,17 @@ void RimEclipseView::updateFaultColors()
// Update all fault geometry // Update all fault geometry
std::vector<RivCellSetEnum> faultGeometriesToRecolor = visibleFaultGeometryTypes(); std::vector<RivCellSetEnum> faultGeometriesToRecolor = visibleFaultGeometryTypes();
RimEclipseCellColors* faultResultSlot = currentFaultResultSlot(); RimEclipseCellColors* faultResultColors = currentFaultResultColors();
for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i) for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i)
{ {
if (this->hasUserRequestedAnimation() && this->cellEdgeResult()->hasResult()) if (this->hasUserRequestedAnimation() && this->cellEdgeResult()->hasResult())
{ {
m_reservoirGridPartManager->updateFaultCellEdgeResultColor(faultGeometriesToRecolor[i], m_currentTimeStep, faultResultSlot, this->cellEdgeResult()); m_reservoirGridPartManager->updateFaultCellEdgeResultColor(faultGeometriesToRecolor[i], m_currentTimeStep, faultResultColors, this->cellEdgeResult());
} }
else else
{ {
m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, faultResultSlot); m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, faultResultColors);
} }
} }
} }
@ -1414,16 +1414,16 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseCellColors* RimEclipseView::currentFaultResultSlot() RimEclipseCellColors* RimEclipseView::currentFaultResultColors()
{ {
RimEclipseCellColors* faultResultSlot = this->cellResult(); RimEclipseCellColors* faultResultColors = this->cellResult();
if (this->faultResultSettings()->showCustomFaultResult()) if (this->faultResultSettings()->showCustomFaultResult())
{ {
faultResultSlot = this->faultResultSettings()->customFaultResult(); faultResultColors = this->faultResultSettings()->customFaultResult();
} }
return faultResultSlot; return faultResultColors;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -103,7 +103,7 @@ public:
RimReservoirCellResultsStorage* currentGridCellResults(); RimReservoirCellResultsStorage* currentGridCellResults();
RigActiveCellInfo* currentActiveCellInfo(); RigActiveCellInfo* currentActiveCellInfo();
RimEclipseCellColors* currentFaultResultSlot(); RimEclipseCellColors* currentFaultResultColors();
void setEclipseCase(RimEclipseCase* reservoir); void setEclipseCase(RimEclipseCase* reservoir);
RimEclipseCase* eclipseCase(); RimEclipseCase* eclipseCase();
@ -142,7 +142,7 @@ private:
virtual void updateStaticCellColors(); virtual void updateStaticCellColors();
void updateStaticCellColors(RivCellSetEnum geometryType); void updateStaticCellColors(RivCellSetEnum geometryType);
void updateLegends(); void updateLegends();
void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultSlot, RigCaseCellResultsData* cellResultsData); void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData);
virtual void resetLegendsInViewer(); virtual void resetLegendsInViewer();
virtual void updateViewerWidgetWindowTitle(); virtual void updateViewerWidgetWindowTitle();

View File

@ -887,14 +887,14 @@ void RimUiTreeView::slotWriteBinaryResultAsInputProperty()
RimUiTreeModelPdm* myModel = dynamic_cast<RimUiTreeModelPdm*>(model()); RimUiTreeModelPdm* myModel = dynamic_cast<RimUiTreeModelPdm*>(model());
caf::PdmUiTreeItem* uiItem = myModel->getTreeItemFromIndex(currentIndex()); caf::PdmUiTreeItem* uiItem = myModel->getTreeItemFromIndex(currentIndex());
RimEclipseCellColors* resultSlot = dynamic_cast<RimEclipseCellColors*>(uiItem->dataObject().p()); RimEclipseCellColors* resultColors = dynamic_cast<RimEclipseCellColors*>(uiItem->dataObject().p());
if (!resultSlot) return; if (!resultColors) return;
if (!resultSlot->reservoirView()) return; if (!resultColors->reservoirView()) return;
if (!resultSlot->reservoirView()->eclipseCase()) return; if (!resultColors->reservoirView()->eclipseCase()) return;
if (!resultSlot->reservoirView()->eclipseCase()->reservoirData()) return; if (!resultColors->reservoirView()->eclipseCase()->reservoirData()) return;
RimBinaryExportSettings exportSettings; RimBinaryExportSettings exportSettings;
exportSettings.eclipseKeyword = resultSlot->resultVariable(); exportSettings.eclipseKeyword = resultColors->resultVariable();
{ {
QString projectFolder; QString projectFolder;
@ -908,10 +908,10 @@ void RimUiTreeView::slotWriteBinaryResultAsInputProperty()
} }
else else
{ {
projectFolder = resultSlot->reservoirView()->eclipseCase()->locationOnDisc(); projectFolder = resultColors->reservoirView()->eclipseCase()->locationOnDisc();
} }
QString outputFileName = projectFolder + "/" + resultSlot->resultVariable(); QString outputFileName = projectFolder + "/" + resultColors->resultVariable();
exportSettings.fileName = outputFileName; exportSettings.fileName = outputFileName;
} }
@ -919,10 +919,10 @@ void RimUiTreeView::slotWriteBinaryResultAsInputProperty()
caf::PdmUiPropertyDialog propertyDialog(this, &exportSettings, "Export Binary Eclipse Data to Text File"); caf::PdmUiPropertyDialog propertyDialog(this, &exportSettings, "Export Binary Eclipse Data to Text File");
if (propertyDialog.exec() == QDialog::Accepted) if (propertyDialog.exec() == QDialog::Accepted)
{ {
size_t timeStep = resultSlot->reservoirView()->currentTimeStep(); size_t timeStep = resultColors->reservoirView()->currentTimeStep();
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel());
bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, resultSlot->reservoirView()->eclipseCase()->reservoirData(), porosityModel, timeStep, resultSlot->resultVariable(), exportSettings.eclipseKeyword, exportSettings.undefinedValue); bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, resultColors->reservoirView()->eclipseCase()->reservoirData(), porosityModel, timeStep, resultColors->resultVariable(), exportSettings.eclipseKeyword, exportSettings.undefinedValue);
if (!isOk) if (!isOk)
{ {
QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName); QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName);

View File

@ -141,7 +141,7 @@ QString RiuFemResultTextBuilder::gridResultDetails()
{ {
RigGeoMechCaseData* eclipseCaseData = m_reservoirView->geoMechCase()->geoMechData(); RigGeoMechCaseData* eclipseCaseData = m_reservoirView->geoMechCase()->geoMechData();
this->appendTextFromResultSlot(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text); this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text);
if (!text.isEmpty()) if (!text.isEmpty())
{ {
@ -156,22 +156,22 @@ QString RiuFemResultTextBuilder::gridResultDetails()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuFemResultTextBuilder::appendTextFromResultSlot(RigGeoMechCaseData* geomData, int gridIndex, int cellIndex, int timeStepIndex, RimGeoMechCellColors* resultSlot, QString* resultInfoText) void RiuFemResultTextBuilder::appendTextFromResultColors(RigGeoMechCaseData* geomData, int gridIndex, int cellIndex, int timeStepIndex, RimGeoMechCellColors* resultColors, QString* resultInfoText)
{ {
if (!resultSlot) if (!resultColors)
{ {
return; return;
} }
if (resultSlot->hasResult()) if (resultColors->hasResult())
{ {
const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues(resultSlot->resultAddress(), gridIndex, timeStepIndex); const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues(resultColors->resultAddress(), gridIndex, timeStepIndex);
if (scalarResults.size()) if (scalarResults.size())
{ {
caf::AppEnum<RigFemResultPosEnum> resPosAppEnum = resultSlot->resultPositionType(); caf::AppEnum<RigFemResultPosEnum> resPosAppEnum = resultColors->resultPositionType();
resultInfoText->append(resPosAppEnum.uiText() + ", "); resultInfoText->append(resPosAppEnum.uiText() + ", ");
resultInfoText->append(resultSlot->resultFieldUiName()+ ", ") ; resultInfoText->append(resultColors->resultFieldUiName()+ ", ") ;
resultInfoText->append(resultSlot->resultComponentUiName() + ":\n"); resultInfoText->append(resultColors->resultComponentUiName() + ":\n");
RigFemPart* femPart = geomData->femParts()->part(gridIndex); RigFemPart* femPart = geomData->femParts()->part(gridIndex);
@ -183,7 +183,7 @@ void RiuFemResultTextBuilder::appendTextFromResultSlot(RigGeoMechCaseData* geomD
float scalarValue = std::numeric_limits<float>::infinity(); float scalarValue = std::numeric_limits<float>::infinity();
int nodeIdx = elmentConn[lNodeIdx]; int nodeIdx = elmentConn[lNodeIdx];
if (resultSlot->resultPositionType() == RIG_NODAL) if (resultColors->resultPositionType() == RIG_NODAL)
{ {
scalarValue = scalarResults[nodeIdx]; scalarValue = scalarResults[nodeIdx];
@ -215,21 +215,21 @@ void RiuFemResultTextBuilder::appendDetails(QString& text, const QString& detail
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QString RiuFemResultTextBuilder::closestNodeResultText(RimGeoMechCellColors* resultSlot) QString RiuFemResultTextBuilder::closestNodeResultText(RimGeoMechCellColors* resultColors)
{ {
QString text; QString text;
if (!resultSlot) if (!resultColors)
{ {
return text; return text;
} }
if (resultSlot->hasResult()) if (resultColors->hasResult())
{ {
if (! (m_reservoirView->geoMechCase() && m_reservoirView->geoMechCase()->geoMechData())) return text; if (! (m_reservoirView->geoMechCase() && m_reservoirView->geoMechCase()->geoMechData())) return text;
RigGeoMechCaseData* geomData = m_reservoirView->geoMechCase()->geoMechData(); RigGeoMechCaseData* geomData = m_reservoirView->geoMechCase()->geoMechData();
const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues(resultSlot->resultAddress(), m_gridIndex, m_timeStepIndex); const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues(resultColors->resultAddress(), m_gridIndex, m_timeStepIndex);
if (scalarResults.size()) if (scalarResults.size())
{ {
@ -259,7 +259,7 @@ QString RiuFemResultTextBuilder::closestNodeResultText(RimGeoMechCellColors* res
float scalarValue = std::numeric_limits<float>::infinity(); float scalarValue = std::numeric_limits<float>::infinity();
int nodeIdx = elmentConn[closestLocalNode]; int nodeIdx = elmentConn[closestLocalNode];
if (resultSlot->resultPositionType() == RIG_NODAL) if (resultColors->resultPositionType() == RIG_NODAL)
{ {
scalarValue = scalarResults[nodeIdx]; scalarValue = scalarResults[nodeIdx];

View File

@ -53,9 +53,9 @@ private:
QString gridResultDetails(); QString gridResultDetails();
QString closestNodeResultText(RimGeoMechCellColors* resultSlot); QString closestNodeResultText(RimGeoMechCellColors* resultColors);
void appendTextFromResultSlot(RigGeoMechCaseData* eclipseCase, int gridIndex, int cellIndex, int timeStepIndex, RimGeoMechCellColors* resultSlot, QString* resultInfoText); void appendTextFromResultColors(RigGeoMechCaseData* eclipseCase, int gridIndex, int cellIndex, int timeStepIndex, RimGeoMechCellColors* resultColors, QString* resultInfoText);
private: private:
caf::PdmPointer<RimGeoMechView> m_reservoirView; caf::PdmPointer<RimGeoMechView> m_reservoirView;

View File

@ -176,7 +176,7 @@ QString RiuResultTextBuilder::gridResultDetails()
RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
this->appendTextFromResultSlot(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text); this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text);
if (!text.isEmpty()) if (!text.isEmpty())
{ {
@ -213,7 +213,7 @@ QString RiuResultTextBuilder::faultResultDetails()
if (m_reservoirView->faultResultSettings()->hasValidCustomResult()) if (m_reservoirView->faultResultSettings()->hasValidCustomResult())
{ {
text += "Fault result data:\n"; text += "Fault result data:\n";
this->appendTextFromResultSlot(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->currentFaultResultSlot(), &text); this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->currentFaultResultColors(), &text);
} }
} }
} }
@ -252,7 +252,7 @@ QString RiuResultTextBuilder::faultResultText()
cvf::StructGridInterface::FaceEnum faceHelper(m_face); cvf::StructGridInterface::FaceEnum faceHelper(m_face);
if (m_reservoirView->faultResultSettings()->hasValidCustomResult()) if (m_reservoirView->faultResultSettings()->hasValidCustomResult())
{ {
text = cellResultText(m_reservoirView->currentFaultResultSlot()); text = cellResultText(m_reservoirView->currentFaultResultColors());
} }
} }
} }
@ -285,13 +285,13 @@ QString RiuResultTextBuilder::nncResultText()
const RigConnection& conn = nncData->connections()[m_nncIndex]; const RigConnection& conn = nncData->connections()[m_nncIndex];
cvf::StructGridInterface::FaceEnum face(conn.m_c1Face); cvf::StructGridInterface::FaceEnum face(conn.m_c1Face);
if (m_reservoirView->currentFaultResultSlot()) if (m_reservoirView->currentFaultResultColors())
{ {
size_t scalarResultIdx = m_reservoirView->currentFaultResultSlot()->scalarResultIndex(); size_t scalarResultIdx = m_reservoirView->currentFaultResultColors()->scalarResultIndex();
const std::vector<double>* nncValues = nncData->connectionScalarResult(scalarResultIdx); const std::vector<double>* nncValues = nncData->connectionScalarResult(scalarResultIdx);
if (nncValues) if (nncValues)
{ {
QString resultVar = m_reservoirView->currentFaultResultSlot()->resultVariable(); QString resultVar = m_reservoirView->currentFaultResultColors()->resultVariable();
double scalarValue = (*nncValues)[m_nncIndex]; double scalarValue = (*nncValues)[m_nncIndex];
text = QString("%1 : %2").arg(resultVar).arg(scalarValue); text = QString("%1 : %2").arg(resultVar).arg(scalarValue);
@ -307,17 +307,17 @@ QString RiuResultTextBuilder::nncResultText()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultSlot, QString* resultInfoText) void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText)
{ {
if (!resultSlot) if (!resultColors)
{ {
return; return;
} }
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel());
if (resultSlot->isTernarySaturationSelected()) if (resultColors->isTernarySaturationSelected())
{ {
RimReservoirCellResultsStorage* gridCellResults = resultSlot->currentGridCellResults(); RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults();
if (gridCellResults) if (gridCellResults)
{ {
size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SOIL"); size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SOIL");
@ -343,14 +343,14 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
resultInfoText->append(QString("SWAT : %1\n").arg(scalarValue)); resultInfoText->append(QString("SWAT : %1\n").arg(scalarValue));
} }
} }
else if (resultSlot->hasResult()) else if (resultColors->hasResult())
{ {
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel());
cvf::ref<RigResultAccessor> resultAccessor; cvf::ref<RigResultAccessor> resultAccessor;
if (resultSlot->hasStaticResult()) if (resultColors->hasStaticResult())
{ {
if (resultSlot->resultVariable().compare(RimDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0) if (resultColors->resultVariable().compare(RimDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0)
{ {
cvf::ref<RigResultAccessor> transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedTransmissibilityResultName()); cvf::ref<RigResultAccessor> transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedTransmissibilityResultName());
{ {
@ -364,7 +364,7 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
resultInfoText->append(QString("Tran Z : %1\n").arg(scalarValue)); resultInfoText->append(QString("Tran Z : %1\n").arg(scalarValue));
} }
} }
else if (resultSlot->resultVariable().compare(RimDefines::combinedMultResultName(), Qt::CaseInsensitive) == 0) else if (resultColors->resultVariable().compare(RimDefines::combinedMultResultName(), Qt::CaseInsensitive) == 0)
{ {
cvf::ref<RigResultAccessor> multResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName()); cvf::ref<RigResultAccessor> multResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName());
{ {
@ -386,7 +386,7 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
resultInfoText->append(QString("MULTZ- : %1\n").arg(scalarValue)); resultInfoText->append(QString("MULTZ- : %1\n").arg(scalarValue));
} }
} }
else if (resultSlot->resultVariable().compare(RimDefines::combinedRiTranResultName(), Qt::CaseInsensitive) == 0) else if (resultColors->resultVariable().compare(RimDefines::combinedRiTranResultName(), Qt::CaseInsensitive) == 0)
{ {
cvf::ref<RigResultAccessor> transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiTranResultName()); cvf::ref<RigResultAccessor> transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiTranResultName());
{ {
@ -400,7 +400,7 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
resultInfoText->append(QString("riTran Z : %1\n").arg(scalarValue)); resultInfoText->append(QString("riTran Z : %1\n").arg(scalarValue));
} }
} }
else if (resultSlot->resultVariable().compare(RimDefines::combinedRiMultResultName(), Qt::CaseInsensitive) == 0) else if (resultColors->resultVariable().compare(RimDefines::combinedRiMultResultName(), Qt::CaseInsensitive) == 0)
{ {
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiMultResultName()); cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiMultResultName());
{ {
@ -414,7 +414,7 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
resultInfoText->append(QString("riMult Z : %1\n").arg(scalarValue)); resultInfoText->append(QString("riMult Z : %1\n").arg(scalarValue));
} }
} }
else if (resultSlot->resultVariable().compare(RimDefines::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive) == 0) else if (resultColors->resultVariable().compare(RimDefines::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive) == 0)
{ {
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiAreaNormTranResultName()); cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiAreaNormTranResultName());
{ {
@ -430,19 +430,19 @@ void RiuResultTextBuilder::appendTextFromResultSlot(RigCaseData* eclipseCase, si
} }
else else
{ {
resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, resultSlot->scalarResultIndex()); resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, resultColors->scalarResultIndex());
} }
} }
else else
{ {
resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, resultSlot->scalarResultIndex()); resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, resultColors->scalarResultIndex());
} }
if (resultAccessor.notNull()) if (resultAccessor.notNull())
{ {
double scalarValue = resultAccessor->cellScalar(cellIndex); double scalarValue = resultAccessor->cellScalar(cellIndex);
resultInfoText->append("Cell result : "); resultInfoText->append("Cell result : ");
resultInfoText->append(resultSlot->resultVariable()); resultInfoText->append(resultColors->resultVariable());
resultInfoText->append(QString(" : %1\n").arg(scalarValue)); resultInfoText->append(QString(" : %1\n").arg(scalarValue));
} }
} }
@ -574,7 +574,7 @@ void RiuResultTextBuilder::appendDetails(QString& text, const QString& details)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultSlot) QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
{ {
QString text; QString text;
@ -583,11 +583,11 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultSlot)
RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultSlot->porosityModel()); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel());
QString resultVar = resultSlot->resultVariable(); QString resultVar = resultColors->resultVariable();
if (resultSlot->isTernarySaturationSelected()) if (resultColors->isTernarySaturationSelected())
{ {
RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults(); RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults();
if (gridCellResults) if (gridCellResults)

View File

@ -62,9 +62,9 @@ private:
QString nncResultText(); QString nncResultText();
QString wellResultText(); QString wellResultText();
QString cellResultText(RimEclipseCellColors* resultSlot); QString cellResultText(RimEclipseCellColors* resultColors);
void appendTextFromResultSlot(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultSlot, QString* resultInfoText); void appendTextFromResultColors(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText);
private: private:
caf::PdmPointer<RimEclipseView> m_reservoirView; caf::PdmPointer<RimEclipseView> m_reservoirView;