1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
C |
|
4 |
C /==========================================================\ |
C /==========================================================\ |
5 |
C | CG2D.h | |
C | CG2D.h | |
6 |
C | o Two-dimensional conjugate gradient solver header. | |
C | o Two-dimensional conjugate gradient solver header. | |
7 |
C |==========================================================| |
C |==========================================================| |
8 |
C | The common blocks set up here are used in the elliptic | |
C | Internal (private) data structures. | |
|
C | equation inversion. They are also used as the interface | |
|
|
C | to the rest of the model. To set the source term for the | |
|
|
C | solver set the appropriate array below. To read the | |
|
|
C | solution read from the appropriate array below. | |
|
9 |
C \==========================================================/ |
C \==========================================================/ |
10 |
|
|
11 |
#include "CG2D_INTERNAL.h" |
C-- COMMON /CG2D_I_L/ cg2dNormaliseRHS |
12 |
#include "CG2D_EXTERNAL.h" |
C cg2dNormaliseRHS - flag set to TRUE if normalise RHS in the Solver |
13 |
|
COMMON /CG2D_I_L/ cg2dNormaliseRHS |
14 |
|
LOGICAL cg2dNormaliseRHS |
15 |
|
|
16 |
|
C-- COMMON /CG2D_R/ DEL**2 Laplacian operators |
17 |
|
C aW2d - East-west operator. |
18 |
|
C aS2d - North-south operator. |
19 |
|
C pW - East-west off-diagonal term of preconditioner. |
20 |
|
C pS - North-south off-diagonal term of preconditioner. |
21 |
|
C pC - Main diagonal term of preconditioner. |
22 |
|
C etaNBuf - Shared buffers for accumulating con. grad vector product. |
23 |
|
C alphaBuf |
24 |
|
C errBuf |
25 |
|
C nrmBuf |
26 |
|
C cg2dNorm - A matrix normalisation factor. |
27 |
|
C cg2dTolerance - cg2d solver Tolerance (solver unit = m2/s2 or no unit, |
28 |
|
C depending on cg2dNormaliseRHS) |
29 |
|
COMMON /CG2D_I_R/ |
30 |
|
& aW2d, |
31 |
|
& aS2d, |
32 |
|
& pW, pS, pC, |
33 |
|
& cg2dNorm, cg2dTolerance |
34 |
|
_RS aW2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
35 |
|
_RS aS2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
36 |
|
_RS pW (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
37 |
|
_RS pS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
38 |
|
_RS pC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
39 |
|
_RL cg2dNorm, cg2dTolerance |
40 |
|
|
41 |
|
C-- COMMON /CG2D_I_WK_R/ Work array common block |
42 |
|
C cg2d_q - Intermediate matrix-vector product term |
43 |
|
C cg2d_r - " |
44 |
|
C cg2d_s - " |
45 |
|
COMMON /CG2D_I_WK_R/ |
46 |
|
& cg2d_q, cg2d_r, cg2d_s |
47 |
|
_RL cg2d_q(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
48 |
|
_RL cg2d_r(1-1:sNx+1,1-1:sNy+1,nSx,nSy) |
49 |
|
_RL cg2d_s(1-1:sNx+1,1-1:sNy+1,nSx,nSy) |