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

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

real,  private  ::  period  =  0 
The actual size of the periodic domain 

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 periodic_spline
Populates a periodic_spline instance spl
representing the
periodic data y(x) of length n and periodic on period
. Note
that the spline library expects period > x(n)  x(1)
, which
means the input data shouldn't include the duplicate periodic
point. As a convenience the user can pass data with the
duplicate point and set drop_last_point = .true.
to
automatically exclude the duplicate point.
Type  Intent  Optional  Attributes  Name  

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

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

class(periodic_spline),  intent(in)  ::  self  
real,  intent(in)  ::  x 
type :: periodic_spline
private
!> Length of the data arrays represented by the spline
integer :: n = 0
!> The actual size of the periodic domain
real :: period = 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 => periodic_spline_interp
procedure :: derivative => periodic_spline_deriv
end type periodic_spline