1 |
ce107 |
1.1 |
C |
2 |
|
|
C /==========================================================\ |
3 |
|
|
C | CG2D.h | |
4 |
|
|
C | o Two-dimensional conjugate gradient solver header. | |
5 |
|
|
C |==========================================================| |
6 |
|
|
C | The common blocks set up here are used in the elliptic | |
7 |
|
|
C | equation inversion. They are also used as the interface | |
8 |
|
|
C | to the rest of the model. To set the source term for the | |
9 |
|
|
C | solver set the appropriate array below. To read the | |
10 |
|
|
C | solution read from the appropriate array below. | |
11 |
|
|
C \==========================================================/ |
12 |
|
|
|
13 |
|
|
C-- COMMON /CG2D_R/ DEL**2 Laplacian operators |
14 |
|
|
C aW2d - East-west operator. |
15 |
|
|
C aS2d - North-south operator. |
16 |
|
|
C pW - East-west off-diagonal term of preconditioner. |
17 |
|
|
C pS - North-south off-diagonal term of preconditioner. |
18 |
|
|
C pC - Main diagonal term of preconditioner. |
19 |
|
|
COMMON /CG2D_R/ |
20 |
|
|
& aW2d, |
21 |
|
|
& aS2d, |
22 |
|
|
& pW, pS, pC |
23 |
|
|
real aW2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
24 |
|
|
real aS2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
25 |
|
|
real pW (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
26 |
|
|
real pS (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
27 |
|
|
real pC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
28 |
|
|
|
29 |
|
|
C-- COMMON /CG2D_WK_R/ Work array common block |
30 |
|
|
C cg2d_q - Intermediate matrix-vector product term |
31 |
|
|
C cg2d_r - " |
32 |
|
|
C cg2d_s - " |
33 |
|
|
C cg2d_x Solution vector |
34 |
|
|
C cg2d_Ax Laplace operator on the solution (used to check |
35 |
|
|
C the result). |
36 |
|
|
C cg2d_b Right-hand side vector |
37 |
|
|
COMMON /CG2D_WK_R/ |
38 |
|
|
& cg2d_q, cg2d_r, cg2d_s, cg2d_x, cg2d_Ax, cg2d_b |
39 |
|
|
REAL cg2d_q(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
|
|
REAL cg2d_r(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
41 |
|
|
REAL cg2d_s(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
42 |
|
|
REAL cg2d_x (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
43 |
|
|
REAL cg2d_Ax(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
44 |
|
|
REAL cg2d_b(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
45 |
|
|
|