mod_spline Module

Given arrays x(1:n) and y(1:n) containing a tabulated function, i.e., , with , and given values yp1 and ypn for the 1st derivative of the interpolating function at points 1 and n, respectively, this routine returns an array y2(1:n) of length n which contains the second derivatives of the interpolating function at the tabulated points xi. If yp1 and/or ypn are equal to 1.e30 or larger, the routine is signaled to set the corresponding boundary condition for a natural spline, with zero second derivative on that boundary. Parameter: NMAX is the largest anticipated value of n.

Note

Taken from "Numerical Recipes in Fortran 77", W.H.Press et al.


Uses

    • mod_datatypes

Subroutines

public subroutine spline_real(nmax, x, y, n, yp1, ypn, y2)

License
Creative Commons License
Category
numerical-tools, KKRhost

T h i s

r o u t i n e

r e t u r n s

a n

a r r a y

y 2 ( 1 : n )

o f

l e n g t h

n

w h i c h

c o n t a i n s

t h e

s e c o n d

d e r i v a t i v e s

o f

t h e

i n t e r p o l a t i n g

f u n c t i o n

a t

t h e

t a b u l a t e d

p o i n t s

x i .

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: nmax
real(kind=dp), dimension(nmax) :: x
real(kind=dp), dimension(nmax) :: y
integer :: n
real(kind=dp) :: yp1
real(kind=dp) :: ypn
real(kind=dp), dimension(nmax) :: y2

public subroutine spline_complex(nmax, x, y, n, yp1, ypn, y2)

License
Creative Commons License
Category
numerical-tools, KKRhost

T h i s

r o u t i n e

r e t u r n s

a n

a r r a y

y 2 ( 1 : n )

o f

l e n g t h

n

w h i c h

c o n t a i n s

t h e

s e c o n d

d e r i v a t i v e s

o f

t h e

i n t e r p o l a t i n g

f u n c t i o n

a t

t h e

t a b u l a t e d

p o i n t s

x i .

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: nmax
real(kind=dp), dimension(nmax) :: x
complex(kind=dp), dimension(nmax) :: y
integer :: n
complex(kind=dp) :: yp1
complex(kind=dp) :: ypn
complex(kind=dp), dimension(nmax) :: y2