Octopus
splines_oct_m Module Reference

Data Types

interface  oct_spline_accel_alloc
 
interface  oct_spline_accel_free
 
interface  oct_spline_end
 
interface  oct_spline_eval
 
interface  oct_spline_eval_array
 
interface  oct_spline_eval_arrayz
 
interface  oct_spline_eval_der
 
interface  oct_spline_eval_der2
 
interface  oct_spline_eval_integ
 
interface  oct_spline_eval_integ_full
 
interface  oct_spline_fit
 
interface  oct_spline_npoints
 
interface  oct_spline_x
 
interface  oct_spline_y
 
interface  spline_end
 
interface  spline_eval_vec
 Both the filling of the function, and the retrieval of the values may be done using single- or double-precision values. More...
 
interface  spline_init
 Some operations may be done for one spline-function, or for an array of them. More...
 
interface  spline_integral
 The integral may be done with or without integration limits, but we want the interface to be common. More...
 
interface  spline_print
 
type  spline_t
 the basic spline datatype More...
 

Functions/Subroutines

subroutine spline_init_0 (spl)
 
subroutine spline_init_1 (spl)
 
subroutine spline_init_2 (spl)
 
subroutine spline_end_0 (spl)
 
subroutine spline_end_1 (spl)
 
subroutine spline_end_2 (spl)
 
subroutine, public spline_fit (nrc, rofi, ffit, spl, threshold)
 
real(real64) function, public spline_eval (spl, x)
 
subroutine, public spline_accel_init (acc)
 Allocate a GSL accelerator owned by the caller. Used with spline_eval_accel (one accelerator per thread and spline) to evaluate a spline concurrently, as the accelerator cache is modified on every evaluation. More...
 
subroutine, public spline_accel_end (acc)
 
real(real64) function, public spline_eval_accel (spl, x, acc)
 Same as spline_eval, with a caller-owned accelerator (see spline_accel_init). More...
 
logical function, public spline_same (spl1, spl2)
 True if both splines refer to the same underlying GSL spline. More...
 
subroutine spline_eval8_array (spl, nn, xf)
 
subroutine spline_evalz_array (spl, nn, xf)
 
subroutine, public spline_times (a, spl, threshold)
 
real(real64) function spline_integral_full (spl)
 
real(real64) pure function spline_integral_limits (spl, a, b)
 
subroutine, public spline_3dft (spl, splw, threshold, gmax)
 
subroutine, public spline_besselft (spl, splw, l, threshold, gmax)
 
subroutine, public spline_cut (spl, cutoff, beta, threshold)
 
subroutine, public spline_div (spla, splb, threshold)
 Returns the values of spla divided by the values of splb. More...
 
subroutine, public spline_force_pos (spl, threshold)
 
subroutine, public spline_mult (spla, splb, threshold)
 
subroutine, public spline_der (spl, dspl, threshold)
 
subroutine, public spline_der2 (spl, dspl, threshold, grid)
 Returns a spline that contains the second derivative of the original spline. More...
 
subroutine spline_print_0 (spl, iunit)
 
subroutine spline_print_1 (spl, iunit)
 Print debug information for a 1D array of splines. More...
 
subroutine spline_print_2 (spl, iunit)
 Print debug information for a 2D array of splines. More...
 
real(real64) function, public spline_x_threshold (spl, threshold)
 Determines the largest value of x for which the spline values are above the threshold. More...
 
real(real64) pure function, public spline_range_min (this)
 
real(real64) pure function, public spline_range_max (this)
 
subroutine, public spline_generate_shifted_grid (this, x_shifted)
 

Variables

real(real64), parameter tol_x = 1e-14_real64
 Tolerance for checking if x is inside or outside the limits of the splines. More...
 

Function/Subroutine Documentation

◆ spline_init_0()

subroutine splines_oct_m::spline_init_0 ( type(spline_t), intent(out)  spl)
private

Definition at line 448 of file splines.F90.

◆ spline_init_1()

subroutine splines_oct_m::spline_init_1 ( type(spline_t), dimension(:), intent(out)  spl)
private

