mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
(#675) Addjusted default extent when we have a small reservoir.
This commit is contained in:
parent
c86bb47fa9
commit
2bf6771da0
@ -30,6 +30,7 @@
|
||||
|
||||
#include "RivCrossSectionPartMgr.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RimCase.h"
|
||||
|
||||
|
||||
namespace caf {
|
||||
@ -106,14 +107,6 @@ void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
{
|
||||
m_wellBranchCenterlines.clear();
|
||||
updateWellCenterline();
|
||||
if (m_wellBranchCenterlines.size())
|
||||
{
|
||||
cvf::Vec3d wellLength = m_wellBranchCenterlines[0].front() - m_wellBranchCenterlines[0].back();
|
||||
if (wellLength.length() < 200)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
m_branchIndex = -1;
|
||||
}
|
||||
}
|
||||
@ -147,6 +140,7 @@ void RimCrossSection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
// User defined poly line
|
||||
}
|
||||
|
||||
updateWellExtentDefaultValue();
|
||||
|
||||
uiOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
@ -382,3 +376,21 @@ void RimCrossSection::addExtents(std::vector<cvf::Vec3d> &polyLine) const
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::updateWellExtentDefaultValue()
|
||||
{
|
||||
RimCase* ownerCase = NULL;
|
||||
firstAnchestorOrThisOfType(ownerCase);
|
||||
|
||||
if (ownerCase)
|
||||
{
|
||||
cvf::BoundingBox caseBB = ownerCase->activeCellsBoundingBox();
|
||||
if (m_extentLength == m_extentLength.defaultValue() && caseBB.radius() < 1000)
|
||||
{
|
||||
m_extentLength = caseBB.radius() * 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,7 @@ private:
|
||||
|
||||
RimEclipseWellCollection* simulationWellCollection();
|
||||
void updateWellCenterline() const;
|
||||
void updateWellExtentDefaultValue();
|
||||
|
||||
private:
|
||||
cvf::ref<RivCrossSectionPartMgr> m_crossSectionPartMgr;
|
||||
|
Loading…
Reference in New Issue
Block a user