mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix invalid MD interpolation for wells starting at zero depth.
The interpolation procedure adds a point at zero depth. If the well already had a starting point there the interpolation would set all MD values to zero. Fixed by adding the zero point only when necessary.
This commit is contained in:
committed by
Magne Sjaastad
parent
85ba3a3bc9
commit
b0448043f3
@@ -322,9 +322,10 @@ QwtSpline RigWellPathGeometryTools::createSpline( const std::vector<double>& ori
|
||||
QwtSplineCurveFitter curveFitter;
|
||||
QPolygonF splinePoints = curveFitter.fitCurve( polygon );
|
||||
|
||||
// Extend spline from 0.0 to a large value for MD
|
||||
// Extend spline from 0.0 (if it does not already exist) to a large value for MD
|
||||
// This is to force a specific and known extrapolation.
|
||||
// Otherwise we get an undefined and unknown extrapolation.
|
||||
if ( !( splinePoints[0].x() == 0.0 && splinePoints[0].y() == 0.0 ) )
|
||||
{
|
||||
double x1 = splinePoints[0].x();
|
||||
double x2 = splinePoints[1].x();
|
||||
|
||||
Reference in New Issue
Block a user