gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
eqblok.f
Go to the documentation of this file.
1  subroutine eqblok ( t, n, kpm, work1, work2,
2  & bloks, lenblk, integs, nbloks, b )
3 
4 c*********************************************************************72
5 c
6 cc EQBLOK is to be called in COLLOC.
7 c
8 c from * a practical guide to splines * by c. de boor
9 calls putit(difequ,bsplvd(bsplvb))
10 c to be called in c o l l o c
11 c
12 c****** i n p u t ******
13 c t the knot sequence, of length n+kpm
14 c n the dimension of the approximating spline space, i.e., the order
15 c of the linear system to be constructed.
16 c kpm = k+m, the order of the approximating spline
17 c lenblk the maximum length of the array bloks as allowed by the
18 c dimension statement in colloc .
19 c
20 c****** w o r k a r e a s ******
21 c work1 used in putit, of size (kpm,kpm)
22 c work2 used in putit, of size (kpm,m+1)
23 c
24 c****** o u t p u t ******
25 c bloks the coefficient matrix of the linear system, stored in al-
26 c most block diagonal form, of size
27 c kpm*sum(integs(1,i) , i=1,...,nbloks)
28 c integs an integer array, of size (3,nbloks), describing the block
29 c structure.
30 c integs(1,i) = number of rows in block i
31 c integs(2,i) = number of columns in block i
32 c integs(3,i) = number of elimination steps which can be
33 c carried out in block i before pivoting might
34 c bring in an equation from the next block.
35 c nbloks number of blocks, equals number of polynomial pieces
36 c b the right side of the linear system, stored corresponding to the
37 c almost block diagonal form, of size sum(integs(1,i) , i=1,...,
38 c nbloks).
39 c
40 c****** m e t h o d ******
41 c each breakpoint interval gives rise to a block in the linear system.
42 c this block is determined by the k colloc.equations in the interval
43 c with the side conditions (if any) in the interval interspersed ap-
44 c propriately, and involves the kpm b-splines having the interval in
45 c their support. correspondingly, such a block has nrow = k + isidel
46 c rows, with isidel = number of side conditions in this and the prev-
47 c ious intervals, and ncol = kpm columns.
48 c further, because the interior knots have multiplicity k, we can
49 c carry out (in slvblk) k elimination steps in a block before pivot-
50 c ing might involve an equation from the next block. in the last block,
51 c of course, all kpm elimination steps will be carried out (in slvblk).
52 c
53 c see the detailed comments in the solveblok package for further in-
54 c formation about the almost block diagonal form used here.
55 c
56  implicit none
57 
58  integer integs(3,1),kpm,lenblk,n,nbloks, i,index,indexb,iside
59  & ,isidel,itermx,k,left,m,nrow
60  double precision b(1),bloks(1),t(1),work1(1),work2(1), rho,xside
61  common /side/ m, iside, xside(10)
62  common /other/ itermx,k,rho(19)
63  index = 1
64  indexb = 1
65  i = 0
66  iside = 1
67  do 20 left=kpm,n,k
68  i = i+1
69 c determine integs(.,i)
70  integs(2,i) = kpm
71  if (left .lt. n) go to 14
72  integs(3,i) = kpm
73  isidel = m
74  go to 16
75  14 integs(3,i) = k
76 c at this point, iside-1 gives the number of side conditions
77 c incorporated so far. adding to this the side conditions in the
78 c current interval gives the number isidel .
79  isidel = iside-1
80  15 if (isidel .eq. m) go to 16
81  if (xside(isidel+1) .ge. t(left+1))
82  & go to 16
83  isidel = isidel+1
84  go to 15
85  16 nrow = k + isidel
86  integs(1,i) = nrow
87 c the detailed equations for this block are generated and put
88 c together in p u t i t .
89  if (lenblk .lt. index+nrow*kpm-1)go to 999
90  call putit(t,kpm,left,work1,work2,bloks(index),nrow,b(indexb))
91  index = index + nrow*kpm
92  20 indexb = indexb + nrow
93  nbloks = i
94  return
95  999 print 699,lenblk
96  699 format(11h **********/23h the assigned dimension,i5
97  & ,38h for bloks in colloc is too small.)
98  stop
99  end
subroutine colloc(aleft, aright, lbegin, iorder, ntimes, addbrk, relerr)
Definition: colloc.f:2
subroutine eqblok(t, n, kpm, work1, work2, bloks, lenblk, integs, nbloks, b)
Definition: eqblok.f:3
subroutine putit(t, kpm, left, scrtch, dbiatx, q, nrow, b)
Definition: putit.f:2
gtkIOStream: /tmp/gtkiostream/src/deBoor/eqblok.f Source File
GTK+ IOStream  Beta