db1max Subroutine

public pure subroutine db1max(tx, nx, kx, bcoef, xa, xb, xmax, fmax, iflag)

Finds the global maximum of a 1D b-spline on . See db1min for the method, and for discontinuous splines.

See also

Arguments

Type IntentOptional 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, kx >= 2

real(kind=wp), intent(in), dimension(nx) :: bcoef

b-spline coefficient array

real(kind=wp), intent(in) :: xa

left end of the interval, in t(kx) <= x <= t(nx+1)

real(kind=wp), intent(in) :: xb

right end of the interval, in t(kx) <= x <= t(nx+1)

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)


Calls

proc~~db1max~~CallsGraph proc~db1max db1max proc~db1extremum db1extremum proc~db1max->proc~db1extremum proc~check_root_inputs check_root_inputs proc~db1extremum->proc~check_root_inputs proc~dbspvd dbspvd proc~db1extremum->proc~dbspvd proc~dbvalu dbvalu proc~db1extremum->proc~dbvalu proc~spline_derivative spline_derivative proc~db1extremum->proc~spline_derivative proc~spline_roots spline_roots proc~db1extremum->proc~spline_roots proc~dbspvn dbspvn proc~dbspvd->proc~dbspvn proc~dintrv dintrv proc~dbvalu->proc~dintrv proc~spline_roots->proc~dbvalu proc~in_flat_region in_flat_region proc~spline_roots->proc~in_flat_region proc~root_dup_tol root_dup_tol proc~spline_roots->proc~root_dup_tol proc~sort_unique sort_unique proc~spline_roots->proc~sort_unique proc~get_temp_x_for_extrap get_temp_x_for_extrap proc~dintrv->proc~get_temp_x_for_extrap proc~in_flat_region->proc~dintrv

Called by

proc~~db1max~~CalledByGraph proc~db1max db1max proc~maximum_1d bspline_1d%maximum_1d proc~maximum_1d->proc~db1max

Source Code

    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