get_coefficients_4d_multi Subroutine

private pure subroutine get_coefficients_4d_multi(me, bcoef, iflag)

Returns the b-spline coefficients of a bspline_4d with any number of outputs. The last dimension of bcoef is the output index.

Type Bound

bspline_4d

Arguments

Type IntentOptional Attributes Name
class(bspline_4d), intent(inout) :: me

the spline

real(kind=wp), intent(out), dimension(:,:,:,:,:), allocatable :: bcoef

(nx,ny,nz,nq,nf) array of b-spline coefficients

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

status flag: 0 if no errors, 1 if the class is not initialized


Source Code

    pure subroutine get_coefficients_4d_multi(me,bcoef,iflag)

    implicit none

    class(bspline_4d),intent(inout) :: me  !! the spline
    real(wp),dimension(:,:,:,:,:),allocatable,intent(out) :: bcoef  !! `(nx,ny,nz,nq,nf)` array of b-spline coefficients
    integer(ip),intent(out) :: iflag  !! status flag: 0 if no errors,
                                      !! 1 if the class is not initialized

    if (me%initialized) then
        bcoef = me%bcoef
        iflag = 0_ip
    else
        allocate(bcoef(0,0,0,0,0))
        iflag = 1_ip
    end if
    me%iflag = iflag

    end subroutine get_coefficients_4d_multi