initialize_from_coefficients_1d_multi Subroutine

private pure subroutine initialize_from_coefficients_1d_multi(me, tx, bcoef, kx, iflag, extrap)

Initialize a bspline_1d type with multiple outputs directly from its knots and b-spline coefficients. The last dimension of bcoef is the output index.

Type Bound

bspline_1d

Arguments

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

the spline

real(kind=wp), intent(in), dimension(:) :: tx

The (nx+kx) knots in the direction.

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

(nx,nf) array of b-spline coefficients

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

The order of spline pieces in

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

status flag (see initialize_from_coefficients_1d), or 6005 if bcoef has no outputs

logical, intent(in), optional :: extrap

if true, then extrapolation is allowed (default is false)


Calls

proc~~initialize_from_coefficients_1d_multi~~CallsGraph proc~initialize_from_coefficients_1d_multi bspline_1d%initialize_from_coefficients_1d_multi none~initialize_from_coefficients bspline_1d%initialize_from_coefficients proc~initialize_from_coefficients_1d_multi->none~initialize_from_coefficients proc~destroy_1d bspline_1d%destroy_1d proc~initialize_from_coefficients_1d_multi->proc~destroy_1d none~initialize_from_coefficients->proc~initialize_from_coefficients_1d_multi proc~initialize_from_coefficients_1d bspline_1d%initialize_from_coefficients_1d none~initialize_from_coefficients->proc~initialize_from_coefficients_1d proc~destroy_base bspline_class%destroy_base proc~destroy_1d->proc~destroy_base proc~initialize_from_coefficients_1d->proc~destroy_1d proc~check_coefficients check_coefficients proc~initialize_from_coefficients_1d->proc~check_coefficients proc~set_extrap_flag bspline_class%set_extrap_flag proc~initialize_from_coefficients_1d->proc~set_extrap_flag

Called by

proc~~initialize_from_coefficients_1d_multi~~CalledByGraph proc~initialize_from_coefficients_1d_multi bspline_1d%initialize_from_coefficients_1d_multi none~initialize_from_coefficients bspline_1d%initialize_from_coefficients proc~initialize_from_coefficients_1d_multi->none~initialize_from_coefficients none~initialize_from_coefficients->proc~initialize_from_coefficients_1d_multi

Source Code

    pure subroutine initialize_from_coefficients_1d_multi(me,tx,bcoef,kx,iflag,extrap)

    implicit none

    class(bspline_1d),intent(inout) :: me  !! the spline
    real(wp),dimension(:),intent(in) :: tx  !! The `(nx+kx)` knots in the \(x\) direction.
    real(wp),dimension(:,:),intent(in) :: bcoef  !! `(nx,nf)` array of b-spline coefficients
    integer(ip),intent(in) :: kx  !! The order of spline pieces in \(x\)
    integer(ip),intent(out) :: iflag  !! status flag (see [[initialize_from_coefficients_1d]]),
                                      !! or 6005 if `bcoef` has no outputs
    logical,intent(in),optional :: extrap  !! if true, then extrapolation is allowed
                                           !! (default is false)

    if (size(bcoef,2,kind=ip)<1_ip) then
        ! no outputs
        call me%destroy()
        iflag = 6005_ip
        me%iflag = iflag
        return
    end if

    call me%initialize_from_coefficients(tx,bcoef(:,1),kx,iflag,extrap)
    if (iflag==0_ip) then
        me%bcoef = bcoef
        me%nf = size(bcoef,2,kind=ip)
    end if

    end subroutine initialize_from_coefficients_1d_multi