mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2447 Fracture : Rename to fractureColors
This commit is contained in:
parent
a283a468c2
commit
519771cb38
@ -85,7 +85,7 @@ RivWellFracturePartMgr::~RivWellFracturePartMgr()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* model, const RimEclipseView& eclView)
|
||||
{
|
||||
if (!m_rimFracture->isChecked() || !eclView.stimPlanColors->isChecked()) return;
|
||||
if (!m_rimFracture->isChecked() || !eclView.fractureColors->isChecked()) return;
|
||||
|
||||
if (!m_rimFracture->fractureTemplate()) return;
|
||||
|
||||
@ -96,7 +96,7 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* mod
|
||||
|
||||
if (stimPlanFracTemplate)
|
||||
{
|
||||
if (eclView.stimPlanColors->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR)
|
||||
if (eclView.fractureColors->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR)
|
||||
{
|
||||
auto part = createStimPlanElementColorSurfacePart(eclView);
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
@ -107,7 +107,7 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* mod
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
}
|
||||
|
||||
if (eclView.stimPlanColors->showStimPlanMesh())
|
||||
if (eclView.fractureColors->showStimPlanMesh())
|
||||
{
|
||||
auto part = createStimPlanMeshPart(eclView);
|
||||
if (part.notNull()) parts.push_back(part.p());
|
||||
@ -268,7 +268,7 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
const RigFractureCell* cell = getFractureCellAtDomainCoord(domainIntersectionPoint);
|
||||
RimStimPlanColors* stimPlanColors = activeView.stimPlanColors;
|
||||
RimStimPlanColors* stimPlanColors = activeView.fractureColors;
|
||||
|
||||
QString condValueText = cell ? QString::number(cell->getConductivtyValue()) : "-";
|
||||
QString iText = cell ? QString::number(cell->getI()) : "-";
|
||||
@ -377,19 +377,19 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc
|
||||
surfacePart->setDrawable(geo.p());
|
||||
surfacePart->setSourceInfo(new RivObjectSourceInfo(m_rimFracture));
|
||||
|
||||
cvf::Color4f fractureColor = cvf::Color4f(activeView.stimPlanColors->defaultColor());
|
||||
cvf::Color4f fractureColor = cvf::Color4f(activeView.fractureColors->defaultColor());
|
||||
|
||||
RimLegendConfig* legendConfig = nullptr;
|
||||
if (activeView.stimPlanColors() && activeView.stimPlanColors()->isChecked())
|
||||
if (activeView.fractureColors() && activeView.fractureColors()->isChecked())
|
||||
{
|
||||
legendConfig = activeView.stimPlanColors()->activeLegend();
|
||||
legendConfig = activeView.fractureColors()->activeLegend();
|
||||
}
|
||||
|
||||
if (legendConfig && legendConfig->scalarMapper())
|
||||
{
|
||||
cvf::Color3ub resultColor = cvf::Color3ub(RiaColorTables::undefinedCellColor());
|
||||
|
||||
if (activeView.stimPlanColors->uiResultName() == RiaDefines::conductivityResultName())
|
||||
if (activeView.fractureColors->uiResultName() == RiaDefines::conductivityResultName())
|
||||
{
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = dynamic_cast<RimEllipseFractureTemplate*>(m_rimFracture->fractureTemplate());
|
||||
if (ellipseFractureTemplate)
|
||||
@ -445,9 +445,9 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
||||
}
|
||||
|
||||
RimLegendConfig* legendConfig = nullptr;
|
||||
if (activeView.stimPlanColors() && activeView.stimPlanColors()->isChecked())
|
||||
if (activeView.fractureColors() && activeView.fractureColors()->isChecked())
|
||||
{
|
||||
legendConfig = activeView.stimPlanColors()->activeLegend();
|
||||
legendConfig = activeView.fractureColors()->activeLegend();
|
||||
}
|
||||
|
||||
// Show selected result on the surface geometry and filter out triangles that have result values near 0
|
||||
@ -458,7 +458,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
||||
std::vector<double> perNodeResultValues(nodeCoords.size(), HUGE_VAL);
|
||||
{
|
||||
size_t idx = 0;
|
||||
const std::vector<std::vector<double> > dataToPlot = stimPlanFracTemplate->resultValues(activeView.stimPlanColors->uiResultName(), activeView.stimPlanColors->unit(), stimPlanFracTemplate->activeTimeStepIndex());
|
||||
const std::vector<std::vector<double> > dataToPlot = stimPlanFracTemplate->resultValues(activeView.fractureColors->uiResultName(), activeView.fractureColors->unit(), stimPlanFracTemplate->activeTimeStepIndex());
|
||||
for (const std::vector<double>& unmirroredDataAtDepth : dataToPlot)
|
||||
{
|
||||
const std::vector<double> mirroredValuesAtDepth = mirrorDataAtSingleDepth(unmirroredDataAtDepth);
|
||||
@ -529,7 +529,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
||||
{
|
||||
// No result is mapped, show the entire StimPlan surface with default color
|
||||
|
||||
return createSingleColorSurfacePart(triangleIndices, nodeCoords, activeView.stimPlanColors->defaultColor());
|
||||
return createSingleColorSurfacePart(triangleIndices, nodeCoords, activeView.fractureColors->defaultColor());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -578,16 +578,16 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
||||
std::vector<RigFractureCell> stimPlanCells = stimPlanFracTemplate->fractureGrid()->fractureCells();
|
||||
|
||||
RimLegendConfig* legendConfig = nullptr;
|
||||
if (activeView.stimPlanColors() &&
|
||||
activeView.stimPlanColors()->isChecked() &&
|
||||
activeView.stimPlanColors()->activeLegend())
|
||||
if (activeView.fractureColors() &&
|
||||
activeView.fractureColors()->isChecked() &&
|
||||
activeView.fractureColors()->activeLegend())
|
||||
{
|
||||
legendConfig = activeView.stimPlanColors()->activeLegend();
|
||||
legendConfig = activeView.fractureColors()->activeLegend();
|
||||
|
||||
scalarMapper = legendConfig->scalarMapper();
|
||||
|
||||
QString resultNameFromColors = activeView.stimPlanColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.stimPlanColors->unit();
|
||||
QString resultNameFromColors = activeView.fractureColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors->unit();
|
||||
|
||||
std::vector<double> prCellResults = stimPlanFracTemplate->fractureGridResults(resultNameFromColors,
|
||||
resultUnitFromColors,
|
||||
@ -673,7 +673,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
||||
{
|
||||
// No result is mapped, show the entire StimPlan surface with default color
|
||||
|
||||
return createSingleColorSurfacePart(triIndicesToInclude, nodeDisplayCoords, activeView.stimPlanColors->defaultColor());
|
||||
return createSingleColorSurfacePart(triIndicesToInclude, nodeDisplayCoords, activeView.fractureColors->defaultColor());
|
||||
}
|
||||
}
|
||||
|
||||
@ -900,8 +900,8 @@ cvf::ref<cvf::DrawableGeo> RivWellFracturePartMgr::createStimPlanMeshDrawable(Ri
|
||||
std::vector<RigFractureCell> stimPlanCells = stimPlanFracTemplate->fractureGrid()->fractureCells();
|
||||
std::vector<cvf::Vec3f> stimPlanMeshVertices;
|
||||
|
||||
QString resultNameFromColors = activeView.stimPlanColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.stimPlanColors->unit();
|
||||
QString resultNameFromColors = activeView.fractureColors->uiResultName();
|
||||
QString resultUnitFromColors = activeView.fractureColors->unit();
|
||||
|
||||
std::vector<double> prCellResults = stimPlanFracTemplate->fractureGridResults(resultNameFromColors,
|
||||
resultUnitFromColors,
|
||||
|
@ -87,7 +87,7 @@ void setDefaultFractureColorResult()
|
||||
|
||||
for (RimStimPlanColors* const stimPlanColors : fractureColors)
|
||||
{
|
||||
stimPlanColors->setDefaultResultNameForStimPlan();
|
||||
stimPlanColors->setDefaultResultName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ RimFractureTemplateCollection::~RimFractureTemplateCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<QString, QString> > RimFractureTemplateCollection::stimPlanResultNamesAndUnits() const
|
||||
std::vector<std::pair<QString, QString> > RimFractureTemplateCollection::resultNamesAndUnits() const
|
||||
{
|
||||
std::set<std::pair<QString, QString> > nameSet;
|
||||
|
||||
@ -211,7 +211,7 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
{
|
||||
if (setAllShowMeshToFalseOnAllEclipseViews)
|
||||
{
|
||||
eclipseView->stimPlanColors->setShowStimPlanMesh(false);
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
|
||||
if (stimPlanFractureTemplatesInView.size() == 1)
|
||||
{
|
||||
eclipseView->stimPlanColors->setShowStimPlanMesh(templateIt->first->showStimPlanMesh());
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(templateIt->first->showStimPlanMesh());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,11 +255,11 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
}
|
||||
if (anySetShowStimPlanMeshIsSetToFalse)
|
||||
{
|
||||
eclipseView->stimPlanColors->setShowStimPlanMesh(false);
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
eclipseView->stimPlanColors->setShowStimPlanMesh(true);
|
||||
eclipseView->fractureColors->setShowStimPlanMesh(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
caf::PdmChildArrayField<RimFractureTemplate*> fractureDefinitions;
|
||||
caf::PdmField< RiaEclipseUnitTools::UnitSystemType > defaultUnitsForFracTemplates;
|
||||
|
||||
std::vector<std::pair<QString, QString> > stimPlanResultNamesAndUnits() const;
|
||||
std::vector<std::pair<QString, QString> > resultNamesAndUnits() const;
|
||||
void computeMinMax(const QString& uiResultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
||||
|
||||
void loadAndUpdateData();
|
||||
|
@ -278,7 +278,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
|
||||
// Todo: Must update all views using this fracture template
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (activeView) activeView->stimPlanColors->loadDataAndUpdate();
|
||||
if (activeView) activeView->fractureColors->loadDataAndUpdate();
|
||||
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView()
|
||||
rimEclipseView->cellEdgeResult()->enableCellEdgeColors = false;
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
rimEclipseView->stimPlanColors()->setDefaultResultNameForStimPlan();
|
||||
rimEclipseView->fractureColors()->setDefaultResultName();
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
}
|
||||
|
||||
|
@ -124,9 +124,9 @@ RimEclipseView::RimEclipseView()
|
||||
faultResultSettings.uiCapability()->setUiHidden(true);
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
CAF_PDM_InitFieldNoDefault(&stimPlanColors, "StimPlanColors", "Fracture", "", "", "");
|
||||
stimPlanColors = new RimStimPlanColors();
|
||||
stimPlanColors.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&fractureColors, "StimPlanColors", "Fracture", "", "", "");
|
||||
fractureColors = new RimStimPlanColors();
|
||||
fractureColors.uiCapability()->setUiHidden(true);
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wellCollection, "WellCollection", "Simulation Wells", "", "", "");
|
||||
@ -463,7 +463,7 @@ void RimEclipseView::createDisplayModel()
|
||||
// NB! StimPlan legend colors must be updated before well path geometry is added to the model
|
||||
// as the fracture geometry depends on the StimPlan legend colors
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
stimPlanColors->updateLegendData();
|
||||
fractureColors->updateLegendData();
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
|
||||
@ -771,7 +771,7 @@ void RimEclipseView::onLoadDataAndUpdate()
|
||||
|
||||
this->faultResultSettings()->customFaultResult()->loadResult();
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
this->stimPlanColors->loadDataAndUpdate();
|
||||
this->fractureColors->loadDataAndUpdate();
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
updateMdiWindowVisibility();
|
||||
@ -1047,12 +1047,12 @@ void RimEclipseView::updateLegends()
|
||||
}
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
RimLegendConfig* stimPlanLegend = stimPlanColors()->activeLegend();
|
||||
RimLegendConfig* stimPlanLegend = fractureColors()->activeLegend();
|
||||
if (stimPlanLegend)
|
||||
{
|
||||
stimPlanColors->updateLegendData();
|
||||
fractureColors->updateLegendData();
|
||||
|
||||
if (stimPlanColors()->isChecked() && stimPlanLegend->legend())
|
||||
if (fractureColors()->isChecked() && stimPlanLegend->legend())
|
||||
{
|
||||
m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->legend());
|
||||
}
|
||||
@ -1403,7 +1403,7 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
{
|
||||
if (!oilfield->fractureDefinitionCollection()->fractureDefinitions.empty())
|
||||
{
|
||||
uiTreeOrdering.add(stimPlanColors());
|
||||
uiTreeOrdering.add(fractureColors());
|
||||
}
|
||||
}
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
caf::PdmChildField<RimCellEdgeColors*> cellEdgeResult;
|
||||
caf::PdmChildField<RimEclipseFaultColors*> faultResultSettings;
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
caf::PdmChildField<RimStimPlanColors*> stimPlanColors;
|
||||
caf::PdmChildField<RimStimPlanColors*> fractureColors;
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
caf::PdmChildField<RimSimWellInViewCollection*> wellCollection;
|
||||
|
@ -56,7 +56,7 @@ namespace caf {
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Internal methods
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void setDefaultResultIfStimPlan(caf::PdmField<QString> &field);
|
||||
static void setDefaultFractureResult(caf::PdmField<QString> &field);
|
||||
static QString toString(const std::pair<QString, QString>& resultNameAndUnit);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -104,7 +104,7 @@ void RimStimPlanColors::loadDataAndUpdate()
|
||||
{
|
||||
RimFractureTemplateCollection* fractureTemplates = fractureTemplateCollection();
|
||||
|
||||
std::vector<std::pair<QString, QString> > resultNameAndUnits = fractureTemplates->stimPlanResultNamesAndUnits();
|
||||
std::vector<std::pair<QString, QString> > resultNameAndUnits = fractureTemplates->resultNamesAndUnits();
|
||||
|
||||
// Delete legends referencing results not present on file
|
||||
{
|
||||
@ -178,7 +178,7 @@ QList<caf::PdmOptionItemInfo> RimStimPlanColors::calculateValueOptions(const caf
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo("None", ""));
|
||||
|
||||
for (auto resultNameAndUnit : fractureTemplates->stimPlanResultNamesAndUnits())
|
||||
for (auto resultNameAndUnit : fractureTemplates->resultNamesAndUnits())
|
||||
{
|
||||
QString resultNameAndUnitString = toString(resultNameAndUnit);
|
||||
options.push_back(caf::PdmOptionItemInfo(resultNameAndUnitString, resultNameAndUnitString));
|
||||
@ -253,9 +253,9 @@ QString RimStimPlanColors::uiResultName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanColors::setDefaultResultNameForStimPlan()
|
||||
void RimStimPlanColors::setDefaultResultName()
|
||||
{
|
||||
setDefaultResultIfStimPlan(m_resultNameAndUnit);
|
||||
setDefaultFractureResult(m_resultNameAndUnit);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -332,7 +332,7 @@ void RimStimPlanColors::updateConductivityResultName()
|
||||
if (m_resultNameAndUnit().contains("conductivity", Qt::CaseInsensitive))
|
||||
{
|
||||
RimFractureTemplateCollection* fractureTemplates = fractureTemplateCollection();
|
||||
for (auto resultNameAndUnit : fractureTemplates->stimPlanResultNamesAndUnits())
|
||||
for (auto resultNameAndUnit : fractureTemplates->resultNamesAndUnits())
|
||||
{
|
||||
if (resultNameAndUnit.first.contains("conductivity", Qt::CaseInsensitive))
|
||||
{
|
||||
@ -447,7 +447,7 @@ QString toString(const std::pair<QString, QString>& resultNameAndUnit)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void setDefaultResultIfStimPlan(caf::PdmField<QString> &field)
|
||||
void setDefaultFractureResult(caf::PdmField<QString> &field)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
@ -459,7 +459,7 @@ void setDefaultResultIfStimPlan(caf::PdmField<QString> &field)
|
||||
{
|
||||
RimFractureTemplateCollection* templColl = proj->allFractureTemplateCollections().front();
|
||||
|
||||
for (auto resultNameAndUnit : templColl->stimPlanResultNamesAndUnits())
|
||||
for (auto resultNameAndUnit : templColl->resultNamesAndUnits())
|
||||
{
|
||||
if (resultNameAndUnit.first.contains(RiaDefines::conductivityResultName(), Qt::CaseInsensitive))
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
|
||||
RimLegendConfig* activeLegend() const;
|
||||
QString uiResultName() const;
|
||||
void setDefaultResultNameForStimPlan();
|
||||
void setDefaultResultName();
|
||||
QString unit() const;
|
||||
cvf::Color3f defaultColor() const;
|
||||
bool showStimPlanMesh() const { return m_showStimPlanMesh; }
|
||||
|
Loading…
Reference in New Issue
Block a user