All the roots of for a bspline_1d. This is a wrapper for db1root.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bspline_1d), | intent(inout) | :: | me |
the spline |
||
| real(kind=wp), | intent(in) | :: | a |
the value to solve for |
||
| real(kind=wp), | intent(out), | dimension(:), allocatable | :: | x |
the roots, in increasing order (size 0 if there are none) |
|
| integer(kind=ip), | intent(out) | :: | iflag |
status flag (see db1root) |
pure subroutine roots_1d(me,a,x,iflag) implicit none class(bspline_1d),intent(inout) :: me !! the spline real(wp),intent(in) :: a !! the value to solve for real(wp),dimension(:),allocatable,intent(out) :: x !! the roots, in increasing order !! (size 0 if there are none) integer(ip),intent(out) :: iflag !! status flag (see [[db1root]]) if (me%initialized .and. me%nf/=1_ip) then iflag = 6003_ip ! use the multiple-output version allocate(x(0)) else if (me%initialized) then call db1root(me%tx,me%nx,me%kx,me%bcoef(:,1),a,x,iflag) else allocate(x(0)) iflag = 1_ip end if me%iflag = iflag end subroutine roots_1d