get_knots_3d Subroutine

private pure subroutine get_knots_3d(me, tx, ty, tz, iflag)

Returns the knot vectors of a bspline_3d.

Type Bound

bspline_3d

Arguments

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

the spline

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

the (nx+kx) knots in the direction

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

the (ny+ky) knots in the direction

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

the (nz+kz) knots in the direction

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

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


Source Code

    pure subroutine get_knots_3d(me,tx,ty,tz,iflag)

    implicit none

    class(bspline_3d),intent(inout) :: me  !! the spline
    real(wp),dimension(:),allocatable,intent(out) :: tx  !! the `(nx+kx)` knots in the \(x\) direction
    real(wp),dimension(:),allocatable,intent(out) :: ty  !! the `(ny+ky)` knots in the \(y\) direction
    real(wp),dimension(:),allocatable,intent(out) :: tz  !! the `(nz+kz)` knots in the \(z\) direction
    integer(ip),intent(out) :: iflag  !! status flag: 0 if no errors,
                                      !! 1 if the class is not initialized

    if (me%initialized) then
        tx = me%tx
        ty = me%ty
        tz = me%tz
        iflag = 0_ip
    else
        allocate(tx(0))
        allocate(ty(0))
        allocate(tz(0))
        iflag = 1_ip
    end if
    me%iflag = iflag

    end subroutine get_knots_3d