get_interval_1d Subroutine

private pure subroutine get_interval_1d(me, xa, xb, x1, x2)

The interval for minimum_1d and maximum_1d (the whole spline domain by default).

Arguments

Type IntentOptional Attributes Name
class(bspline_1d), intent(in) :: me

the spline

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

left end of the interval

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

right end of the interval

real(kind=wp), intent(out) :: x1

xa, or tx(kx) if not present

real(kind=wp), intent(out) :: x2

xb, or tx(nx+1) if not present


Called by

proc~~get_interval_1d~~CalledByGraph proc~get_interval_1d get_interval_1d proc~maximum_1d bspline_1d%maximum_1d proc~maximum_1d->proc~get_interval_1d proc~minimum_1d bspline_1d%minimum_1d proc~minimum_1d->proc~get_interval_1d

Source Code

    pure subroutine get_interval_1d(me,xa,xb,x1,x2)

    implicit none

    class(bspline_1d),intent(in) :: me  !! the spline
    real(wp),intent(in),optional :: xa  !! left end of the interval
    real(wp),intent(in),optional :: xb  !! right end of the interval
    real(wp),intent(out)         :: x1  !! `xa`, or `tx(kx)` if not present
    real(wp),intent(out)         :: x2  !! `xb`, or `tx(nx+1)` if not present

    if (present(xa)) then
        x1 = xa
    else
        x1 = me%tx(me%kx)
    end if
    if (present(xb)) then
        x2 = xb
    else
        x2 = me%tx(me%nx+1_ip)
    end if

    end subroutine get_interval_1d