mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
#7088 Add option to reread "Well/Fracture Intersection Depth" from XML.
Default is now to read the contour xml file and update the parameter, but older projects are left unchanged. Closes #7088.
This commit is contained in:
1 parent
c30f930886
commit
193b1e4826
2 files changed
+36
No files matched your search
@@ -75,6 +75,9 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
||||
CAF_PDM_InitField(&m_wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Well/Fracture Intersection Depth", "", "", "");
|
||||
m_wellPathDepthAtFracture.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_useUserDefinedWellPathDepthAtFracture, "UseUserDefinedWellPathDepthAtFracture", false,
|
||||
"Use User-Defined Well/Fracture Intersection Depth", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_borderPolygonResultName, "BorderPolygonResultName", QString(""), "Parameter", "", "", "");
|
||||
m_borderPolygonResultName.uiCapability()->setUiHidden(true);
|
||||
|
||||
@@ -122,6 +125,16 @@ void RimStimPlanFractureTemplate::fieldChangedByUi( const caf::PdmFieldHandle* c
|
||||
setDefaultsBasedOnXMLfile();
|
||||
}
|
||||
|
||||
if ( &m_useUserDefinedWellPathDepthAtFracture == changedField )
|
||||
{
|
||||
if ( m_useUserDefinedWellPathDepthAtFracture )
|
||||
{
|
||||
m_readError = false;
|
||||
loadDataAndUpdate();
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
if ( &m_activeTimeStepIndex == changedField )
|
||||
{
|
||||
// Changes to this parameters should change all fractures with this fracture template attached.
|
||||
@@ -276,6 +289,11 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
setUnitSystem( m_stimPlanFractureDefinitionData->unitSet() );
|
||||
}
|
||||
|
||||
if ( m_useUserDefinedWellPathDepthAtFracture )
|
||||
{
|
||||
computeDepthOfWellPathAtFracture();
|
||||
}
|
||||
|
||||
m_readError = false;
|
||||
}
|
||||
else
|
||||
@@ -1036,7 +1054,10 @@ void RimStimPlanFractureTemplate::defineUiOrdering( QString uiConfigName, caf::P
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Input" );
|
||||
group->add( &m_stimPlanFileName );
|
||||
group->add( &m_activeTimeStepIndex );
|
||||
group->add( &m_useUserDefinedWellPathDepthAtFracture );
|
||||
group->add( &m_wellPathDepthAtFracture );
|
||||
|
||||
m_wellPathDepthAtFracture.uiCapability()->setUiReadOnly( m_useUserDefinedWellPathDepthAtFracture() );
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1101,3 +1122,14 @@ void RimStimPlanFractureTemplate::defineEditorAttribute( const caf::PdmFieldHand
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::initAfterRead()
|
||||
{
|
||||
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2020.10.0" ) )
|
||||
{
|
||||
m_useUserDefinedWellPathDepthAtFracture = true;
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,9 @@ public:
|
||||
|
||||
void convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit ) override;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
@@ -125,6 +128,7 @@ private:
|
||||
caf::PdmField<QString> m_conductivityResultNameOnFile;
|
||||
|
||||
caf::PdmField<double> m_wellPathDepthAtFracture;
|
||||
caf::PdmField<bool> m_useUserDefinedWellPathDepthAtFracture;
|
||||
caf::PdmField<QString> m_borderPolygonResultName;
|
||||
|
||||
caf::PdmField<caf::FilePath> m_stimPlanFileName;
|
||||
|
||||
Reference in new issue
Block a user