mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 16:26:48 -06:00
#1138 - pre-proto - Added possibility to visualize all properties in input XML stimPlan file
This commit is contained in:
parent
e971c5276d
commit
1b99c25297
@ -118,21 +118,8 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor
|
||||
else return;
|
||||
|
||||
int timeStepIndex = m_rimFracture->stimPlanTimeIndexToPlot;
|
||||
std::vector<std::vector<double> > dataToPlot;
|
||||
|
||||
if (m_rimFracture->stimPlanParameterToPlot == RimFracture::CONDUCTIVITY)
|
||||
{
|
||||
dataToPlot = stimPlanFracTemplate->getConductivitiesAtTimeStep(timeStepIndex);
|
||||
}
|
||||
else if (m_rimFracture->stimPlanParameterToPlot == RimFracture::PERMEABILITY)
|
||||
{
|
||||
dataToPlot = stimPlanFracTemplate->getPermeabilitiesAtTimeStep(timeStepIndex);
|
||||
|
||||
}
|
||||
else if (m_rimFracture->stimPlanParameterToPlot == RimFracture::WIDTH)
|
||||
{
|
||||
dataToPlot = stimPlanFracTemplate->getWidthsAtTimeStep(timeStepIndex);
|
||||
}
|
||||
QString resultToPlot = m_rimFracture->stimPlanParameterToPlot;
|
||||
std::vector<std::vector<double> > dataToPlot = stimPlanFracTemplate->getDataAtTimeIndex(resultToPlot, timeStepIndex);
|
||||
|
||||
if (dataToPlot.empty()) return; //TODO: Set all values to undefined if no data available...
|
||||
|
||||
|
@ -63,21 +63,6 @@
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
|
||||
void caf::AppEnum< RimFracture::stimPlanPlotParameterEnum>::setUp()
|
||||
{
|
||||
addItem(RimFracture::CONDUCTIVITY, "Cond", "Conductivity");
|
||||
addItem(RimFracture::PERMEABILITY, "Perm", "Permeability");
|
||||
addItem(RimFracture::WIDTH, "Width", "Width");
|
||||
|
||||
setDefault(RimFracture::CONDUCTIVITY);
|
||||
}
|
||||
}
|
||||
|
||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimFracture, "Fracture");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -101,7 +86,7 @@ RimFracture::RimFracture(void)
|
||||
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "PerforationLength", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&stimPlanParameterToPlot, "parameterToPlot", caf::AppEnum<stimPlanPlotParameterEnum>(WIDTH), "Parameter from StimPlan file to plot", "", "", "");
|
||||
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(&m_i, "I", 1, "Fracture location cell I", "", "", "");
|
||||
@ -596,7 +581,6 @@ QString RimFracture::createOneBasedIJK() const
|
||||
return QString("Cell : [%1, %2, %3]").arg(m_i + 1).arg(m_j + 1).arg(m_k + 1);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -639,6 +623,22 @@ 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;
|
||||
}
|
||||
@ -706,10 +706,11 @@ void RimFracture::defineEditorAttribute(const caf::PdmFieldHandle* field, QStrin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||
{
|
||||
if (stimPlanParameterToPlot == RimFracture::CONDUCTIVITY) uiTreeOrdering.add(m_legendConfigConductivity);
|
||||
else if (stimPlanParameterToPlot == RimFracture::PERMEABILITY) uiTreeOrdering.add(m_legendConfigPermeability);
|
||||
else if (stimPlanParameterToPlot == RimFracture::WIDTH) uiTreeOrdering.add(m_legendConfigWidth);
|
||||
|
||||
//TODO
|
||||
uiTreeOrdering.add(m_legendConfigConductivity);
|
||||
// uiTreeOrdering.add(m_legendConfigPermeability);
|
||||
// uiTreeOrdering.add(m_legendConfigWidth);
|
||||
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
@ -799,11 +800,12 @@ RivWellFracturePartMgr* RimFracture::fracturePartManager()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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;
|
||||
// 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 nullptr;
|
||||
return m_legendConfigConductivity;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -54,18 +54,12 @@ public:
|
||||
RimFracture(void);
|
||||
virtual ~RimFracture(void);
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<double> azimuth;
|
||||
caf::PdmField<double> perforationLength;
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<double> azimuth;
|
||||
caf::PdmField<double> perforationLength;
|
||||
|
||||
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
||||
enum stimPlanPlotParameterEnum
|
||||
{
|
||||
CONDUCTIVITY,
|
||||
PERMEABILITY,
|
||||
WIDTH
|
||||
};
|
||||
caf::PdmField< caf::AppEnum< stimPlanPlotParameterEnum > > stimPlanParameterToPlot;
|
||||
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
||||
caf::PdmField<QString> stimPlanParameterToPlot;
|
||||
|
||||
|
||||
cvf::Vec3d anchorPosition();
|
||||
|
@ -300,6 +300,14 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::vector<double>> RimStimPlanFractureTemplate::getDataAtTimeIndex(QString resultName, size_t timeStepIndex)
|
||||
{
|
||||
return m_stimPlanFractureDefinitionData->getDataAtTimeIndex(resultName, timeStepIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -545,6 +553,20 @@ std::vector<double> RimStimPlanFractureTemplate::getStimPlanTimeValues()
|
||||
return m_stimPlanFractureDefinitionData->timeSteps;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<QString, QString> > RimStimPlanFractureTemplate::getStimPlanPropertyNamesUnits()
|
||||
{
|
||||
std::vector<RigStimPlanData > allStimPlanData = m_stimPlanFractureDefinitionData->stimPlanData;
|
||||
std::vector<std::pair<QString, QString> > propertyNamesUnits;
|
||||
for (RigStimPlanData stimPlanDataEntry : allStimPlanData)
|
||||
{
|
||||
propertyNamesUnits.push_back(std::make_pair(stimPlanDataEntry.resultName, stimPlanDataEntry.unit));
|
||||
}
|
||||
return propertyNamesUnits;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -62,6 +62,8 @@ public:
|
||||
std::vector<double> getNegAndPosXcoords();
|
||||
std::vector<double> adjustedDepthCoordsAroundWellPathPosition();
|
||||
std::vector<double> getStimPlanTimeValues();
|
||||
std::vector<std::pair<QString, QString> > getStimPlanPropertyNamesUnits();
|
||||
|
||||
|
||||
//TODO: Remove!!!
|
||||
std::vector<std::vector<double>> getConductivitiesAtTimeStep(size_t timStep);
|
||||
@ -70,6 +72,7 @@ public:
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
std::vector<std::vector<double>> getDataAtTimeIndex(QString resultName, size_t timeStepIndex);
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user