COSMOS v7.655
COSMOSv7655
(AirShowerMC)
kScsplIntp.f
Go to the documentation of this file.
1
subroutine
kscsplintp
(x, y, n, coef, nc, v, f)
2
implicit none
3
! interpolation by the cubic spline.
4
integer
n
! input. size of x, y
5
real(4)
:: x(n)
! input.
6
real(4)
:: y(n)
! input.
7
integer
nc
! input. size of coef(nc,3)
8
real(4)
:: coef(nc,3)
! input. which is an output from
9
! kcsplCoef
10
real(4)
:: v
! input. argument where the interpolated
11
! value is requested.
12
real(4)
:: f
! output. obtained interpolated values
13
!
14
integer
i
15
real(4)
:: v1
16
17
call
kwhereis
(v, n, x, 1, i)
18
if
(i .eq. 0)
then
19
i = 1
20
elseif
(i .eq. n)
then
21
i = n - 1
22
endif
23
v1 = v - x(i)
24
f = y(i) +
25
* v1 * (coef(i,1) + v1 * (coef(i,2) + v1 * coef(i,3)))
26
end
kscsplintp
subroutine kscsplintp(x, y, n, coef, nc, v, f)
Definition:
kScsplIntp.f:2
kwhereis
subroutine kwhereis(x, in, a, step, loc)
Definition:
kdwhereis.f:63
KKlib
kScsplIntp.f
Generated by
1.8.13