delete_spline Subroutine

public subroutine delete_spline(spl)

Reset and deallocate variables in passed spline

Arguments

Type IntentOptional Attributes Name
type(spline), intent(inout) :: spl

Contents

Source Code


Source Code

  subroutine delete_spline (spl)
    implicit none
    type (spline), intent (in out) :: spl
    spl%n = 0

    if (allocated(spl%x)) then
       deallocate (spl%x,spl%y)
    end if

    if (allocated(spl%y2)) then
       deallocate (spl%y2)
    end if

    spl%valid = .false.
  end subroutine delete_spline