1 |
adcroft |
1.1 |
C $Header$ |
2 |
|
|
|
3 |
|
|
#ifdef ALLOW_NONHYDROSTATIC |
4 |
|
|
C /==========================================================\ |
5 |
|
|
C | CG3D.h | |
6 |
|
|
C | o Three-dimensional conjugate gradient solver header. | |
7 |
|
|
C |==========================================================| |
8 |
|
|
C | The common blocks set up here are used in the elliptic | |
9 |
|
|
C | equation inversion. They are also used as the interface | |
10 |
|
|
C | to the rest of the model. To set the source term for the | |
11 |
|
|
C | solver set the appropriate array below. To read the | |
12 |
|
|
C | solution read from the appropriate array below. | |
13 |
|
|
C \==========================================================/ |
14 |
|
|
|
15 |
|
|
C-- COMMON /CG3D_R/ DEL**2 Laplacian operators |
16 |
|
|
C aW3d - East-west operator. |
17 |
|
|
C aS3d - North-south operator. |
18 |
|
|
C aV3d - Vertical operator. |
19 |
|
|
C etaNBuf - Shared buffers for accumulating con. grad vector product. |
20 |
|
|
C alphaBuf |
21 |
|
|
C errBuf |
22 |
|
|
C nrmBuf |
23 |
|
|
C cg3dNorm - A matrix normalisation factor. |
24 |
|
|
COMMON /CG3D_R/ |
25 |
|
|
& aW3d, |
26 |
|
|
& aS3d, |
27 |
|
|
& aV3d, |
28 |
|
|
& zMC, zML, zMU, |
29 |
|
|
& errcg3Buf, nrmcg3Buf, etaNcg3buf, etaNM1cg3Buf, |
30 |
|
|
& alphacg3Buf, sumRhscg3Buf, |
31 |
|
|
& cg3dNorm, rhsMaxcg3Buf, cg3dNBuf |
32 |
|
|
_RS aW3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
33 |
|
|
_RS aS3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
34 |
|
|
_RS aV3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
35 |
|
|
_RS zMC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
36 |
|
|
_RS zML (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
37 |
|
|
_RS zMU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
38 |
|
|
_RL etaNcg3Buf(lShare8,MAX_NO_THREADS) |
39 |
|
|
_RL etaNM1cg3Buf(lShare8,MAX_NO_THREADS) |
40 |
|
|
_RL alphacg3Buf(lShare8,MAX_NO_THREADS) |
41 |
|
|
_RL errcg3Buf(lShare8,MAX_NO_THREADS) |
42 |
|
|
_RL nrmcg3Buf(lShare8,MAX_NO_THREADS) |
43 |
|
|
_RL sumRHScg3Buf(lShare8,MAX_NO_THREADS) |
44 |
|
|
_RS cg3dNBuf(lShare8,MAX_NO_THREADS) |
45 |
|
|
_RL rhsMaxcg3Buf(lShare8,MAX_NO_THREADS) |
46 |
|
|
_RL cg3dNorm |
47 |
|
|
|
48 |
|
|
C-- COMMON /CG3D_WK_R/ Work array common block |
49 |
|
|
C cg3d_q - Intermediate matrix-vector product term |
50 |
|
|
C cg3d_r - " |
51 |
|
|
C cg3d_s - " |
52 |
|
|
C cg3d_x Solution vector |
53 |
|
|
C cg3d_b Right-hand side vector |
54 |
|
|
COMMON /CG3D_WK_R/ |
55 |
|
|
& cg3d_b, cg3d_q, cg3d_r, cg3d_s, cg3d_x |
56 |
|
|
_RL cg3d_q(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
57 |
|
|
_RL cg3d_r(1-1 :sNx+1 ,1-1 :sNy+1 ,nR,nSx,nSy) |
58 |
|
|
_RL cg3d_s(1-1 :sNx+1 ,1-1 :sNy+1 ,nR,nSx,nSy) |
59 |
|
|
_RL cg3d_x(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
60 |
|
|
_RL cg3d_b(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
61 |
|
|
|
62 |
|
|
#endif /* ALLOW_NONHYDROSTATIC */ |