1 #beginMacro UXC(X,FF,CC)
2 c coefficients
for a difference approximation to FF *
u[
CC]_X
4 coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) + (FF)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),1,
X)*
dri2(1)
5 coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) - (FF)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),1,
X)*
dri2(1)
7 coeff(
icf(0,+1,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(0,+1,0,eqn,CC),
i1,
i2,
i3) + (FF)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),2,
X)*
dri2(2)
8 coeff(
icf(0,-1,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(0,-1,0,eqn,CC),
i1,
i2,
i3) - (FF)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),2,
X)*
dri2(2)
12 #beginMacro UXYC(X,Y,FF,CC)
14 coeff(
icf(-1,-1,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(-1,-1,0,eqn,CC),
i1,
i2,
i3) + ( FF)*(
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),1,X)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),2,Y) +
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),1,Y)*
rx(
i1+
off(1),
i2+
off(2),
i3+
off(3),2,X))*
dri2(1)*
dri2(2)
15 coeff(
icf( 0,-1,0,eqn,CC),
i1,
i2,
i3) =
coeff(icf( 0,-1,0,eqn,CC),i1,i2,
i3) + ( FF)*(
rx(i1+
off(1),i2+off(2),
i3+off(3),2,X)*
rx(i1+off(1),i2+off(2),
i3+off(3),2,Y)*
dri(2)*
dri(2) -
rxx(i1,i2,
i3,2,X,Y)*
dri2(2))
17 coeff(icf(+1,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,-1,0,eqn,CC),i1,i2,i3) + (-FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,Y) +
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X))*
dri2(1)*
dri2(2)
19 coeff(icf(-1, 0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1, 0,0,eqn,CC),i1,i2,i3) + ( FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
dri(1)*
dri(1) -
rxx(i1,i2,i3,1,X,Y)*
dri2(1))
21 coeff(icf( 0, 0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0, 0,0,eqn,CC),i1,i2,i3) + (-2d0*FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
dri(1)*
dri(1) +
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,Y)*
dri(2)*
dri(2))
23 coeff(icf(+1, 0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1, 0,0,eqn,CC),i1,i2,i3) + ( FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
dri(1)*
dri(1) +
rxx(i1,i2,i3,1,X,Y)*
dri2(1))
25 coeff(icf(-1,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,+1,0,eqn,CC),i1,i2,i3) + (-FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,Y) +
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X))*
dri2(1)*
dri2(2)
27 coeff(icf( 0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,+1,0,eqn,CC),i1,i2,i3) + ( FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,Y)*
dri(2)*
dri(2) +
rxx(i1,i2,i3,2,X,Y)*
dri2(2))
29 coeff(icf(+1,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,+1,0,eqn,CC),i1,i2,i3) + ( FF)*(
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,Y) +
rx(i1+off(1),i2+off(2),i3+off(3),1,Y)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X))*
dri2(1)*
dri2(2)
33 #beginMacro UUXC(X,FF,UC,CC)
34 c coefficients
for a central difference approximation to FF *
u[UC]
u[CC]_X
36 c u[UC]^{
n+1} *
u[CC]^n_X
37 coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) =
coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) + (FF) *
ux(i1,i2,i3,CC,X)
39 c u[UC]^
n * (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
41 coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) + (FF) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC)*
dri2(1)
42 coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) - (FF) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri2(1)
45 coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) + (FF) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri2(2)
46 coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) - (FF) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri2(2)
50 #beginMacro UX4PC(X,FF,CC)
51 c coefficients
for a 3rd
order difference approximation to FF *
u[CC]_X
52 c (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
54 coeff(
icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(
icf(+1,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
dri(1)
55 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
56 coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
57 coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
60 coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
61 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
62 coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
63 coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
66 #beginMacro UX4MC(X,FF,CC)
67 c coefficients
for a 3rd
order difference approximation to FF *
u[CC]_X
68 c (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
70 coeff(
icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(
icf(-1,0,0,eqn,CC),i1,i2,i3) + (FF) * (alpha-.5d0) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
dri(1)
71 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
72 coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
73 coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri(1)
76 coeff(icf(0 ,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) + (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
77 coeff(icf(0 , 0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0, 0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
78 coeff(icf(0 ,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
79 coeff(icf(0 ,+2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+2,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri(2)
82 #beginMacro UUX4PC(X,FF,UC,CC)
83 c coefficients
for a 3rd
order difference approximation to FF *
u[UC]
u[CC]_X
85 c u[UC]^{
n+1} *
u[CC]^n_X
86 coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) =
coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) + (FF) *
ux4p(i1,i2,i3,CC,X)
88 c (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
89 UX4PC(X,(FF)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC),CC)
91 c
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
92 c
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
93 c
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
94 c
coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
97 c
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
98 c
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
99 c
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
100 c
coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
104 #beginMacro UUX4MC(X,FF,UC,CC)
105 c coefficients
for a 3rd
order difference approximation to FF *
u[UC]
u[CC]_X
107 c u[UC]^{
n+1} *
u[CC]^n_X
108 coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) =
coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) + (FF) * ux4m(i1,i2,i3,CC,X)
110 c u[UC]^
n * (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
111 UX4MC(X,(FF)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC),CC)
113 c
coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) + (FF) * (alpha-.5d0) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC)*
dri(1)
114 c coeff(
icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(
icf( 0,0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC)*
dri(1)
115 c
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
116 c
coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)
119 c
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) + (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
120 c
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
121 c
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
122 c
coeff(icf(0,+2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+2,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)
126 #beginMacro ULOGUX4MC(X,FF,UC,CC)
127 c coefficients
for a 3rd
order difference approximation to FF *
u[UC]*(log(
u[CC]))_X
129 c
u[UC]^{
n+1} *
u[CC]^n_X
130 coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) =
coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) + (FF) *
logux4m(i1+
off(1),i2+
off(2),i3+
off(3),CC,X)
133 coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(-1,0,0,eqn,CC),
i1,
i2,
i3) + (FF) * (alpha-.5d0) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC)*
dri(1)/
u(i1-1+
off(1),i2+
off(2),i3+
off(3),CC)
134 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1 +off(1), i2+off(2),i3+off(3),CC)
135 coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+1,0,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1+1+off(1),i2+off(2),i3+off(3),CC)
137 coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(+2,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1+2+off(1),i2+off(2),i3+off(3),CC)
140 coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) + (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2-1+off(2),i3+off(3),CC)
141 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,0,0,eqn,CC),i1,i2,i3) - (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2 +off(2),i3+off(3),CC)
142 coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) + (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2+1+off(2),i3+off(3),CC)
144 coeff(icf(0,+2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+2,0,eqn,CC),i1,i2,i3) - (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2+2+off(2),i3+off(3),CC)
149 #beginMacro ULOGUX4PC(X,FF,UC,CC)
150 c coefficients
for a 3rd
order difference approximation to FF *
u[UC]
u[CC]_X
152 c u[UC]^{
n+1} *
u[CC]^n_X
153 coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) =
coeff(
icf(0,0,0,eqn,UC),i1,i2,i3) + (FF) * logux4p(i1,i2,i3,CC,X)
155 c (r_X
u[CC]_r^{
n+1} + s_X
u[CC]_s^{
n+1} )
157 coeff(
icf(+1,0,0,eqn,CC),i1,i2,i3) =
coeff(
icf(+1,0,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
u(i1+
off(1),i2+
off(2),i3+
off(3),UC)*
dri(1)/
u(i1+1+
off(1),i2+
off(2),i3+
off(3),CC)
158 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1+off(1),i2+off(2),i3+off(3),CC)
159 coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1-1+off(1),i2+off(2),i3+off(3),CC)
161 coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-2,0,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(1)/
u(i1-2+off(1),i2+off(2),i3+off(3),CC)
164 coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) - (FF) * (alpha-.5d0) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2+1+off(2),i3+off(3),CC)
165 coeff(icf( 0,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,0,0,eqn,CC),i1,i2,i3) + (FF) * (3d0*alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2+off(2),i3+off(3),CC)
166 coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) - (FF) * (.5d0+3d0*alpha)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2-1+off(2),i3+off(3),CC)
168 coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-2,0,eqn,CC),i1,i2,i3) + (FF) * (alpha) *
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
u(i1+off(1),i2+off(2),i3+off(3),UC)*
dri(2)/
u(i1+off(1),i2-2+off(2),i3+off(3),CC)
172 #beginMacro UX2OR(X,FF,CC)
173 c linearize and add terms like FF *
u[CC]_X^2/
u[rc] to
the matrix
174 c FF *
u[CC]_{X}^2/
u[rc] --> FF * ( 2
u[CC]_X^
n u[CC]_X^{
n+1} -
uc[rc]^{
n+1}
u[CC]_X^
n/
uc[rc]^
n)/uc[rc]^
n
176 c FF * ( 2
u[CC]_X^
n u[CC]_X^{
n+1} )/
u[rc]^
n
178 coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) =
coeff(
icf(+1,0,0,eqn,CC),
i1,
i2,
i3) + (FF)*2d0*
ux(i1,i2,i3,CC,X)*
rx(i1+
off(1),i2+
off(2),i3+
off(3),1,X)*
dri2(1)/
u(i1+
off(1),i2+
off(2),i3+
off(3),rc)
179 coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) =
coeff(icf(-1,0,0,eqn,CC),i1,i2,i3) - (FF)*2d0*
ux(i1,i2,i3,CC,X)*
rx(i1+off(1),i2+off(2),i3+off(3),1,X)*
dri2(1)/
u(i1+off(1),i2+off(2),i3+off(3),rc)
181 coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,+1,0,eqn,CC),i1,i2,i3) + (FF)*2d0*
ux(i1,i2,i3,CC,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri2(2)/
u(i1+off(1),i2+off(2),i3+off(3),rc)
182 coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) =
coeff(icf(0,-1,0,eqn,CC),i1,i2,i3) - (FF)*2d0*
ux(i1,i2,i3,CC,X)*
rx(i1+off(1),i2+off(2),i3+off(3),2,X)*
dri2(2)/
u(i1+off(1),i2+off(2),i3+off(3),rc)
184 c - FF uc[rc]^{
n+1} (
u[CC]_X^
n)^2/uc[rc]^
n/uc[rc]^
n
185 coeff(
icf(0,0,0,eqn,rc),
i1,
i2,
i3) =
coeff(
icf(0,0,0,eqn,rc),
i1,
i2,
i3) - (FF) *
ux(i1,i2,i3,CC,X)**2/(
u(i1+
off(1),i2+
off(2),i3+
off(3),rc)**2)
189 c *wdh* 081214 -- xlf does not like +- --> change O1 to (O1) etc. below
190 #beginMacro UVCF(O1,O2,O3,FF,U,V,CFORRHS)
191 c linearize terms like FF *
u(U)*
u(V) at
the grid point offset by O1,
O2, O3
192 #If #CFORRHS == "RHS"
193 rhs(i1,i2,i3,eqn) =
rhs(i1,i2,i3,eqn) + (FF)*
u(i1+(O1)+
off(1),i2+(
O2)+
off(2),i3+(O3)+
off(3),
U)*
u(i1+(O1)+
off(1),i2+(
O2)+
off(2),i3+(O3)+
off(3),
V)
195 coeff(
icf((O1),(
O2),(O3),eqn,
U),i1,i2,i3) =
coeff(
icf((O1),(O2),(O3),eqn,U),i1,i2,i3) + (FF)*
u(i1+(O1)+
off(1),i2+(
O2)+
off(2),i3+(O3)+
off(3),
V)
196 coeff(
icf((O1),(
O2),(O3),eqn,
V),i1,i2,i3) =
coeff(
icf((O1),(O2),(O3),eqn,V),i1,i2,i3) + (FF)*
u(i1+(O1)+
off(1),i2+(
O2)+
off(2),i3+(O3)+
off(3),
U)
201 #beginMacro UVCF_OFFSET(OU1,OU2,OU3,OV1,OV2,OV3,FF,U,V,CFORRHS)
202 c linearize terms like FF *
u(U)*
u(V) at
the grid point offset by O1, O2, O3
203 #If #CFORRHS == "RHS"
204 rhs(i1,i2,i3,eqn) =
rhs(i1,i2,i3,eqn) + (FF)*
u(i1+(OU1)+
off(1),i2+(OU2)+
off(2),i3+(OU3)+
off(3),
U)*
u(i1+(OV1)+
off(1),i2+(OV2)+
off(2),i3+(OV3)+
off(3),
V)
206 coeff(
icf((OU1),(OU2),(OU3),eqn,
U),i1,i2,i3) =
coeff(
icf((OU1),(OU2),(OU3),eqn,U),i1,i2,i3) + (FF)*
u(i1+(OV1)+
off(1),i2+(OV2)+
off(2),i3+(OV3)+
off(3),
V)
207 coeff(
icf((OV1),(OV2),(OV3),eqn,
V),i1,i2,i3) =
coeff(
icf((OV1),(OV2),(OV3),eqn,V),i1,i2,i3) + (FF)*
u(i1+(OU1)+
off(1),i2+(OU2)+
off(2),i3+(OU3)+
off(3),
U)
212 #beginMacro AXIAVG(FF,U,V,CFORRHS)
215 drar = (FF)*
dri2(1)*jaci*jac(i1+
off(1)-1,i2+
off(2),i3+
off(3))*(xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1)-1,i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1)-1,i2+
off(2),i3+
off(3),1,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
216 UVCF(-1,0,0,drar,U,V,CFORRHS)
218 drar = (FF)*
dri2(1)*jaci*jac(i1+
off(1)+1,i2+
off(2),i3+
off(3))*(xyz(i1+
off(1)+1,i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1)+1,i2+
off(2),i3+
off(3),1,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
219 UVCF(+1,0,0,drar,U,V,CFORRHS)
221 drar = (FF)*
dri2(2)*jaci*jac(i1+
off(1),i2+
off(2)-1,i3+
off(3))*(xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2)-1,i3+
off(3),2))*
rx(i1+
off(1),i2+
off(2)-1,i3+
off(3),2,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
222 UVCF(0,-1,0,drar,U,V,CFORRHS)
224 drar = (FF)*
dri2(2)*jaci*jac(i1+
off(1),i2+
off(2)+1,i3+
off(3))*(xyz(i1+
off(1),i2+
off(2)+1,i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1),i2+
off(2)+1,i3+
off(3),2,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
225 UVCF(0,+1,0,drar,U,V,CFORRHS)
226 else if ( .
false. ) then
228 UVCF(-1,0,0,drar/xyz(i1-1,i2,i3,2),
U,
V,CFORRHS)
229 UVCF(+1,0,0,drar/xyz(i1+1,i2,i3,2),
U,V,CFORRHS)
230 UVCF(0,-1,0,drar/xyz(i1,i2-1,i3,2),
U,V,CFORRHS)
231 UVCF(0,+1,0,drar/xyz(i1,i2+1,i3,2),
U,V,CFORRHS)
234 UVCF(0,0,0,((FF)/(xyz(i1,i2,i3,2) )),
U,V,CFORRHS)
240 #beginMacro AXIAVG_1(FF,U,V,CFORRHS)
242 drar = (FF)*
dri2(1)*jaci*jac(i1+
off(1)-1,i2+
off(2),i3+
off(3))*(xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1)-1,i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1)-1,i2+
off(2),i3+
off(3),1,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
243 UVCF_OFFSET(0,0,0,-1,0,0,drar,U,V,CFORRHS)
245 drar = (FF)*
dri2(1)*jaci*jac(i1+
off(1)+1,i2+
off(2),i3+
off(3))*(xyz(i1+
off(1)+1,i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1)+1,i2+
off(2),i3+
off(3),1,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
246 UVCF_OFFSET(0,0,0,+1,0,0,drar,U,V,CFORRHS)
248 drar = (FF)*
dri2(2)*jaci*jac(i1+
off(1),i2+
off(2)-1,i3+
off(3))*(xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2)-1,i3+
off(3),2))*
rx(i1+
off(1),i2+
off(2)-1,i3+
off(3),2,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
249 UVCF_OFFSET(0,0,0,0,-1,0,drar,U,V,CFORRHS)
251 drar = (FF)*
dri2(2)*jaci*jac(i1+
off(1),i2+
off(2)+1,i3+
off(3))*(xyz(i1+
off(1),i2+
off(2)+1,i3+
off(3),2)-xyz(i1+
off(1),i2+
off(2),i3+
off(3),2))*
rx(i1+
off(1),i2+
off(2)+1,i3+
off(3),2,
d)/xyz(i1+
off(1),i2+
off(2),i3+
off(3),2)
252 UVCF_OFFSET(0,0,0,0,+1,0,drar,U,V,CFORRHS)