1
subroutine surev(idim,tu,nu,tv,nv,c,u,mu,v,mv,f,mf,wrk,lwrk,
3
c subroutine surev evaluates on a grid (u(i),v(j)),i=1,...,mu; j=1,...
4
c ,mv a bicubic spline surface of dimension idim, given in the
5
c b-spline representation.
8
c call surev(idim,tu,nu,tv,nv,c,u,mu,v,mv,f,mf,wrk,lwrk,
12
c idim : integer, specifying the dimension of the spline surface.
13
c tu : real array, length nu, which contains the position of the
14
c knots in the u-direction.
15
c nu : integer, giving the total number of knots in the u-direction
16
c tv : real array, length nv, which contains the position of the
17
c knots in the v-direction.
18
c nv : integer, giving the total number of knots in the v-direction
19
c c : real array, length (nu-4)*(nv-4)*idim, which contains the
20
c b-spline coefficients.
21
c u : real array of dimension (mu).
22
c before entry u(i) must be set to the u co-ordinate of the
23
c i-th grid point along the u-axis.
24
c tu(4)<=u(i-1)<=u(i)<=tu(nu-3), i=2,...,mu.
25
c mu : on entry mu must specify the number of grid points along
27
c v : real array of dimension (mv).
28
c before entry v(j) must be set to the v co-ordinate of the
29
c j-th grid point along the v-axis.
30
c tv(4)<=v(j-1)<=v(j)<=tv(nv-3), j=2,...,mv.
31
c mv : on entry mv must specify the number of grid points along
33
c mf : on entry, mf must specify the dimension of the array f.
35
c wrk : real array of dimension lwrk. used as workspace.
36
c lwrk : integer, specifying the dimension of wrk.
38
c iwrk : integer array of dimension kwrk. used as workspace.
39
c kwrk : integer, specifying the dimension of iwrk. kwrk >= mu+mv.
42
c f : real array of dimension (mf).
43
c on succesful exit f(mu*mv*(l-1)+mv*(i-1)+j) contains the
44
c l-th co-ordinate of the bicubic spline surface at the
45
c point (u(i),v(j)),l=1,...,idim,i=1,...,mu;j=1,...,mv.
46
c ier : integer error flag
47
c ier=0 : normal return
48
c ier=10: invalid input data (see restrictions)
51
c mu >=1, mv >=1, lwrk>=4*(mu+mv), kwrk>=mu+mv , mf>=mu*mv*idim
52
c tu(4) <= u(i-1) <= u(i) <= tu(nu-3), i=2,...,mu
53
c tv(4) <= v(j-1) <= v(j) <= tv(nv-3), j=2,...,mv
55
c other subroutines required:
59
c de boor c : on calculating with b-splines, j. approximation theory
61
c cox m.g. : the numerical evaluation of b-splines, j. inst. maths
62
c applics 10 (1972) 134-149.
63
c dierckx p. : curve and surface fitting with splines, monographs on
64
c numerical analysis, oxford university press, 1993.
68
c dept. computer science, k.u.leuven
69
c celestijnenlaan 200a, b-3001 heverlee, belgium.
70
c e-mail : Paul.Dierckx@cs.kuleuven.ac.be
72
c latest update : march 1987
74
c ..scalar arguments..
75
integer idim,nu,nv,mu,mv,mf,lwrk,kwrk,ier
78
real*8 tu(nu),tv(nv),c((nu-4)*(nv-4)*idim),u(mu),v(mv),f(mf),
83
c before starting computations a data check is made. if the input data
84
c are invalid control is immediately repassed to the calling program.
86
if(mf.lt.mu*mv*idim) go to 100
88
if(lwrk.lt.4*muv) go to 100
89
if(kwrk.lt.muv) go to 100
90
if (mu.lt.1) go to 100
94
if(u(i).lt.u(i-1)) go to 100
96
30 if (mv.lt.1) go to 100
100
if(v(i).lt.v(i-1)) go to 100
103
call fpsuev(idim,tu,nu,tv,nv,c,u,mu,v,mv,f,wrk(1),wrk(4*mu+1),
104
* iwrk(1),iwrk(mu+1))