get_knots_1d Subroutine

private pure subroutine get_knots_1d(me, tx, iflag)

Returns the knot vectors of a bspline_1d.

Type Bound

bspline_1d

Arguments

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

the spline

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

the (nx+kx) 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_1d(me,tx,iflag)

    implicit none

    class(bspline_1d),intent(inout) :: me  !! the spline
    real(wp),dimension(:),allocatable,intent(out) :: tx  !! the `(nx+kx)` knots in the \(x\) 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
        iflag = 0_ip
    else
        allocate(tx(0))
        iflag = 1_ip
    end if
    me%iflag = iflag

    end subroutine get_knots_1d