mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1891 StimPlan : Add support for "Conductivity-propped"
This commit is contained in:
@@ -217,7 +217,7 @@ void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
{
|
||||
//first option: Width
|
||||
// first option: Width
|
||||
for (std::pair<QString, QString> property : resultNamesWithUnit())
|
||||
{
|
||||
if (property.first == "WIDTH")
|
||||
@@ -226,16 +226,15 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//if width not found, use conductivity
|
||||
for (std::pair<QString, QString> property : resultNamesWithUnit())
|
||||
|
||||
// if width not found, use conductivity
|
||||
if (hasConductivity())
|
||||
{
|
||||
if (property.first == "CONDUCTIVITY")
|
||||
{
|
||||
m_borderPolygonResultName = property.first;
|
||||
return true;
|
||||
}
|
||||
m_borderPolygonResultName = m_stimPlanFractureDefinitionData->conductivityResultName();
|
||||
return true;
|
||||
}
|
||||
//else: Set to first property
|
||||
|
||||
// else: Set to first property
|
||||
if (resultNamesWithUnit().size() > 0)
|
||||
{
|
||||
m_borderPolygonResultName = resultNamesWithUnit()[0].first;
|
||||
@@ -391,6 +390,20 @@ std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QStri
|
||||
return m_stimPlanFractureDefinitionData->fractureGridResults(resultName, unitName, timeStepIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::hasConductivity() const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull() &&
|
||||
!m_stimPlanFractureDefinitionData->conductivityResultName().isEmpty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void computeMinMax(const QString& resultName, const QString& unitName, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
||||
std::vector<std::vector<double>> resultValues(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||
bool hasConductivity() const;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
Reference in New Issue
Block a user