Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / smpi / NAS / LU / setcoeff.f
1
2 c---------------------------------------------------------------------
3 c---------------------------------------------------------------------
4
5       subroutine setcoeff
6
7 c---------------------------------------------------------------------
8 c---------------------------------------------------------------------
9
10       implicit none
11
12       include 'applu.incl'
13
14 c---------------------------------------------------------------------
15 c  local variables
16 c---------------------------------------------------------------------
17
18
19 c---------------------------------------------------------------------
20 c   set up coefficients
21 c---------------------------------------------------------------------
22       dxi = 1.0d+00 / ( nx0 - 1 )
23       deta = 1.0d+00 / ( ny0 - 1 )
24       dzeta = 1.0d+00 / ( nz0 - 1 )
25
26       tx1 = 1.0d+00 / ( dxi * dxi )
27       tx2 = 1.0d+00 / ( 2.0d+00 * dxi )
28       tx3 = 1.0d+00 / dxi
29
30       ty1 = 1.0d+00 / ( deta * deta )
31       ty2 = 1.0d+00 / ( 2.0d+00 * deta )
32       ty3 = 1.0d+00 / deta
33
34       tz1 = 1.0d+00 / ( dzeta * dzeta )
35       tz2 = 1.0d+00 / ( 2.0d+00 * dzeta )
36       tz3 = 1.0d+00 / dzeta
37
38       ii1 = 2
39       ii2 = nx0 - 1
40       ji1 = 2
41       ji2 = ny0 - 2
42       ki1 = 3
43       ki2 = nz0 - 1
44
45 c---------------------------------------------------------------------
46 c   diffusion coefficients
47 c---------------------------------------------------------------------
48       dx1 = 0.75d+00
49       dx2 = dx1
50       dx3 = dx1
51       dx4 = dx1
52       dx5 = dx1
53
54       dy1 = 0.75d+00
55       dy2 = dy1
56       dy3 = dy1
57       dy4 = dy1
58       dy5 = dy1
59
60       dz1 = 1.00d+00
61       dz2 = dz1
62       dz3 = dz1
63       dz4 = dz1
64       dz5 = dz1
65
66 c---------------------------------------------------------------------
67 c   fourth difference dissipation
68 c---------------------------------------------------------------------
69       dssp = ( max (dx1, dy1, dz1 ) ) / 4.0d+00
70
71 c---------------------------------------------------------------------
72 c   coefficients of the exact solution to the first pde
73 c---------------------------------------------------------------------
74       ce(1,1) = 2.0d+00
75       ce(1,2) = 0.0d+00
76       ce(1,3) = 0.0d+00
77       ce(1,4) = 4.0d+00
78       ce(1,5) = 5.0d+00
79       ce(1,6) = 3.0d+00
80       ce(1,7) = 5.0d-01
81       ce(1,8) = 2.0d-02
82       ce(1,9) = 1.0d-02
83       ce(1,10) = 3.0d-02
84       ce(1,11) = 5.0d-01
85       ce(1,12) = 4.0d-01
86       ce(1,13) = 3.0d-01
87
88 c---------------------------------------------------------------------
89 c   coefficients of the exact solution to the second pde
90 c---------------------------------------------------------------------
91       ce(2,1) = 1.0d+00
92       ce(2,2) = 0.0d+00
93       ce(2,3) = 0.0d+00
94       ce(2,4) = 0.0d+00
95       ce(2,5) = 1.0d+00
96       ce(2,6) = 2.0d+00
97       ce(2,7) = 3.0d+00
98       ce(2,8) = 1.0d-02
99       ce(2,9) = 3.0d-02
100       ce(2,10) = 2.0d-02
101       ce(2,11) = 4.0d-01
102       ce(2,12) = 3.0d-01
103       ce(2,13) = 5.0d-01
104
105 c---------------------------------------------------------------------
106 c   coefficients of the exact solution to the third pde
107 c---------------------------------------------------------------------
108       ce(3,1) = 2.0d+00
109       ce(3,2) = 2.0d+00
110       ce(3,3) = 0.0d+00
111       ce(3,4) = 0.0d+00
112       ce(3,5) = 0.0d+00
113       ce(3,6) = 2.0d+00
114       ce(3,7) = 3.0d+00
115       ce(3,8) = 4.0d-02
116       ce(3,9) = 3.0d-02
117       ce(3,10) = 5.0d-02
118       ce(3,11) = 3.0d-01
119       ce(3,12) = 5.0d-01
120       ce(3,13) = 4.0d-01
121
122 c---------------------------------------------------------------------
123 c   coefficients of the exact solution to the fourth pde
124 c---------------------------------------------------------------------
125       ce(4,1) = 2.0d+00
126       ce(4,2) = 2.0d+00
127       ce(4,3) = 0.0d+00
128       ce(4,4) = 0.0d+00
129       ce(4,5) = 0.0d+00
130       ce(4,6) = 2.0d+00
131       ce(4,7) = 3.0d+00
132       ce(4,8) = 3.0d-02
133       ce(4,9) = 5.0d-02
134       ce(4,10) = 4.0d-02
135       ce(4,11) = 2.0d-01
136       ce(4,12) = 1.0d-01
137       ce(4,13) = 3.0d-01
138
139 c---------------------------------------------------------------------
140 c   coefficients of the exact solution to the fifth pde
141 c---------------------------------------------------------------------
142       ce(5,1) = 5.0d+00
143       ce(5,2) = 4.0d+00
144       ce(5,3) = 3.0d+00
145       ce(5,4) = 2.0d+00
146       ce(5,5) = 1.0d-01
147       ce(5,6) = 4.0d-01
148       ce(5,7) = 3.0d-01
149       ce(5,8) = 5.0d-02
150       ce(5,9) = 4.0d-02
151       ce(5,10) = 3.0d-02
152       ce(5,11) = 1.0d-01
153       ce(5,12) = 3.0d-01
154       ce(5,13) = 2.0d-01
155
156       return
157       end
158
159