The control points of a bspline_1d: the Greville abscissae (see greville_abscissae) and the b-spline coefficients.
The spline lies within the convex hull of its control points, and the control polygon (the control points joined by straight lines) approximates the spline.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bspline_1d), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(out), | dimension(:), allocatable | :: | x |
|
|
| real(kind=wp), | intent(out), | dimension(:), allocatable | :: | y |
|
|
| integer(kind=ip), | intent(out) | :: | iflag |
status flag: 0 if no errors, 1 if the class is not initialized |
pure subroutine control_points_1d(me,x,y,iflag) implicit none class(bspline_1d),intent(inout) :: me real(wp),dimension(:),allocatable,intent(out) :: x !! `(nx)` locations of the control points !! (the Greville abscissae) real(wp),dimension(:),allocatable,intent(out) :: y !! `(nx)` values of the control points !! (the b-spline coefficients) integer(ip),intent(out) :: iflag !! status flag: 0 if no errors, !! 1 if the class is not initialized if (me%initialized .and. me%nf/=1_ip) then iflag = 6003_ip ! use the multiple-output version allocate(x(0), y(0)) else if (me%initialized) then allocate(x(me%nx)) call greville_abscissae(me%tx,me%nx,me%kx,x) y = me%bcoef(:,1) iflag = 0_ip else allocate(x(0), y(0)) iflag = 1_ip end if me%iflag = iflag end subroutine control_points_1d