(git:6a2e663)
splines_methods Module Reference

routines for handling splines More...

Functions/Subroutines

pure subroutine, public init_splinexy (spl, nn)
 allocates storage for function table to be interpolated both x and y are allocated More...
 
pure subroutine, public init_spline (spl, dx, y1a, y1b)
 allocates storage for y2 table calculates y2 table and other spline parameters More...
 
real(kind=dp) function, public potential_s (spl_p, xxi, y1, spl_f, logger)
 calculates the potential interpolated with splines value at a given point and the first derivative. Checks included to avoid just segfaulting!! More...
 
real(kind=dp) function, public spline_value (spl, xx, y1)
 calculates the spline value at a given point (and possibly the first derivative) WITHOUT checks and without any funny scaling business, or weird 1/x^2 grid assumptions More...
 

Detailed Description

routines for handling splines

History
2001-09-21-HAF added this doc entry and changed formatting
Author
various

Function/Subroutine Documentation

◆ init_splinexy()

pure subroutine, public splines_methods::init_splinexy ( type(spline_data_type), intent(inout)  spl,
integer, intent(in)  nn 
)

allocates storage for function table to be interpolated both x and y are allocated

Parameters
splspline_data structure to be initialized
nninteger number of datapoints, that the function table will hold
History
2001-09-21-HAF added this doc entry and changed formatting
Author
unknown

Definition at line 47 of file splines_methods.F.

Here is the caller graph for this function:

◆ init_spline()

pure subroutine, public splines_methods::init_spline ( type(spline_data_type), intent(inout)  spl,
real(kind=dp), intent(in)  dx,
real(kind=dp), intent(in), optional  y1a,
real(kind=dp), intent(in), optional  y1b 
)

allocates storage for y2 table calculates y2 table and other spline parameters

Parameters
splspline_data structure to be initialized sply() must hold the function values splx() must hold the absissa values in increasing order OR if dx (below) is given, splx(1) must hold the starting (left-most) point.
dxx(i) are assumed to be x(1)+dx*(i-1) (spline evaluations will also be faster) y1a : (OPTIONAL) if present, the 1-deriv of the left endpoint if not present, natural spline condition at this end (2-deriv == 0) y1b : (OPTIONAL) if present, the 1-deriv of the right endpoint if not present, natural spline condition at this end (2-deriv == 0)
y1a...
y1b...
Examples
CALL init_spline(spline,dx=0.1_dp) CALL init_spline(spline,y1b=0.0_dp) CALL init_spline(spline,0.1_dp,0.0_dp,0.0_dp)
History
2001-09-21-HAF added this doc entry and changed formatting 2001-09-24-HAF changed interface and re-written
Author
unknown
Note
if dx is given, the x array will be used as y2 array instead of allocating a new array. (y2 will become x, and x will be nullified)

Definition at line 99 of file splines_methods.F.

Here is the caller graph for this function:

◆ potential_s()

real(kind=dp) function, public splines_methods::potential_s ( type(spline_data_p_type), dimension(:), pointer  spl_p,
real(kind=dp), intent(in)  xxi,
real(kind=dp), intent(out)  y1,
type(spline_factor_type), pointer  spl_f,
type(cp_logger_type), pointer  logger 
)

calculates the potential interpolated with splines value at a given point and the first derivative. Checks included to avoid just segfaulting!!

Parameters
spl_pspline_data structure
xxiabsissa value
y11. derivative at xx
spl_f...
logger...
Returns
...
Output
spline interpolated value at xx
History
2001-09-25-HAF added this doc entry and changed formatting
Author
unknown
Note
the spline MUST have uniform x values and xx MUST be in the interpolation interval. No checks are done to ensure either condition.

Definition at line 161 of file splines_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spline_value()

real(kind=dp) function, public splines_methods::spline_value ( type(spline_data_type), intent(in)  spl,
real(kind=dp), intent(in)  xx,
real(kind=dp), intent(out), optional  y1 
)

calculates the spline value at a given point (and possibly the first derivative) WITHOUT checks and without any funny scaling business, or weird 1/x^2 grid assumptions

Parameters
spl...
xx...
y1...
Returns
...
Author
HAF

Definition at line 217 of file splines_methods.F.

Here is the caller graph for this function: