fintegral_1d Subroutine

private subroutine fintegral_1d(me, fun, idx, x1, x2, tol, f, iflag)

Evaluate a bspline_1d definite integral. This is a wrapper for db1fqad.

Type Bound

bspline_1d

Arguments

Type IntentOptional Attributes Name
class(bspline_1d), intent(inout) :: me
procedure(b1fqad_func) :: fun

external function of one argument for the integrand bf(x)=fun(x)*dbvalu(tx,bcoef,nx,kx,idx,x,inbv)

integer(kind=ip), intent(in) :: idx

order of the spline derivative, 0 <= idx <= k-1 idx=0 gives the spline function

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

left point of interval

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

right point of interval

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

desired accuracy for the quadrature

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

integral of bf(x) over

integer(kind=ip), intent(out) :: iflag

status flag (see db1sqad)


Calls

proc~~fintegral_1d~~CallsGraph proc~fintegral_1d bspline_oo_module::bspline_1d%fintegral_1d proc~db1fqad bspline_sub_module::db1fqad proc~fintegral_1d->proc~db1fqad proc~dbfqad bspline_sub_module::dbfqad proc~db1fqad->proc~dbfqad proc~dbsgq8 bspline_sub_module::dbsgq8 proc~dbfqad->proc~dbsgq8 proc~dintrv bspline_sub_module::dintrv proc~dbfqad->proc~dintrv proc~dbvalu bspline_sub_module::dbvalu proc~dbsgq8->proc~dbvalu proc~get_temp_x_for_extrap bspline_sub_module::get_temp_x_for_extrap proc~dintrv->proc~get_temp_x_for_extrap proc~dbvalu->proc~dintrv

Source Code

    subroutine fintegral_1d(me,fun,idx,x1,x2,tol,f,iflag)

    implicit none

    class(bspline_1d),intent(inout) :: me
    procedure(b1fqad_func)          :: fun   !! external function of one argument for the
                                             !! integrand `bf(x)=fun(x)*dbvalu(tx,bcoef,nx,kx,idx,x,inbv)`
    integer(ip),intent(in)          :: idx   !! order of the spline derivative, `0 <= idx <= k-1`
                                             !! `idx=0` gives the spline function
    real(wp),intent(in)             :: x1    !! left point of interval
    real(wp),intent(in)             :: x2    !! right point of interval
    real(wp),intent(in)             :: tol   !! desired accuracy for the quadrature
    real(wp),intent(out)            :: f     !! integral of `bf(x)` over \( [x_1, x_2] \)
    integer(ip),intent(out)         :: iflag !! status flag (see [[db1sqad]])

    if (me%initialized) then
        call db1fqad(fun,me%tx,me%bcoef,me%nx,me%kx,idx,x1,x2,tol,f,iflag,me%work_val_1)
    else
        iflag = 1_ip
    end if
    me%iflag = iflag

    end subroutine fintegral_1d