Add some basic letsimp tests based on bug #3950
[maxima.git] / share / colnew / fortran / horder.f
blob14e594bd11c6a2ae316890a4f473a21328e16396
1 SUBROUTINE HORDER (I, UHIGH, HI, DMZ, NCOMP, K)
3 C**********************************************************************
5 C purpose
6 C determine highest order (piecewise constant) derivatives
7 C of the current collocation solution
9 C variables
10 C hi - the stepsize, hi = xi(i+1) - xi(i)
11 C dmz - vector of mj-th derivative of the solution
12 C uhigh - the array of highest order (piecewise constant)
13 C derivatives of the approximate solution on
14 C (xi(i),xi(i+1)), viz,
15 C (k+mj-1)
16 C uhigh(j) = u (x) on (xi(i),xi(i+1))
17 C j
19 C**********************************************************************
21 IMPLICIT REAL*8 (A-H,O-Z)
22 DIMENSION UHIGH(1), DMZ(1)
24 COMMON /COLLOC/ RHO(7), COEF(49)
26 DN = 1.D0 / HI**(K-1)
28 C... loop over the ncomp solution components
30 DO 10 ID = 1, NCOMP
31 UHIGH(ID) = 0.D0
32 10 CONTINUE
33 KIN = 1
34 IDMZ = (I-1) * K * NCOMP + 1
35 DO 30 J = 1, K
36 FACT = DN * COEF(KIN)
37 DO 20 ID = 1, NCOMP
38 UHIGH(ID) = UHIGH(ID) + FACT * DMZ(IDMZ)
39 IDMZ = IDMZ + 1
40 20 CONTINUE
41 KIN = KIN + K
42 30 CONTINUE
43 RETURN
44 END