Finds the global maximum of a 1D b-spline on . See db1min for the method, and for discontinuous splines.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
knot array |
|
| integer(kind=ip), | intent(in) | :: | nx |
number of b-spline coefficients |
||
| integer(kind=ip), | intent(in) | :: | kx |
order of the b-spline, |
||
| real(kind=wp), | intent(in), | dimension(nx) | :: | bcoef |
b-spline coefficient array |
|
| real(kind=wp), | intent(in) | :: | xa |
left end of the interval, in |
||
| real(kind=wp), | intent(in) | :: | xb |
right end of the interval, in |
||
| real(kind=wp), | intent(out) | :: | xmax |
location of the maximum |
||
| real(kind=wp), | intent(out) | :: | fmax |
maximum value of the spline |
||
| integer(kind=ip), | intent(out) | :: | iflag |
status flag (see db1min) |
pure subroutine db1max(tx,nx,kx,bcoef,xa,xb,xmax,fmax,iflag) implicit none integer(ip),intent(in) :: nx !! number of b-spline coefficients integer(ip),intent(in) :: kx !! order of the b-spline, `kx >= 2` real(wp),dimension(nx+kx),intent(in) :: tx !! knot array real(wp),dimension(nx),intent(in) :: bcoef !! b-spline coefficient array real(wp),intent(in) :: xa !! left end of the interval, in `t(kx) <= x <= t(nx+1)` real(wp),intent(in) :: xb !! right end of the interval, in `t(kx) <= x <= t(nx+1)` real(wp),intent(out) :: xmax !! location of the maximum real(wp),intent(out) :: fmax !! maximum value of the spline integer(ip),intent(out) :: iflag !! status flag (see [[db1min]]) call db1extremum(tx,nx,kx,bcoef,xa,xb,.true.,xmax,fmax,iflag) end subroutine db1max