/[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.2 - (show annotations) (download)
Fri May 12 22:02:27 2006 UTC (19 years, 2 months ago) by ce107
Branch: MAIN
Changes since 1.1: +11 -11 lines
File MIME type: text/plain
Added fixes to get single as well as double precision versions working
with a redeclaration of "Real" and "_d"; cleanup of errant "real "/"REAL "

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