In ASDF configuration file, move module numerical-functions below algebraic-database,
[maxima.git] / share / colnew / ex2 / prob2.f
blobe6bb696397b234a51880358ebb75333fb6ec84c7
1 C MAN 10
2 C---------------------------------------------------------------- MAN 20
3 C MAN 30
4 C PROBLEM 2 - SEE COMPANION PAPER MAN 40
5 C MAN 50
6 implicit real*8 (a-h, o-z)
7 REAL*8 ZETA(4), FSPACE(40000), TOL(4), Z(4) MAN 60
8 INTEGER M(2), IPAR(11), ISPACE(2500), LTOL(4) MAN 70
9 COMMON EPS, DMU, EPS4MU, GAMMA, XT MAN 80
10 EXTERNAL SOLUTN, FSUB, DFSUB, GSUB, DGSUB MAN 90
11 C DEFINE CONSTANTS, PRINT A HEADING. MAN 100
12 GAMMA = 1.1d0 MAN 110
13 EPS = .01d0 MAN 120
14 DMU = EPS MAN 130
15 EPS4MU = EPS**4/DMU MAN 140
16 XT = SQRT(2.*(GAMMA-1.)/GAMMA) MAN 150
17 WRITE (6,99999) GAMMA, XT, EPS, DMU, EPS4MU MAN 160
18 C DEFINE NO. OF DIFFERENTIAL EQUATIONS. MAN 170
19 NCOMP = 2 MAN 180
20 C ORDERS MAN 190
21 M(1) = 2 MAN 200
22 M(2) = 2 MAN 210
23 C INTERVAL ENDS MAN 220
24 ALEFT = 0. MAN 230
25 ARIGHT = 1. MAN 240
26 C LOCATIONS OF SIDE CONDITIONS MAN 250
27 ZETA(1) = 0. MAN 260
28 ZETA(2) = 0. MAN 270
29 ZETA(3) = 1. MAN 280
30 ZETA(4) = 1. MAN 290
31 C IPAR VALUES MAN 300
32 C A NONLINEAR PROBLEM MAN 310
33 IPAR(1) = 1 MAN 320
34 C 4 COLLOCATION POINTS PER SUBINTERVAL MAN 330
35 IPAR(2) = 4 MAN 340
36 C INITIAL UNIFORM MESH OF 10 SUBINTERVALS MAN 350
37 IPAR(3) = 10 MAN 360
38 IPAR(8) = 0 MAN 370
39 C DIMENSION OF REAL WORK ARRAY FSPACE IS 40000 MAN 380
40 IPAR(5) = 40000 MAN 390
41 C DIMENSION OF INTEGER WORK ARRAY ISPACE IS 2500 MAN 400
42 IPAR(6) = 2500 MAN 410
43 C (THESE DIMENSIONS OF FSPACE AND ISPACE MAN 420
44 C ENABLE COLSYS TO USE MESHES OF UP TO 192 INTERVALS.) MAN 430
45 C PRINT FULL OUTPUT. MAN 440
46 IPAR(7) = -1 MAN 450
47 C INITIAL APPROXIMATION FOR NONLINEAR ITERATION IS PROVIDED MAN 460
48 C IN SOLUTN MAN 470
49 IPAR(9) = 1 MAN 480
50 C A REGULAR PROBLEM MAN 490
51 IPAR(10) = 0 MAN 500
52 C NO FIXED POINTS IN THE MESH MAN 510
53 IPAR(11) = 0 MAN 520
54 C TOLERANCES ON ALL COMPONENTS MAN 530
55 IPAR(4) = 4 MAN 540
56 DO 10 I=1,4 MAN 550
57 LTOL(I) = I MAN 560
58 TOL(I) = 1.d-5 MAN 570
59 10 CONTINUE MAN 580
60 C CALL COLSYS MAN 590
61 CALL COLSYS(NCOMP, M, ALEFT, ARIGHT, ZETA, IPAR, LTOL, TOL, MAN 600
62 * FIXPNT, ISPACE, FSPACE, IFLAG, FSUB, DFSUB, GSUB, DGSUB, SOLUTN) MAN 610
63 C PRINT VALUES OF THE OBTAINED APPROXIMATE SOLUTION AT POINTS MAN 620
64 C X = 0,.05, ..., 1. MAN 630
65 X = 0. MAN 640
66 WRITE (6,99998) MAN 650
67 NP1 = 21 MAN 660
68 DO 20 III=1,NP1 MAN 670
69 CALL APPSLN(X, Z, FSPACE, ISPACE) MAN 680
70 WRITE (6,99997) X, Z MAN 690
71 X = X + .05d0 MAN 700
72 20 CONTINUE MAN 710
73 STOP MAN 720
74 99999 FORMAT (1H1, 27HDIMPLING OF SPHERICAL CAPS./8H GAMMA =, MAN 730
75 * F7.2/6H XT =, E12.5/6H EPS =, E12.5/6H MU =, E12.5/9H EPS**4/M,MAN 740
76 * 3HU =, E12.5) MAN 750
77 99998 FORMAT (1H1, 44H X PHI DPHI , MAN 760
78 * 23H PSI DPSI/) MAN 770
79 99997 FORMAT (6X, F5.2, 4X, 6E15.5) MAN 780
80 END MAN 790