/[MITgcm]/MITgcm/model/inc/CG2D.h
ViewVC logotype

Contents of /MITgcm/model/inc/CG2D.h

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


Revision 1.16 - (show annotations) (download)
Mon Nov 23 16:13:57 2009 UTC (14 years, 4 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint62b, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61z, HEAD
Changes since 1.15: +17 -2 lines
File MIME type: text/plain
add Christopher Wolfe's implemetation of the single reduction cg2d
(d'Azevedo, Eijkhout, and Romine, 1999) with CPP-flag ALLOW_SRCG and
runtime flag useSRCGSolver

1 C $Header: $
2 C $Name: $
3
4 CBOP
5 C !ROUTINE: CG2D.h
6 C !INTERFACE:
7 C include "CG2D.h"
8 C
9 C !DESCRIPTION:
10 C \bv
11 C *==========================================================*
12 C | CG2D.h
13 C | o Two-dimensional conjugate gradient solver header.
14 C *==========================================================*
15 C | Internal (private) data structures.
16 C *==========================================================*
17 C \ev
18 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
26 C aW2d :: East-west operator.
27 C aS2d :: North-south operator.
28 C aC2d :: 2D operator main diagonal term.
29 C pW :: East-west off-diagonal term of preconditioner.
30 C pS :: North-south off-diagonal term of preconditioner.
31 C pC :: Main diagonal term of preconditioner.
32 C cg2dNorm :: A matrix normalisation factor.
33 C cg2dTolerance :: cg2d solver Tolerance (solver unit = m2/s2 or no unit,
34 C depending on cg2dNormaliseRHS)
35 COMMON /CG2D_I_R/
36 & aW2d, aS2d, aC2d,
37 & pW, pS, pC,
38 & cg2dNorm, cg2dTolerance
39 _RS aW2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
40 _RS aS2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
41 _RS aC2d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
42 _RS pW (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
43 _RS pS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
44 _RS pC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45 _RL cg2dNorm, cg2dTolerance
46
47 C-- COMMON /CG2D_I_WK_R/ Work array common block
48 C cg2d_q :: Intermediate matrix-vector product term
49 C cg2d_r :: *same*
50 C cg2d_s :: *same*
51 COMMON /CG2D_I_WK_R/
52 & cg2d_q, cg2d_r, cg2d_s
53 _RL cg2d_q(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
54 #ifdef ALLOW_CG2D_NSA
55 _RL cg2d_r(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
56 _RL cg2d_s(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
57 #else /* ALLOW_CG2D_NSA */
58 _RL cg2d_r(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
59 _RL cg2d_s(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
60 #endif /* ALLOW_CG2D_NSA */
61
62 #ifdef ALLOW_CG2D_NSA
63 C-- COMMON /CG2D_I_WK_R2/ extra work array common block
64 C cg2d_z :: Intermediate matrix-vector product term
65 C :: reduces the number of recomputation in adjoint mode
66 C :: this field is superfluous if your cg2d is self-adjoint.
67 COMMON /CG2D_I_WK_R2/ cg2d_z
68 _RL cg2d_z(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
69 #endif /* ALLOW_CG2D_NSA */
70
71 #ifdef ALLOW_SRCG
72 C-- COMMON /CG2D_I_WK_R3/ Work array common block
73 C cg2d_y :: residual scaled by preconditioner
74 C cg2d_v :: z times the operator
75 C cg2d_q :: Intermediate matrix-vector product term
76 C cg2d_r :: *same*
77 C cg2d_s :: *same*
78 C sumPhi :: needed to call global_vec_sum_r8 when mutli-threaded
79 COMMON /CG2D_I_WK_R3/
80 & cg2d_y,cg2d_v,sumPhi
81 _RL cg2d_y(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
82 _RL cg2d_v(1-1:sNx+1,1-1:sNy+1,nSx,nSy)
83 _RL sumPhi(3,nSx,nSy)
84 #endif /* ALLOW_SRCG */

  ViewVC Help
Powered by ViewVC 1.1.22