Holds data representing a nonperiodic spline. Should be set up by calling new_spline.
Type  Visibility  Attributes  Name  Initial  

integer,  private  ::  n  =  0 
Length of the data arrays represented by the spline 

real,  private,  dimension (:), allocatable  ::  x 
Holds the independent and dependent values of the
splined data in 

real,  private,  dimension (:), allocatable  ::  y 
Holds the independent and dependent values of the
splined data in 

real,  private,  dimension (:), allocatable  ::  y2 
Holds the independent and dependent values of the
splined data in 

logical,  public  ::  valid  =  .false. 
Indicates if the spline corresponding to this data is valid and can be used with the spline evaluation routines. 

real,  private  ::  tension  =  1.0 
The tension used in computing the splined data, note this must be the value used in the initialisation when passed to the spline evaluation routines. 
Constructor for spline
Populates a spline instance spl
representing the nonperiodic
data y(x).
Type  Intent  Optional  Attributes  Name  

real,  intent(in),  dimension (:)  ::  x  
real,  intent(in),  dimension (:)  ::  y  
real,  intent(in),  optional  ::  tension 
Bound wrapper to splint
Type  Intent  Optional  Attributes  Name  

class(spline),  intent(in)  ::  self  
real,  intent(in)  ::  x 
Bound wrapper to dsplint
Type  Intent  Optional  Attributes  Name  

class(spline),  intent(in)  ::  self  
real,  intent(in)  ::  x 
type :: spline
private
!> Length of the data arrays represented by the spline
integer :: n = 0
!> Holds the independent and dependent values of the
!> splined data in `x` and `y`. The second derivative
!> is held in `y2` and calculated automatically.
real, dimension (:), allocatable :: x, y, y2
!> Indicates if the spline corresponding to this data is valid
!> and can be used with the spline evaluation routines.
logical, public :: valid = .false.
!> The tension used in computing the splined data, note this
!> must be the value used in the initialisation when passed
!> to the spline evaluation routines.
real :: tension = 1.0
contains
procedure :: interpolate => spline_interp
procedure :: derivative => spline_deriv
end type spline