1#include <math.h>
2#include "applu_share.h"
3#include "applu_macros.h"
4
5void setcoeff() {
6
7      dxi   = 1.0 / ( nx0 - 1 );
8      deta  = 1.0 / ( ny0 - 1 );
9      dzeta = 1.0 / ( nz0 - 1 );
10
11      tx1 = 1.0 / ( dxi * dxi );
12      tx2 = 1.0 / ( 2.0 * dxi );
13      tx3 = 1.0 / dxi;
14
15      ty1 = 1.0 / ( deta * deta );
16      ty2 = 1.0 / ( 2.0 * deta );
17      ty3 = 1.0 / deta;
18
19      tz1 = 1.0 / ( dzeta * dzeta );
20      tz2 = 1.0 / ( 2.0 * dzeta );
21      tz3 = 1.0 / dzeta;
22
23      ii1 = 2;
24      ii2 = nx0 - 1;
25      ji1 = 2;
26      ji2 = ny0 - 2;
27      ki1 = 3;
28      ki2 = nz0 - 1;
29
30//c---------------------------------------------------------------------
31//c   diffusion coefficients
32//c---------------------------------------------------------------------
33      dx1 = 0.75;
34      dx2 = dx1;
35      dx3 = dx1;
36      dx4 = dx1;
37      dx5 = dx1;
38
39      dy1 = 0.75;
40      dy2 = dy1;
41      dy3 = dy1;
42      dy4 = dy1;
43      dy5 = dy1;
44
45      dz1 = 1.00;
46      dz2 = dz1;
47      dz3 = dz1;
48      dz4 = dz1;
49      dz5 = dz1;
50
51//c---------------------------------------------------------------------
52//c   fourth difference dissipation
53//c---------------------------------------------------------------------
54      dssp = ( fmax (dx1, fmax (dy1, dz1) ) ) / 4.0;
55
56//c---------------------------------------------------------------------
57//c   coefficients of the exact solution to the first pde
58//c---------------------------------------------------------------------
59      ce(1,1) = 2.0;
60      ce(1,2) = 0.0;
61      ce(1,3) = 0.0;
62      ce(1,4) = 4.0;
63      ce(1,5) = 5.0;
64      ce(1,6) = 3.0;
65      ce(1,7) = 5.0e-01;
66      ce(1,8) = 2.0e-02;
67      ce(1,9) = 1.0e-02;
68      ce(1,10) = 3.0e-02;
69      ce(1,11) = 5.0e-01;
70      ce(1,12) = 4.0e-01;
71      ce(1,13) = 3.0e-01;
72
73//c---------------------------------------------------------------------
74//c   coefficients of the exact solution to the second pde
75//c---------------------------------------------------------------------
76      ce(2,1) = 1.0;
77      ce(2,2) = 0.0;
78      ce(2,3) = 0.0;
79      ce(2,4) = 0.0;
80      ce(2,5) = 1.0;
81      ce(2,6) = 2.0;
82      ce(2,7) = 3.0;
83      ce(2,8) = 1.0e-02;
84      ce(2,9) = 3.0e-02;
85      ce(2,10) = 2.0e-02;
86      ce(2,11) = 4.0e-01;
87      ce(2,12) = 3.0e-01;
88      ce(2,13) = 5.0e-01;
89
90//c---------------------------------------------------------------------
91//c   coefficients of the exact solution to the third pde
92//c---------------------------------------------------------------------
93      ce(3,1) = 2.0;
94      ce(3,2) = 2.0;
95      ce(3,3) = 0.0;
96      ce(3,4) = 0.0;
97      ce(3,5) = 0.0;
98      ce(3,6) = 2.0;
99      ce(3,7) = 3.0;
100      ce(3,8) = 4.0e-02;
101      ce(3,9) = 3.0e-02;
102      ce(3,10) = 5.0e-02;
103      ce(3,11) = 3.0e-01;
104      ce(3,12) = 5.0e-01;
105      ce(3,13) = 4.0e-01;
106
107//c---------------------------------------------------------------------
108//c   coefficients of the exact solution to the fourth pde
109//c---------------------------------------------------------------------
110      ce(4,1) = 2.0;
111      ce(4,2) = 2.0;
112      ce(4,3) = 0.0;
113      ce(4,4) = 0.0;
114      ce(4,5) = 0.0;
115      ce(4,6) = 2.0;
116      ce(4,7) = 3.0;
117      ce(4,8) = 3.0e-02;
118      ce(4,9) = 5.0e-02;
119      ce(4,10) = 4.0e-02;
120      ce(4,11) = 2.0e-01;
121      ce(4,12) = 1.0e-01;
122      ce(4,13) = 3.0e-01;
123
124//c---------------------------------------------------------------------
125//c   coefficients of the exact solution to the fifth pde
126//c---------------------------------------------------------------------
127      ce(5,1) = 5.0;
128      ce(5,2) = 4.0;
129      ce(5,3) = 3.0;
130      ce(5,4) = 2.0;
131      ce(5,5) = 1.0e-01;
132      ce(5,6) = 4.0e-01;
133      ce(5,7) = 3.0e-01;
134      ce(5,8) = 5.0e-02;
135      ce(5,9) = 4.0e-02;
136      ce(5,10) = 3.0e-02;
137      ce(5,11) = 1.0e-01;
138      ce(5,12) = 3.0e-01;
139      ce(5,13) = 2.0e-01;
140
141      return;
142}
143
144
145
146