Evaluate a bspline_1d definite integral. This is a wrapper for db1fqad.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(bspline_1d), | intent(inout) | :: | me | |||
procedure(b1fqad_func) | :: | fun |
external function of one argument for the
integrand |
|||
integer(kind=ip), | intent(in) | :: | idx |
order of the spline derivative, |
||
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 |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag (see db1sqad) |
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