~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to scipy/sandbox/spline/fitpack/evapol.f

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      real*8 function evapol(tu,nu,tv,nv,c,rad,x,y)
 
2
c  function program evacir evaluates the function f(x,y) = s(u,v),
 
3
c  defined through the transformation
 
4
c      x = u*rad(v)*cos(v)    y = u*rad(v)*sin(v)
 
5
c  and where s(u,v) is a bicubic spline ( 0<=u<=1 , -pi<=v<=pi ), given
 
6
c  in its standard b-spline representation.
 
7
c
 
8
c  calling sequence:
 
9
c     f = evapol(tu,nu,tv,nv,c,rad,x,y)
 
10
c
 
11
c  input parameters:
 
12
c   tu    : real array, length nu, which contains the position of the
 
13
c           knots in the u-direction.
 
14
c   nu    : integer, giving the total number of knots in the u-direction
 
15
c   tv    : real array, length nv, which contains the position of the
 
16
c           knots in the v-direction.
 
17
c   nv    : integer, giving the total number of knots in the v-direction
 
18
c   c     : real array, length (nu-4)*(nv-4), which contains the
 
19
c           b-spline coefficients.
 
20
c   rad   : real function subprogram, defining the boundary of the
 
21
c           approximation domain. must be declared external in the
 
22
c           calling (sub)-program
 
23
c   x,y   : real values.
 
24
c           before entry x and y must be set to the co-ordinates of
 
25
c           the point where f(x,y) must be evaluated.
 
26
c
 
27
c  output parameter:
 
28
c   f     : real
 
29
c           on exit f contains the value of f(x,y)
 
30
c
 
31
c  other subroutines required:
 
32
c    bispev,fpbisp,fpbspl
 
33
c
 
34
c  references :
 
35
c    de boor c : on calculating with b-splines, j. approximation theory
 
36
c                6 (1972) 50-62.
 
37
c    cox m.g.  : the numerical evaluation of b-splines, j. inst. maths
 
38
c                applics 10 (1972) 134-149.
 
39
c    dierckx p. : curve and surface fitting with splines, monographs on
 
40
c                 numerical analysis, oxford university press, 1993.
 
41
c
 
42
c  author :
 
43
c    p.dierckx
 
44
c    dept. computer science, k.u.leuven
 
45
c    celestijnenlaan 200a, b-3001 heverlee, belgium.
 
46
c    e-mail : Paul.Dierckx@cs.kuleuven.ac.be
 
47
c
 
48
c  latest update : march 1989
 
49
c
 
50
c  ..scalar arguments..
 
51
      integer nu,nv
 
52
      real*8 x,y
 
53
c  ..array arguments..
 
54
      real*8 tu(nu),tv(nv),c((nu-4)*(nv-4))
 
55
c  ..user specified function
 
56
      real*8 rad
 
57
c  ..local scalars..
 
58
      integer ier
 
59
      real*8 u,v,r,f,one,dist
 
60
c  ..local arrays
 
61
      real*8 wrk(8)
 
62
      integer iwrk(2)
 
63
c  ..function references
 
64
      real*8 atan2,sqrt
 
65
c  ..
 
66
c  calculate the (u,v)-coordinates of the given point.
 
67
      one = 1
 
68
      u = 0.
 
69
      v = 0.
 
70
      dist = x**2+y**2
 
71
      if(dist.le.0.) go to 10
 
72
      v = atan2(y,x)
 
73
      r = rad(v)
 
74
      if(r.le.0.) go to 10
 
75
      u = sqrt(dist)/r
 
76
      if(u.gt.one) u = one
 
77
c  evaluate s(u,v)
 
78
  10  call bispev(tu,nu,tv,nv,c,3,3,u,1,v,1,f,wrk,8,iwrk,2,ier)
 
79
      evapol = f
 
80
      return
 
81
      end
 
82