Definition at line 466 of file splines.F90.

◆ spline_init_2()

subroutine splines_oct_m::spline_init_2 ( type(spline_t), dimension(:, :), intent(out)  spl)
private

Definition at line 482 of file splines.F90.

◆ spline_end_0()

subroutine splines_oct_m::spline_end_0 ( type(spline_t), intent(inout)  spl)
private

Definition at line 500 of file splines.F90.

◆ spline_end_1()

subroutine splines_oct_m::spline_end_1 ( type(spline_t), dimension(:), intent(inout)  spl)
private

Definition at line 515 of file splines.F90.

◆ spline_end_2()

subroutine splines_oct_m::spline_end_2 ( type(spline_t), dimension(:, :), intent(inout)  spl)
private

Definition at line 531 of file splines.F90.

◆ spline_fit()

subroutine, public splines_oct_m::spline_fit ( integer, intent(in)  nrc,
real(real64), dimension(:), intent(in), contiguous  rofi,
real(real64), dimension(:), intent(in), contiguous  ffit,
type(spline_t), intent(inout)  spl,
real(real64), intent(in), optional  threshold 
)

Definition at line 549 of file splines.F90.

◆ spline_eval()

real(real64) function, public splines_oct_m::spline_eval ( type(spline_t), intent(in)  spl,
real(real64), intent(in)  x 
)

Definition at line 577 of file splines.F90.

◆ spline_accel_init()

subroutine, public splines_oct_m::spline_accel_init ( type(c_ptr), intent(out)  acc)

Allocate a GSL accelerator owned by the caller. Used with spline_eval_accel (one accelerator per thread and spline) to evaluate a spline concurrently, as the accelerator cache is modified on every evaluation.

Definition at line 588 of file splines.F90.

◆ spline_accel_end()

subroutine, public splines_oct_m::spline_accel_end ( type(c_ptr), intent(inout)  acc)

Definition at line 595 of file splines.F90.

◆ spline_eval_accel()

real(real64) function, public splines_oct_m::spline_eval_accel ( type(spline_t), intent(in)  spl,
real(real64), intent(in)  x,
type(c_ptr), intent(in)  acc 
)

Same as spline_eval, with a caller-owned accelerator (see spline_accel_init).

Definition at line 604 of file splines.F90.

◆ spline_same()

logical function, public splines_oct_m::spline_same ( type(spline_t), intent(in)  spl1,
type(spline_t), intent(in)  spl2 
)

True if both splines refer to the same underlying GSL spline.

Definition at line 614 of file splines.F90.

◆ spline_eval8_array()

subroutine splines_oct_m::spline_eval8_array ( type(spline_t), intent(in)  spl,
integer, intent(in)  nn,
real(real64), dimension(:), intent(inout), contiguous  xf 
)
private

Definition at line 622 of file splines.F90.

◆ spline_evalz_array()

subroutine splines_oct_m::spline_evalz_array ( type(spline_t), intent(in)  spl,
integer, intent(in)  nn,
complex(real64), dimension(:), intent(inout), contiguous  xf 
)
private

Definition at line 634 of file splines.F90.

◆ spline_times()

subroutine, public splines_oct_m::spline_times ( real(real64), intent(in)  a,
type(spline_t), intent(inout)  spl,
real(real64), intent(in)  threshold 
)

Definition at line 645 of file splines.F90.

◆ spline_integral_full()

real(real64) function splines_oct_m::spline_integral_full ( type(spline_t), intent(in)  spl)
private

Definition at line 678 of file splines.F90.

◆ spline_integral_limits()

real(real64) pure function splines_oct_m::spline_integral_limits ( type(spline_t), intent(in)  spl,
real(real64), intent(in)  a,
real(real64), intent(in)  b 
)
private

Definition at line 690 of file splines.F90.

◆ spline_3dft()

subroutine, public splines_oct_m::spline_3dft ( type(spline_t), intent(in)  spl,
type(spline_t), intent(inout)  splw,
real(real64), intent(in)  threshold,
real(real64), intent(in), optional  gmax 
)

Definition at line 699 of file splines.F90.

◆ spline_besselft()

subroutine, public splines_oct_m::spline_besselft ( type(spline_t), intent(in)  spl,
type(spline_t), intent(inout)  splw,
integer, intent(in)  l,
real(real64), intent(in), optional  threshold,
real(real64), intent(in), optional  gmax 
)

Definition at line 778 of file splines.F90.

◆ spline_cut()

subroutine, public splines_oct_m::spline_cut ( type(spline_t), intent(inout)  spl,
real(real64), intent(in)  cutoff,
real(real64), intent(in)  beta,
real(real64), intent(in), optional  threshold 
)

Definition at line 849 of file splines.F90.

◆ spline_div()

subroutine, public splines_oct_m::spline_div ( type(spline_t), intent(inout)  spla,
type(spline_t), intent(in)  splb,
real(real64), intent(in), optional  threshold 
)

Returns the values of spla divided by the values of splb.

On return, spla contains the same number of points as splb if smaller than the number of points in the original spline spla.

Definition at line 898 of file splines.F90.

◆ spline_force_pos()

subroutine, public splines_oct_m::spline_force_pos ( type(spline_t), intent(inout)  spl,
real(real64), intent(in)  threshold 
)

Definition at line 943 of file splines.F90.

◆ spline_mult()

subroutine, public splines_oct_m::spline_mult ( type(spline_t), intent(inout)  spla,
type(spline_t), intent(in)  splb,
real(real64), intent(in)  threshold 
)

Definition at line 977 of file splines.F90.

◆ spline_der()

subroutine, public splines_oct_m::spline_der ( type(spline_t), intent(in)  spl,
type(spline_t), intent(inout)  dspl,
real(real64), intent(in)  threshold 
)

Definition at line 1023 of file splines.F90.

◆ spline_der2()

subroutine, public splines_oct_m::spline_der2 ( type(spline_t), intent(in)  spl,
type(spline_t), intent(inout)  dspl,
real(real64), intent(in)  threshold,
real(real64), dimension(:), intent(in), optional, contiguous  grid 
)

Returns a spline that contains the second derivative of the original spline.

Definition at line 1061 of file splines.F90.

◆ spline_print_0()

subroutine splines_oct_m::spline_print_0 ( type(spline_t), intent(in)  spl,
integer, intent(in)  iunit 
)
private

Definition at line 1103 of file splines.F90.

◆ spline_print_1()

subroutine splines_oct_m::spline_print_1 ( type(spline_t), dimension(:), intent(in)  spl,
integer, intent(in)  iunit 
)
private

Print debug information for a 1D array of splines.

Definition at line 1132 of file splines.F90.

◆ spline_print_2()

subroutine splines_oct_m::spline_print_2 ( type(spline_t), dimension(:, :), intent(in)  spl,
integer, intent(in)  iunit 
)
private

Print debug information for a 2D array of splines.

Definition at line 1184 of file splines.F90.

◆ spline_x_threshold()

real(real64) function, public splines_oct_m::spline_x_threshold ( type(spline_t), intent(in)  spl,
real(real64), intent(in)  threshold 
)

Determines the largest value of x for which the spline values are above the threshold.

Definition at line 1242 of file splines.F90.

◆ spline_range_min()

real(real64) pure function, public splines_oct_m::spline_range_min ( type(spline_t), intent(in)  this)

Definition at line 1272 of file splines.F90.

◆ spline_range_max()

real(real64) pure function, public splines_oct_m::spline_range_max ( type(spline_t), intent(in)  this)

Definition at line 1281 of file splines.F90.

◆ spline_generate_shifted_grid()

subroutine, public splines_oct_m::spline_generate_shifted_grid ( type(spline_t), intent(in)  this,
real(real64), dimension(:), intent(inout), allocatable  x_shifted 
)

Definition at line 1289 of file splines.F90.

Variable Documentation

◆ tol_x

real(real64), parameter splines_oct_m::tol_x = 1e-14_real64

Tolerance for checking if x is inside or outside the limits of the splines.

Definition at line 443 of file splines.F90.