gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
putit.f
Go to the documentation of this file.
1  subroutine putit ( t, kpm, left, scrtch, dbiatx, q, nrow, b )
2 
3 c*********************************************************************72
4 c
5 cc PUTIT puts together one block of the collocation equation system.
6 c
7 c from * a practical guide to splines * by c. de Boor (7 may 92)
8 calls bsplvd(bsplvb),difequ(*)
9 c to be called by e q b l o k .
10 c
11 c puts together one block of the collocation equation system
12 c
13 c****** i n p u t ******
14 c t knot sequence, of size left+kpm (at least)
15 c kpm order of spline
16 c left integer indicating interval of interest, viz the interval
17 c (t(left), t(left+1))
18 c nrow number of rows in block to be put together
19 c
20 c****** w o r k a r e a ******
21 c scrtch used in bsplvd, of size (kpm,kpm)
22 c dbiatx used to contain derivatives of b-splines, of size (kpm,m+1)
23 c with dbiatx(j,i+1) containing the i-th derivative of the
24 c j-th b-spline of interest
25 c
26 c****** o u t p u t ******
27 c q the block, of size (nrow,kpm)
28 c b the corresponding piece of the right side, of size (nrow)
29 c
30 c****** m e t h o d ******
31 c the k collocation equations for the interval (t(left),t(left+1))
32 c are constructed with the aid of the subroutine d i f e q u ( 2, .,
33 c . ) and interspersed (in order) with the side conditions (if any) in
34 c this interval, using d i f e q u ( 3, ., . ) for the information.
35 c the block q has kpm columns, corresponding to the kpm b-
36 c splines of order kpm which have the interval (t(left),t(left+1))
37 c in their support. the block's diagonal is part of the diagonal of the
38 c total system. the first equation in this block not overlapped by the
39 c preceding block is therefore equation l o w r o w , with lowrow = 1+
40 c number of side conditions in preceding intervals (or blocks).
41 c
42  implicit none
43 
44  integer kpm,left,nrow, i,irow,iside,itermx,j,k,ll,lowrow,m,mode
45  & ,mp1
46  double precision b(1),dbiatx(kpm,1),q(nrow,kpm),scrtch(1),t(1),
47  & dx,rho,sum
48  & ,v(20),xm,xside,xx
49  common /side/ m, iside, xside(10)
50  common /other/ itermx,k,rho(19)
51  mp1 = m+1
52  do 10 j=1,kpm
53  do 10 i=1,nrow
54  10 q(i,j) = 0.0d+00
55  xm = (t(left+1)+t(left))/2.0d+00
56  dx = (t(left+1)-t(left))/2.0d+00
57 c
58  ll = 1
59  lowrow = iside
60  do 30 irow=lowrow,nrow
61  if (ll .gt. k) go to 22
62  mode = 2
63 c next collocation point is ...
64  xx = xm + dx*rho(ll)
65  ll = ll + 1
66 c the corresp.collocation equation is next unless the next side
67 c condition occurs at a point at, or to the left of, the next
68 c collocation point.
69  if (iside .gt. m) go to 24
70  if (xside(iside) .gt. xx) go to 24
71  ll = ll - 1
72  22 mode = 3
73  xx = xside(iside)
74  24 call difequ ( mode, xx, v )
75 c the next equation, a collocation equation (mode = 2) or a side
76 c condition (mode = 3), reads
77 c (*) (v(m+1)*d**m + v(m)*d**(m-1) +...+ v(1)*d**0)f(xx) = v(m+2)
78 c in terms of the info supplied by difequ . the corresponding
79 c equation for the b-coeffs of f therefore has the left side of
80 c (*), evaluated at each of the kpm b-splines having xx in
81 c their support, as its kpm possibly nonzero coefficients.
82  call bsplvd ( t, kpm, xx, left, scrtch, dbiatx, mp1 )
83  do 26 j=1,kpm
84  sum = 0.0d+00
85  do 25 i=1,mp1
86  25 sum = v(i)*dbiatx(j,i) + sum
87  26 q(irow,j) = sum
88  30 b(irow) = v(m+2)
89  return
90  end
subroutine bsplvd(t, k, x, left, a, dbiatx, nderiv)
Definition: bsplvd.f:2
subroutine putit(t, kpm, left, scrtch, dbiatx, q, nrow, b)
Definition: putit.f:2
subroutine difequ(mode, xx, v)
Definition: difequ.f:2
gtkIOStream: /tmp/gtkiostream/src/deBoor/putit.f Source File
GTK+ IOStream  Beta