Skip to content
ForCADDocumentation

nearest_spline_point Subroutine

public pure subroutine nearest_spline_point(Xc, Wc, nc, degree, knot1, point, tol, maxit, nearest_Xt, nearest_Xg, err, knot2, knot3, initial_Xt, wrap)

Stream span-aware seeds, then minimize distance with local spline jets. Work is support-sized; knots and physical offsets use independent radix gauges. Full breaks bound the selected continuous component. This is a local candidate, not a global certificate. Armijo (1966), Bertsekas (1982), Piegl--Tiller sec.6.1.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: Xc(:,:)
real(kind=rk), intent(in), allocatable :: Wc(:)
integer, intent(in) :: nc(:)
integer, intent(in) :: degree(:)
real(kind=rk), intent(in) :: knot1(:)
real(kind=rk), intent(in) :: point(:)
real(kind=rk), intent(in) :: tol
integer, intent(in) :: maxit
real(kind=rk), intent(out) :: nearest_Xt(:)
real(kind=rk), intent(out), optional :: nearest_Xg(:)
type(debug), intent(inout) :: err
real(kind=rk), intent(in), optional :: knot2(:)
real(kind=rk), intent(in), optional :: knot3(:)
real(kind=rk), intent(in), optional :: initial_Xt(:)
logical, intent(in), optional :: wrap(:)