Go to the documentation of this file.
8 SUBROUTINE spline(n, x,y,y2)
10 REAL(single),
DIMENSION(n),
INTENT(IN) :: x,y
11 REAL(single),
DIMENSION(n),
INTENT(OUT) :: y2
12 INTEGER(integer_fourbyte),
intent(in) :: n
13 REAL(single) :: yp1,ypn
14 REAL(single),
DIMENSION(size(x)) :: a,b,c,r
19 c(1:n-1)=x(2:n)-x(1:n-1)
20 r(1:n-1)=6.0_single*((y(2:n)-y(1:n-1))/c(1:n-1))
21 r(2:n-1)=r(2:n-1)-r(1:n-2)
23 b(2:n-1)=2.0_single*(c(2:n-1)+a(2:n-1))
30 r(1)=(3.0_single/(x(2)-x(1)))*((y(2)-y(1))/(x(2)-x(1))-yp1)
37 r(n)=(-3.0_single/(x(n)-x(n-1)))*((y(n)-y(n-1))/(x(n)-x(n-1))-ypn)
40 call tridag(a(2:n),b(1:n),c(1:n-1),r(1:n),y2(1:n),n)
46 FUNCTION splint(n,x,xa,ya,y2a)
49 INTEGER(integer_fourbyte),
intent(in) :: n
50 REAL(
single),
DIMENSION(:),
INTENT(IN) :: xa,ya,y2a
51 REAL(
single),
INTENT(IN) :: x
53 INTEGER(integer_fourbyte) :: khi,klo
54 REAL(
double) :: a,b,h, temp_1, temp_2, temp_3
64 splint=a*ya(klo)+b*ya(khi)+((a**3-a)*y2a(klo)+(b**3-b)*y2a(khi))*(h**2)/6.0_single
70 REAL(
single),
DIMENSION(:),
INTENT(IN) :: xx
71 REAL(
single),
INTENT(IN) :: x
72 INTEGER(integer_fourbyte) ::
locate
73 INTEGER(integer_fourbyte) :: n,jl,jm,ju
76 ascnd = (xx(n) >= xx(1))
82 if (ascnd .eqv. (x >= xx(jm)))
then
98 SUBROUTINE tridag(a,b,c,r,u,size)
101 integer(integer_fourbyte),
intent(in) :: size
102 REAL(single),
INTENT(IN) :: a(size-1),b(size),c(size-1),r(size)
103 REAL(single),
INTENT(OUT) :: u(size)
104 REAL(single) :: gam(size)
105 INTEGER(integer_fourbyte) :: n,j
115 bet=b(j)-a(j-1)*gam(j)
116 u(j)=(r(j)-a(j-1)*u(j-1))/bet
120 u(j)=u(j)-gam(j+1)*u(j+1)
subroutine spline(s, x, y, n, in, t, il, iu, vl, vu, e, u)
integer, parameter single
integer, parameter double
void tridag(float a[], float b[], float c[], float r[], float u[], unsigned long n)
subroutine locate(xx, n, x, j)
subroutine splint(xa, ya, y2a, n, x, y)
logical function realsingle_s_equal(x, y)
integer, parameter integer_fourbyte