1 |
C $Id$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
|
CBOP |
5 |
|
C !ROUTINE: CG2D.h |
6 |
|
C !INTERFACE: |
7 |
|
C include "CG2D.h" |
8 |
C |
C |
9 |
C /==========================================================\ |
C !DESCRIPTION: |
10 |
C | CG2D.h | |
C \bv |
11 |
C | o Two-dimensional conjugate gradient solver header. | |
C *==========================================================* |
12 |
C |==========================================================| |
C | CG2D.h |
13 |
C | The common blocks set up here are used in the elliptic | |
C | o Two-dimensional conjugate gradient solver header. |
14 |
C | equation inversion. They are also used as the interface | |
C *==========================================================* |
15 |
C | to the rest of the model. To set the source term for the | |
C | Internal (private) data structures. |
16 |
C | solver set the appropriate array below. To read the | |
C *==========================================================* |
17 |
C | solution read from the appropriate array below. | |
C \ev |
18 |
C \==========================================================/ |
CEOP |
19 |
|
|
20 |
|
C-- COMMON /CG2D_I_L/ cg2dNormaliseRHS |
21 |
|
C cg2dNormaliseRHS - flag set to TRUE if normalise RHS in the Solver |
22 |
|
COMMON /CG2D_I_L/ cg2dNormaliseRHS |
23 |
|
LOGICAL cg2dNormaliseRHS |
24 |
|
|
25 |
C-- COMMON /CG2D_R/ DEL**2 Laplacian operators |
C-- COMMON /CG2D_R/ DEL**2 Laplacian operators |
26 |
C aW2d - East-west operator. |
C aW2d - East-west operator. |
33 |
C errBuf |
C errBuf |
34 |
C nrmBuf |
C nrmBuf |
35 |
C cg2dNorm - A matrix normalisation factor. |
C cg2dNorm - A matrix normalisation factor. |
36 |
COMMON /CG2D_R/ |
C cg2dTolerance - cg2d solver Tolerance (solver unit = m2/s2 or no unit, |
37 |
|
C depending on cg2dNormaliseRHS) |
38 |
|
COMMON /CG2D_I_R/ |
39 |
& aW2d, |
& aW2d, |
40 |
& aS2d, |
& aS2d, |
41 |
& pW, pS, pC, |
& pW, pS, pC, |
42 |
& errBuf, nrmBuf, etaNbuf, etaNM1Buf, alphaBuf, sumRhsBuf, |
& cg2dNorm, cg2dTolerance |
|
& cg2dNBuf,cg2dNorm, rhsMaxBuf |
|
43 |
_RS aW2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS aW2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
44 |
_RS aS2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS aS2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
45 |
_RS pW (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS pW (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
46 |
_RS pS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS pS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
47 |
_RS pC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS pC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
48 |
_RL etaNBuf(lShare8,MAX_NO_THREADS) |
_RL cg2dNorm, cg2dTolerance |
|
_RL etaNM1Buf(lShare8,MAX_NO_THREADS) |
|
|
_RL alphaBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL errBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL nrmBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL sumRHSBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL cg2dNBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL rhsMaxBuf(lShare8,MAX_NO_THREADS) |
|
|
_RL cg2dNorm |
|
49 |
|
|
50 |
C-- COMMON /CG2D_WK_R/ Work array common block |
C-- COMMON /CG2D_I_WK_R/ Work array common block |
51 |
C cg2d_q - Intermediate matrix-vector product term |
C cg2d_q - Intermediate matrix-vector product term |
52 |
C cg2d_r - " |
C cg2d_r - " |
53 |
C cg2d_s - " |
C cg2d_s - " |
54 |
C cg2d_x Solution vector |
COMMON /CG2D_I_WK_R/ |
55 |
C cg2d_b Right-hand side vector |
& cg2d_q, cg2d_r, cg2d_s |
|
COMMON /CG2D_WK_R/ |
|
|
& cg2d_b, cg2d_q, cg2d_r, cg2d_s, cg2d_x |
|
56 |
_RL cg2d_q(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL cg2d_q(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
57 |
_RL cg2d_r(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL cg2d_r(1-1:sNx+1,1-1:sNy+1,nSx,nSy) |
58 |
_RL cg2d_s(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL cg2d_s(1-1:sNx+1,1-1:sNy+1,nSx,nSy) |
|
_RL cg2d_x(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
|
|
_RL cg2d_b(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
|
|
|
|