mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2483 Use update pattern of intersections when updating simwell fractures
This commit is contained in:
parent
db276fff03
commit
e39105503b
@ -66,7 +66,7 @@ RimSimWellFracture::~RimSimWellFracture()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::setClosestWellCoord(cvf::Vec3d& position, size_t branchIndex)
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
|
||||
double location = m_branchCenterLines[branchIndex].locationAlongWellCoords(position);
|
||||
|
||||
@ -81,7 +81,7 @@ void RimSimWellFracture::setClosestWellCoord(cvf::Vec3d& position, size_t branch
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
|
||||
if (!fractureTemplate()) return;
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|
||||
@ -117,7 +117,7 @@ double RimSimWellFracture::wellAzimuthAtFracturePosition() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimSimWellFracture::wellDipAtFracturePosition()
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
double simWellDip = m_branchCenterLines[m_branchIndex].simWellDipAngle(fracturePosition());
|
||||
return simWellDip;
|
||||
}
|
||||
@ -127,7 +127,7 @@ double RimSimWellFracture::wellDipAtFracturePosition()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::loadDataAndUpdate()
|
||||
{
|
||||
setBranchGeometry();
|
||||
computeSimWellBranchCenterLines();
|
||||
updateFracturePositionFromLocation();
|
||||
updateAzimuthBasedOnWellAzimuthAngle();
|
||||
}
|
||||
@ -190,7 +190,7 @@ void RimSimWellFracture::recomputeWellCenterlineCoordinates()
|
||||
{
|
||||
m_branchCenterLines.clear();
|
||||
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -198,7 +198,7 @@ void RimSimWellFracture::recomputeWellCenterlineCoordinates()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::updateFracturePositionFromLocation()
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
|
||||
if (m_branchCenterLines.size() > 0)
|
||||
{
|
||||
@ -258,7 +258,7 @@ void RimSimWellFracture::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
|
||||
if (myAttr)
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
|
||||
if (m_branchCenterLines.size() > 0)
|
||||
{
|
||||
@ -283,7 +283,7 @@ QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions(const ca
|
||||
{
|
||||
if (m_branchCenterLines.size() == 0)
|
||||
{
|
||||
updateBranchGeometry();
|
||||
computeSimWellBranchesIfRequired();
|
||||
}
|
||||
|
||||
if (m_branchCenterLines.size() > 0)
|
||||
@ -318,18 +318,18 @@ RigMainGrid* RimSimWellFracture::ownerCaseMainGrid() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::updateBranchGeometry()
|
||||
void RimSimWellFracture::computeSimWellBranchesIfRequired()
|
||||
{
|
||||
if (m_branchCenterLines.size() == 0)
|
||||
{
|
||||
setBranchGeometry();
|
||||
computeSimWellBranchCenterLines();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::setBranchGeometry()
|
||||
void RimSimWellFracture::computeSimWellBranchCenterLines()
|
||||
{
|
||||
m_branchCenterLines.clear();
|
||||
|
||||
|
@ -62,8 +62,8 @@ protected:
|
||||
RigMainGrid* ownerCaseMainGrid() const;
|
||||
|
||||
private:
|
||||
void updateBranchGeometry();
|
||||
void setBranchGeometry();
|
||||
void computeSimWellBranchesIfRequired();
|
||||
void computeSimWellBranchCenterLines();
|
||||
|
||||
private:
|
||||
caf::PdmField<float> m_location;
|
||||
|
@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
//
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -21,13 +21,10 @@
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimSimWellFractureCollection, "SimWellFractureCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSimWellFractureCollection::RimSimWellFractureCollection(void)
|
||||
{
|
||||
@ -38,18 +35,28 @@ RimSimWellFractureCollection::RimSimWellFractureCollection(void)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSimWellFractureCollection::~RimSimWellFractureCollection()
|
||||
{
|
||||
simwellFractures.deleteAllChildObjects();
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFractureCollection::deleteFractures()
|
||||
{
|
||||
simwellFractures.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFractureCollection::recomputeSimWellCenterlines()
|
||||
{
|
||||
for (RimSimWellFracture* frac : simwellFractures())
|
||||
{
|
||||
frac->recomputeWellCenterlineCoordinates();
|
||||
}
|
||||
}
|
||||
|
@ -40,4 +40,5 @@ public:
|
||||
|
||||
void deleteFractures();
|
||||
|
||||
void recomputeSimWellCenterlines();
|
||||
};
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
@ -470,10 +469,8 @@ void RimSimWellInViewCollection::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
for (RimSimWellInView* w : wells)
|
||||
{
|
||||
for (RimSimWellFracture* frac : w->simwellFractureCollection()->simwellFractures())
|
||||
{
|
||||
frac->recomputeWellCenterlineCoordinates();
|
||||
}
|
||||
w->simwellFractureCollection()->recomputeSimWellCenterlines();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user