mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7309 Fracture: Add option to auto-update well/fracture intersection from template.
This commit is contained in:
committed by
Magne Sjaastad
parent
6fad32e734
commit
e2c7d11049
@@ -116,6 +116,14 @@ RimFracture::RimFracture()
|
|||||||
m_createStimPlanFractureTemplate.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
m_createStimPlanFractureTemplate.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
||||||
m_createStimPlanFractureTemplate.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
m_createStimPlanFractureTemplate.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||||
|
|
||||||
|
CAF_PDM_InitField( &m_autoUpdateWellPathDepthAtFractureFromTemplate,
|
||||||
|
"AutoUpdateWellPathDepthAtFractureFromTemplate",
|
||||||
|
true,
|
||||||
|
"Auto-Update From Template",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Well/Fracture Intersection Depth", "", "", "" );
|
CAF_PDM_InitField( &m_wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Well/Fracture Intersection Depth", "", "", "" );
|
||||||
m_wellPathDepthAtFracture.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
m_wellPathDepthAtFracture.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||||
|
|
||||||
@@ -270,6 +278,16 @@ void RimFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedField, con
|
|||||||
RicNewStimPlanFractureTemplateFeature::createNewTemplateForFractureAndUpdate( this );
|
RicNewStimPlanFractureTemplateFeature::createNewTemplateForFractureAndUpdate( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if ( changedField == &m_autoUpdateWellPathDepthAtFractureFromTemplate )
|
||||||
|
{
|
||||||
|
if ( m_autoUpdateWellPathDepthAtFractureFromTemplate && m_fractureTemplate() )
|
||||||
|
{
|
||||||
|
m_wellPathDepthAtFracture = m_fractureTemplate->wellPathDepthAtFracture();
|
||||||
|
}
|
||||||
|
updateFractureGrid();
|
||||||
|
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
else if ( changedField == &m_wellPathDepthAtFracture )
|
else if ( changedField == &m_wellPathDepthAtFracture )
|
||||||
{
|
{
|
||||||
updateFractureGrid();
|
updateFractureGrid();
|
||||||
@@ -556,7 +574,18 @@ void RimFracture::setFractureTemplateNoUpdate( RimFractureTemplate* fractureTemp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_fractureTemplate )
|
||||||
|
{
|
||||||
|
m_fractureTemplate->wellPathDepthAtFractureChanged.disconnect( this );
|
||||||
|
}
|
||||||
|
|
||||||
m_fractureTemplate = fractureTemplate;
|
m_fractureTemplate = fractureTemplate;
|
||||||
|
|
||||||
|
if ( m_fractureTemplate )
|
||||||
|
{
|
||||||
|
m_fractureTemplate->wellPathDepthAtFractureChanged.connect( this,
|
||||||
|
&RimFracture::onWellPathDepthAtFractureInTemplateChanged );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -948,4 +977,23 @@ void RimFracture::initAfterRead()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_fractureTemplate() )
|
||||||
|
{
|
||||||
|
m_fractureTemplate->wellPathDepthAtFractureChanged.connect( this,
|
||||||
|
&RimFracture::onWellPathDepthAtFractureInTemplateChanged );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFracture::onWellPathDepthAtFractureInTemplateChanged( const caf::SignalEmitter* emitter, double newDepth )
|
||||||
|
{
|
||||||
|
if ( m_autoUpdateWellPathDepthAtFractureFromTemplate )
|
||||||
|
{
|
||||||
|
m_wellPathDepthAtFracture = newDepth;
|
||||||
|
updateFractureGrid();
|
||||||
|
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -157,11 +157,14 @@ private:
|
|||||||
|
|
||||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||||
|
|
||||||
|
void onWellPathDepthAtFractureInTemplateChanged( const caf::SignalEmitter* emitter, double newDepth );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
caf::PdmPtrField<RimFractureTemplate*> m_fractureTemplate;
|
caf::PdmPtrField<RimFractureTemplate*> m_fractureTemplate;
|
||||||
caf::PdmField<bool> m_editFractureTemplate;
|
caf::PdmField<bool> m_editFractureTemplate;
|
||||||
caf::PdmField<bool> m_createEllipseFractureTemplate;
|
caf::PdmField<bool> m_createEllipseFractureTemplate;
|
||||||
caf::PdmField<bool> m_createStimPlanFractureTemplate;
|
caf::PdmField<bool> m_createStimPlanFractureTemplate;
|
||||||
|
caf::PdmField<bool> m_autoUpdateWellPathDepthAtFractureFromTemplate;
|
||||||
caf::PdmField<double> m_wellPathDepthAtFracture;
|
caf::PdmField<double> m_wellPathDepthAtFracture;
|
||||||
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
|
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
|
||||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_fractureUnit;
|
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_fractureUnit;
|
||||||
|
@@ -107,6 +107,7 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimFractureTemplate, "RimFractureTemplate" );
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimFractureTemplate::RimFractureTemplate()
|
RimFractureTemplate::RimFractureTemplate()
|
||||||
|
: wellPathDepthAtFractureChanged( this )
|
||||||
{
|
{
|
||||||
CAF_PDM_InitObject( "Fracture Template", ":/FractureTemplate16x16.png", "", "" );
|
CAF_PDM_InitObject( "Fracture Template", ":/FractureTemplate16x16.png", "", "" );
|
||||||
|
|
||||||
@@ -348,6 +349,11 @@ void RimFractureTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( changedField == &m_wellPathDepthAtFracture )
|
||||||
|
{
|
||||||
|
wellPathDepthAtFractureChanged.send( newValue.toDouble() );
|
||||||
|
}
|
||||||
|
|
||||||
for ( RimFracture* fracture : fracturesUsingThisTemplate() )
|
for ( RimFracture* fracture : fracturesUsingThisTemplate() )
|
||||||
{
|
{
|
||||||
fracture->clearCachedNonDarcyProperties();
|
fracture->clearCachedNonDarcyProperties();
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "cafPdmFieldHandle.h"
|
#include "cafPdmFieldHandle.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
#include "cafPdmProxyValueField.h"
|
#include "cafPdmProxyValueField.h"
|
||||||
|
#include "cafSignal.h"
|
||||||
|
|
||||||
#include "cvfObject.h"
|
#include "cvfObject.h"
|
||||||
#include "cvfVector3.h"
|
#include "cvfVector3.h"
|
||||||
@@ -124,6 +125,8 @@ public:
|
|||||||
RimFractureTemplate();
|
RimFractureTemplate();
|
||||||
~RimFractureTemplate() override;
|
~RimFractureTemplate() override;
|
||||||
|
|
||||||
|
caf::Signal<double> wellPathDepthAtFractureChanged;
|
||||||
|
|
||||||
int id() const;
|
int id() const;
|
||||||
QString name() const;
|
QString name() const;
|
||||||
QString nameAndUnit() const;
|
QString nameAndUnit() const;
|
||||||
|
@@ -387,13 +387,13 @@ void RimStimPlanFractureTemplate::computeDepthOfWellPathAtFracture()
|
|||||||
|
|
||||||
if ( firstTvd != HUGE_VAL && lastTvd != HUGE_VAL )
|
if ( firstTvd != HUGE_VAL && lastTvd != HUGE_VAL )
|
||||||
{
|
{
|
||||||
m_wellPathDepthAtFracture = ( firstTvd + lastTvd ) / 2;
|
m_wellPathDepthAtFracture.setValueWithFieldChanged( ( firstTvd + lastTvd ) / 2 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstTvd = m_stimPlanFractureDefinitionData->minDepth();
|
firstTvd = m_stimPlanFractureDefinitionData->minDepth();
|
||||||
lastTvd = m_stimPlanFractureDefinitionData->maxDepth();
|
lastTvd = m_stimPlanFractureDefinitionData->maxDepth();
|
||||||
m_wellPathDepthAtFracture = ( firstTvd + lastTvd ) / 2;
|
m_wellPathDepthAtFracture.setValueWithFieldChanged( ( firstTvd + lastTvd ) / 2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -275,7 +275,9 @@ void RimWellPathFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde
|
|||||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup( "Fracture Center Info" );
|
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup( "Fracture Center Info" );
|
||||||
fractureCenterGroup->add( &m_uiAnchorPosition );
|
fractureCenterGroup->add( &m_uiAnchorPosition );
|
||||||
|
|
||||||
|
uiOrdering.add( &m_autoUpdateWellPathDepthAtFractureFromTemplate );
|
||||||
uiOrdering.add( &m_wellPathDepthAtFracture );
|
uiOrdering.add( &m_wellPathDepthAtFracture );
|
||||||
|
m_wellPathDepthAtFracture.uiCapability()->setUiReadOnly( m_autoUpdateWellPathDepthAtFractureFromTemplate() );
|
||||||
|
|
||||||
uiOrdering.skipRemainingFields( true );
|
uiOrdering.skipRemainingFields( true );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user