![]() |
(git:b77b4be)
|
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 | |
pure subroutine, public | init_spline (spl, dx, y1a, y1b) |
allocates storage for y2 table calculates y2 table and other spline parameters | |
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!! | |
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 | |
routines for handling splines
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
spl | spline_data structure to be initialized |
nn | integer number of datapoints, that the function table will hold |
Definition at line 47 of file splines_methods.F.
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
spl | spline_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. |
dx | x(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 | ... |
Definition at line 99 of file splines_methods.F.
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!!
spl_p | spline_data structure |
xxi | absissa value |
y1 | 1. derivative at xx |
spl_f | ... |
logger | ... |
Definition at line 161 of file splines_methods.F.
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
spl | ... |
xx | ... |
y1 | ... |
Definition at line 217 of file splines_methods.F.