COSMOS v7.655  COSMOSv7655
(AirShowerMC)
kpolintp2S.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine kpolintp2s (xa, xstep, dx, ya, ystep, dy, za, adj, m, n, ma, na, x, y, z, error)
 

Function/Subroutine Documentation

◆ kpolintp2s()

subroutine kpolintp2s ( real*4, dimension(xstep, m xa,
integer  xstep,
real*4  dx,
real*4, dimension(ystep, n ya,
integer  ystep,
real*4  dy,
real*4, dimension(adj, n za,
integer  adj,
integer  m,
integer  n,
integer  ma,
integer  na,
real*4  x,
real*4  y,
real*4  z,
real*4  error 
)

Definition at line 41 of file kpolintp2S.f.

References kpolintps(), kpolintpseqs(), kwhereis(), and parameter().

Referenced by cxabyxpxsec().

41 ! ********************************************************
42 ! real*4 xa(xstep, m). input.
43 ! real*4 ya(ystep, n). input.
44 ! real*4 dx. input. if non zero, xa is assumed to be
45 ! equistepd with dx.
46 ! real*4 dy. input. the same as dx for y.
47 ! integer adj. input. adjustable dim. fo z >= m
48 ! real*4 za(adj, n). input. function values at (xa, ya)
49 ! real*4 x. input.
50 ! real*4 y. input.
51 ! real*4 z. output. estimated func. value at (x, y).
52 !
53 ! integer ma. input. a max of ma points around x is used
54 ! integer na. input. a max of na points around y is used.
55 ! ma, na <= maxp(=10)
56 !
57  implicit none
58  integer xstep, ystep, n, m, na, ma, adj
59  real*4 xa(xstep, m), ya(ystep, n), za(adj, n)
60  real*4 x, y, z, error, dx, dy
61 
62  integer lx, ly, kx, ky, i, maxp
63  parameter(maxp = 10) ! max # of points.
64  real*4 ztmp(maxp)
65 !
66  if(ma .gt. maxp .or. na .gt. maxp) then
67  write(*, *) "kpolintp2S: too large number of points"
68  stop
69  endif
70  if(dx .eq. 0.) then
71  call kwhereis(x, m, xa, xstep, lx)
72  else
73  lx = (x - xa(1,1))/dx+1
74  endif
75 
76  if(dy .eq. 0.) then
77  call kwhereis(y, n, ya, ystep, ly)
78  else
79  ly = (y-ya(1,1))/dy +1
80  endif
81  kx = min(max(lx - (ma -1)/2,1), m+1-ma) ! max of ma points from kx
82  ky = min(max(ly - (na -1)/2,1), n+1-na) ! max of na points from ky
83 
84 ! make ztmp: scan along x direction
85  do i = kx, min(m, kx + ma-1)
86  if(dy .eq. 0.) then
87  call kpolintps(ya(1, ky), ystep, za(i, ky), adj,
88  * min(na, n- ky +1), y, ztmp(i-kx+1), error)
89  else
90  call kpolintpseqs( (ya(1, 1)+(ky-1)*dy), dy, za(i, ky), adj,
91  * min(na, n- ky +1), y, ztmp(i-kx+1), error)
92  endif
93  enddo
94  if(dx .eq. 0.) then
95  call kpolintps(xa(1, kx), xstep, ztmp, 1,
96  * min(ma, m-kx +1), x, z, error)
97  else
98  call kpolintpseqs( (xa(1, 1)+(kx-1)*dx), dx, ztmp, 1,
99  * min(ma, m-kx +1), x, z, error)
100  endif
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
nodes z
nodes i
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
subroutine kpolintpseqs(x0, dx, ya, ystep, n, x, y, error)
Definition: kpolintpS.f:229
subroutine kpolintps(xa, xstep, ya, ystep, n, x, y, error)
Definition: kpolintpS.f:164
subroutine kwhereis(x, in, a, step, loc)
Definition: kdwhereis.f:63
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
!onst int maxp
Definition: Zprivate.h:3
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the call graph for this function:
Here is the caller graph for this function: