PISM, A Parallel Ice Sheet Model
stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
src
stressbalance
ssa
doc
discretization
ssafd_code.cc
Go to the documentation of this file.
1
const
double
dx2
= dx*dx,
dy2
= dy*dy,
d4
= 4*dx*dy,
d2
= 2*dx*dy;
2
3
/* Coefficients of the discretization of the first equation; u first, then v. */
4
double
eq1
[] = {
5
0, -c_n/
dy2
, 0,
6
-4*c_w/
dx2
, (c_s+c_n)/
dy2
+(4*c_w+4*c_e)/
dx2
, -4*c_e/
dx2
,
7
0, -c_s/
dy2
, 0,
8
c_n/
d4
+c_w/
d2
, (c_w-c_e)/
d2
, -c_n/
d4
-c_e/
d2
,
9
(c_n-c_s)/
d4
, 0, (c_s-c_n)/
d4
,
10
-c_s/
d4
-c_w/
d2
, (c_e-c_w)/
d2
, c_s/
d4
+c_e/
d2
,
11
};
12
13
/* Coefficients of the discretization of the second equation; u first, then v. */
14
double
eq2
[] = {
15
c_w/
d4
+c_n/
d2
, (c_w-c_e)/
d4
, -c_e/
d4
-c_n/
d2
,
16
(c_n-c_s)/
d2
, 0, (c_s-c_n)/
d2
,
17
-c_w/
d4
-c_s/
d2
, (c_e-c_w)/
d4
, c_e/
d4
+c_s/
d2
,
18
0, -4*c_n/
dy2
, 0,
19
-c_w/
dx2
, (4*c_s+4*c_n)/
dy2
+(c_w+c_e)/
dx2
, -c_e/
dx2
,
20
0, -4*c_s/
dy2
, 0,
21
};
22
23
/* i indices */
24
const
int
I
[] = {
25
i-1, i, i+1,
26
i-1, i, i+1,
27
i-1, i, i+1,
28
i-1, i, i+1,
29
i-1, i, i+1,
30
i-1, i, i+1,
31
};
32
33
/* j indices */
34
const
int
J
[] = {
35
j+1, j+1, j+1,
36
j, j, j,
37
j-1, j-1, j-1,
38
j+1, j+1, j+1,
39
j, j, j,
40
j-1, j-1, j-1,
41
};
42
43
/* component indices */
44
const
int
C
[] = {
45
0, 0, 0,
46
0, 0, 0,
47
0, 0, 0,
48
1, 1, 1,
49
1, 1, 1,
50
1, 1, 1,
51
};
52
J
const int J[]
Definition:
ssafd_code.cc:34
eq1
double eq1[]
Definition:
ssafd_code.cc:4
I
const int I[]
Definition:
ssafd_code.cc:24
d2
const double d2
Definition:
ssafd_code.cc:1
C
const int C[]
Definition:
ssafd_code.cc:44
d4
const double d4
Definition:
ssafd_code.cc:1
dy2
const double dy2
Definition:
ssafd_code.cc:1
eq2
double eq2[]
Definition:
ssafd_code.cc:14
dx2
const double dx2
Definition:
ssafd_code.cc:1
Generated by
1.9.1