/[MITgcm]/MITgcm_contrib/cg2d_bench/CG2D.h
ViewVC logotype

Contents of /MITgcm_contrib/cg2d_bench/CG2D.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri May 12 21:58:05 2006 UTC (17 years, 11 months ago) by ce107
Branch: MAIN
File MIME type: text/plain
Initial version of CG2D benchmark code (serial and parallel) by Chris Hill

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

  ViewVC Help
Powered by ViewVC 1.1.22