mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1339 - pre-proto - Extracting function for azimuth angle of well
This commit is contained in:
parent
d15d1a03a1
commit
96372c9077
@ -81,8 +81,8 @@ void RimSimWellFracture::updateAzimuthFromFractureDefinition()
|
||||
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation== RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
updateBranchGeometry();
|
||||
double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle(fracturePosition());
|
||||
double simWellAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH )
|
||||
{
|
||||
azimuth = simWellAzimuth;
|
||||
@ -100,6 +100,16 @@ void RimSimWellFracture::updateAzimuthFromFractureDefinition()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimSimWellFracture::wellAzimuthAtFracturePosition()
|
||||
{
|
||||
updateBranchGeometry();
|
||||
double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle(fracturePosition());
|
||||
return simWellAzimuth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
void updateFracturePositionFromLocation();
|
||||
void updateAzimuthFromFractureDefinition() override;
|
||||
|
||||
double wellAzimuthAtFracturePosition() override;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
@ -96,15 +96,8 @@ void RimWellPathFracture::updateAzimuthFromFractureDefinition()
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
|
||||
if (!objHandle) return;
|
||||
double wellPathAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPath);
|
||||
if (!wellPath) return;
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
double wellPathAzimuth = wellPathGeometry->wellPathAzimuthAngle(fracturePosition());
|
||||
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
azimuth = wellPathAzimuth;
|
||||
@ -122,6 +115,23 @@ void RimWellPathFracture::updateAzimuthFromFractureDefinition()
|
||||
// }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathFracture::wellAzimuthAtFracturePosition()
|
||||
{
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
|
||||
if (!objHandle) return cvf::UNDEFINED_DOUBLE;
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPath);
|
||||
if (!wellPath) return cvf::UNDEFINED_DOUBLE;
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
double wellPathAzimuth = wellPathGeometry->wellPathAzimuthAngle(fracturePosition());
|
||||
return wellPathAzimuth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void updateAzimuthFromFractureDefinition() override;
|
||||
|
||||
double wellAzimuthAtFracturePosition() override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
|
||||
|
Loading…
Reference in New Issue
Block a user