initialize_from_coefficients_2d_multi Subroutine

private pure subroutine initialize_from_coefficients_2d_multi(me, tx, ty, bcoef, kx, ky, iflag, extrap)

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

Type Bound

bspline_2d

Arguments

Type IntentOptional Attributes Name
class(bspline_2d), 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(:) :: ty

The (ny+ky) knots in the direction.

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

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

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

The order of spline pieces in

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

The order of spline pieces in

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

status flag (see initialize_from_coefficients_2d), 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_2d_multi~~CallsGraph proc~initialize_from_coefficients_2d_multi bspline_2d%initialize_from_coefficients_2d_multi none~initialize_from_coefficients~2 bspline_2d%initialize_from_coefficients proc~initialize_from_coefficients_2d_multi->none~initialize_from_coefficients~2 proc~destroy_2d bspline_2d%destroy_2d proc~initialize_from_coefficients_2d_multi->proc~destroy_2d none~initialize_from_coefficients~2->proc~initialize_from_coefficients_2d_multi proc~initialize_from_coefficients_2d bspline_2d%initialize_from_coefficients_2d none~initialize_from_coefficients~2->proc~initialize_from_coefficients_2d proc~destroy_base bspline_class%destroy_base proc~destroy_2d->proc~destroy_base proc~initialize_from_coefficients_2d->proc~destroy_2d proc~check_coefficients check_coefficients proc~initialize_from_coefficients_2d->proc~check_coefficients proc~set_extrap_flag bspline_class%set_extrap_flag proc~initialize_from_coefficients_2d->proc~set_extrap_flag

Called by

proc~~initialize_from_coefficients_2d_multi~~CalledByGraph proc~initialize_from_coefficients_2d_multi bspline_2d%initialize_from_coefficients_2d_multi none~initialize_from_coefficients~2 bspline_2d%initialize_from_coefficients proc~initialize_from_coefficients_2d_multi->none~initialize_from_coefficients~2 none~initialize_from_coefficients~2->proc~initialize_from_coefficients_2d_multi

Source Code

    pure subroutine initialize_from_coefficients_2d_multi(me,tx,ty,bcoef,kx,ky,iflag,extrap)

    implicit none

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

    if (size(bcoef,3,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,ty,bcoef(:,:,1),kx,ky,iflag,extrap)
    if (iflag==0_ip) then
        me%bcoef = bcoef
        me%nf = size(bcoef,3,kind=ip)
    end if

    end subroutine initialize_from_coefficients_2d_multi