mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1230 Removed obsolete legend structures
This commit is contained in:
parent
a29f325125
commit
6c5410f41a
@ -38,7 +38,6 @@
|
|||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimEllipseFractureTemplate.h"
|
#include "RimEllipseFractureTemplate.h"
|
||||||
#include "RimFractureTemplateCollection.h"
|
#include "RimFractureTemplateCollection.h"
|
||||||
#include "RimLegendConfig.h"
|
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimReservoirCellResultsStorage.h"
|
#include "RimReservoirCellResultsStorage.h"
|
||||||
@ -86,7 +85,6 @@ RimFracture::RimFracture(void)
|
|||||||
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "PerforationLength", "", "", "");
|
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "PerforationLength", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&stimPlanParameterToPlot, "parameterToPlot", QString(""), "Parameter from StimPlan file to plot", "", "", "");
|
|
||||||
CAF_PDM_InitField(&stimPlanTimeIndexToPlot, "timeIndexToPlot", 0, "Timestep from StimPlan file to plot", "", "", "");
|
CAF_PDM_InitField(&stimPlanTimeIndexToPlot, "timeIndexToPlot", 0, "Timestep from StimPlan file to plot", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_i, "I", 1, "Fracture location cell I", "", "", "");
|
CAF_PDM_InitField(&m_i, "I", 1, "Fracture location cell I", "", "", "");
|
||||||
@ -102,15 +100,6 @@ RimFracture::RimFracture(void)
|
|||||||
m_displayIJK.registerGetMethod(this, &RimFracture::createOneBasedIJK);
|
m_displayIJK.registerGetMethod(this, &RimFracture::createOneBasedIJK);
|
||||||
m_displayIJK.uiCapability()->setUiReadOnly(true);
|
m_displayIJK.uiCapability()->setUiReadOnly(true);
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_legendConfigPermeability, "LegendConfigPerm", "LegendConfigPerm", "", "", "");
|
|
||||||
m_legendConfigPermeability = new RimLegendConfig;
|
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_legendConfigConductivity, "LegendConfigCond", "LegendConfigCond", "", "", "");
|
|
||||||
m_legendConfigConductivity = new RimLegendConfig;
|
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_legendConfigWidth, "LegendConfigWidth", "LegendConfigWidth", "", "", "");
|
|
||||||
m_legendConfigWidth = new RimLegendConfig;
|
|
||||||
|
|
||||||
m_rigFracture = new RigFracture;
|
m_rigFracture = new RigFracture;
|
||||||
m_recomputeGeometry = true;
|
m_recomputeGeometry = true;
|
||||||
|
|
||||||
@ -122,13 +111,6 @@ RimFracture::RimFracture(void)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimFracture::~RimFracture()
|
RimFracture::~RimFracture()
|
||||||
{
|
{
|
||||||
delete m_legendConfigConductivity;
|
|
||||||
delete m_legendConfigPermeability;
|
|
||||||
delete m_legendConfigWidth;
|
|
||||||
|
|
||||||
m_legendConfigConductivity = nullptr;
|
|
||||||
m_legendConfigPermeability = nullptr;
|
|
||||||
m_legendConfigWidth = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -191,7 +173,6 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
|||||||
|
|
||||||
if (changedField == &azimuth ||
|
if (changedField == &azimuth ||
|
||||||
changedField == &m_fractureTemplate ||
|
changedField == &m_fractureTemplate ||
|
||||||
changedField == &stimPlanParameterToPlot ||
|
|
||||||
changedField == &stimPlanTimeIndexToPlot)
|
changedField == &stimPlanTimeIndexToPlot)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -623,22 +604,6 @@ QList<caf::PdmOptionItemInfo> RimFracture::calculateValueOptions(const caf::PdmF
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &stimPlanParameterToPlot)
|
|
||||||
{
|
|
||||||
RimFractureTemplate* fracTemplate = attachedFractureDefinition();
|
|
||||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
|
||||||
{
|
|
||||||
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
|
||||||
std::vector<std::pair<QString, QString>> properties = fracTemplateStimPlan->getStimPlanPropertyNamesUnits();
|
|
||||||
|
|
||||||
for (std::pair<QString, QString> propNameUnit : properties)
|
|
||||||
{
|
|
||||||
QString nameAndUnit = propNameUnit.first + " [" + propNameUnit.second + "]";
|
|
||||||
QString name = propNameUnit.first;
|
|
||||||
options.push_back(caf::PdmOptionItemInfo(nameAndUnit, name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
@ -666,23 +631,16 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
|||||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||||
{
|
{
|
||||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(false);
|
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(false);
|
||||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
||||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
||||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -706,12 +664,6 @@ void RimFracture::defineEditorAttribute(const caf::PdmFieldHandle* field, QStrin
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimFracture::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
void RimFracture::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||||
{
|
{
|
||||||
//TODO
|
|
||||||
uiTreeOrdering.add(m_legendConfigConductivity);
|
|
||||||
// uiTreeOrdering.add(m_legendConfigPermeability);
|
|
||||||
// uiTreeOrdering.add(m_legendConfigWidth);
|
|
||||||
|
|
||||||
uiTreeOrdering.setForgetRemainingFields(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -795,18 +747,6 @@ RivWellFracturePartMgr* RimFracture::fracturePartManager()
|
|||||||
return m_rivFracture.p();
|
return m_rivFracture.p();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
RimLegendConfig* RimFracture::activeLegend()
|
|
||||||
{
|
|
||||||
// if (stimPlanParameterToPlot == RimFracture::CONDUCTIVITY) return m_legendConfigConductivity;
|
|
||||||
// else if (stimPlanParameterToPlot == RimFracture::PERMEABILITY) return m_legendConfigPermeability;
|
|
||||||
// else if (stimPlanParameterToPlot == RimFracture::WIDTH) return m_legendConfigWidth;
|
|
||||||
// return nullptr;
|
|
||||||
|
|
||||||
return m_legendConfigConductivity;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
@ -40,7 +40,6 @@ class RigFracture;
|
|||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
class RimEllipseFractureTemplate;
|
class RimEllipseFractureTemplate;
|
||||||
class RivWellFracturePartMgr;
|
class RivWellFracturePartMgr;
|
||||||
class RimLegendConfig;
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -59,8 +58,6 @@ public:
|
|||||||
caf::PdmField<double> perforationLength;
|
caf::PdmField<double> perforationLength;
|
||||||
|
|
||||||
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
||||||
caf::PdmField<QString> stimPlanParameterToPlot;
|
|
||||||
|
|
||||||
|
|
||||||
cvf::Vec3d anchorPosition();
|
cvf::Vec3d anchorPosition();
|
||||||
void setAnchorPosition(const cvf::Vec3d& pos);
|
void setAnchorPosition(const cvf::Vec3d& pos);
|
||||||
@ -74,7 +71,6 @@ public:
|
|||||||
RimFractureTemplate* attachedFractureDefinition() const;
|
RimFractureTemplate* attachedFractureDefinition() const;
|
||||||
|
|
||||||
RivWellFracturePartMgr* fracturePartManager();
|
RivWellFracturePartMgr* fracturePartManager();
|
||||||
RimLegendConfig* activeLegend();
|
|
||||||
|
|
||||||
bool hasValidGeometry() const;
|
bool hasValidGeometry() const;
|
||||||
void computeGeometry();
|
void computeGeometry();
|
||||||
@ -122,8 +118,4 @@ private:
|
|||||||
caf::PdmField<int> m_k; // Zero based indexing
|
caf::PdmField<int> m_k; // Zero based indexing
|
||||||
|
|
||||||
cvf::ref<RivWellFracturePartMgr> m_rivFracture;
|
cvf::ref<RivWellFracturePartMgr> m_rivFracture;
|
||||||
|
|
||||||
caf::PdmChildField<RimLegendConfig*> m_legendConfigPermeability;
|
|
||||||
caf::PdmChildField<RimLegendConfig*> m_legendConfigConductivity;
|
|
||||||
caf::PdmChildField<RimLegendConfig*> m_legendConfigWidth;
|
|
||||||
};
|
};
|
||||||
|
@ -165,7 +165,6 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
|||||||
|
|
||||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||||
propertyGroup->add(&m_fractureTemplate);
|
propertyGroup->add(&m_fractureTemplate);
|
||||||
propertyGroup->add(&stimPlanParameterToPlot);
|
|
||||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||||
propertyGroup->add(&perforationLength);
|
propertyGroup->add(&perforationLength);
|
||||||
|
|
||||||
|
@ -52,9 +52,6 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate(void)
|
|||||||
|
|
||||||
CAF_PDM_InitField(&wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Depth of Well Path at Fracture", "", "", "");
|
CAF_PDM_InitField(&wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Depth of Well Path at Fracture", "", "", "");
|
||||||
wellPathDepthAtFracture.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
wellPathDepthAtFracture.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_legendConfigurations, "LegendConfigurations", "", "", "", "");
|
|
||||||
m_legendConfigurations.uiCapability()->setUiTreeHidden(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -255,50 +252,6 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
|||||||
readStimPlanXMLFile(&errorMessage);
|
readStimPlanXMLFile(&errorMessage);
|
||||||
qDebug() << errorMessage;
|
qDebug() << errorMessage;
|
||||||
|
|
||||||
std::vector<QString> resultNames = m_stimPlanFractureDefinitionData->resultNames();
|
|
||||||
|
|
||||||
// Delete legends referencing results not present on file
|
|
||||||
{
|
|
||||||
std::vector<RimStimPlanLegendConfig*> toBeDeleted;
|
|
||||||
for (RimStimPlanLegendConfig* legend : m_legendConfigurations)
|
|
||||||
{
|
|
||||||
QString legendName = legend->name();
|
|
||||||
if (std::find(resultNames.begin(), resultNames.end(), legendName) == resultNames.end())
|
|
||||||
{
|
|
||||||
toBeDeleted.push_back(legend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto legend : toBeDeleted)
|
|
||||||
{
|
|
||||||
m_legendConfigurations.removeChildObject(legend);
|
|
||||||
|
|
||||||
delete legend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create legend for result if not already present
|
|
||||||
for (auto resultName : resultNames)
|
|
||||||
{
|
|
||||||
bool foundResult = false;
|
|
||||||
|
|
||||||
for (RimStimPlanLegendConfig* legend : m_legendConfigurations)
|
|
||||||
{
|
|
||||||
if (legend->name().compare(resultName) == 0)
|
|
||||||
{
|
|
||||||
foundResult = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!foundResult)
|
|
||||||
{
|
|
||||||
RimStimPlanLegendConfig* legendConfig = new RimStimPlanLegendConfig();
|
|
||||||
legendConfig->setName(resultName);
|
|
||||||
|
|
||||||
m_legendConfigurations.push_back(legendConfig);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateConnectedEditors();
|
updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +91,6 @@ private:
|
|||||||
caf::PdmField<QString> m_stimPlanFileName;
|
caf::PdmField<QString> m_stimPlanFileName;
|
||||||
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimStimPlanLegendConfig*> m_legendConfigurations;
|
|
||||||
|
|
||||||
bool numberOfParameterValuesOK(std::vector<std::vector<double>> propertyValuesAtTimestep);
|
bool numberOfParameterValuesOK(std::vector<std::vector<double>> propertyValuesAtTimestep);
|
||||||
void setDepthOfWellPathAtFracture();
|
void setDepthOfWellPathAtFracture();
|
||||||
};
|
};
|
||||||
|
@ -158,7 +158,6 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
|||||||
|
|
||||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||||
propertyGroup->add(&m_fractureTemplate);
|
propertyGroup->add(&m_fractureTemplate);
|
||||||
propertyGroup->add(&stimPlanParameterToPlot);
|
|
||||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||||
propertyGroup->add(&perforationLength);
|
propertyGroup->add(&perforationLength);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user