1 |
C $Header: /u/gcmpack/MITgcm/pkg/ex3/EX3_TOPOLOGY.h,v 1.3 2006/02/06 21:09:54 edhill Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
C Tile topology data |
5 |
C |
6 |
C . N |
7 |
C . C4 E3 C3 |
8 |
C . +---------+ |
9 |
C . | | |
10 |
C . | | |
11 |
C . W E4 | | E2 E |
12 |
C . | | |
13 |
C . | | |
14 |
C . +---------+ |
15 |
C . C1 E1 C2 |
16 |
C . S |
17 |
C |
18 |
C ===== "Global" Topology ===== |
19 |
C |
20 |
C The following "global" variables define a tile topology and are |
21 |
C invariant with respect to the model decomposition (that is, the |
22 |
C sets of threads & MPI processes) used. |
23 |
C |
24 |
C ex3_affm :: The eight possible 2x2 affine matricies |
25 |
C . for vector rotations and permutations |
26 |
C . between two orthogonal, adjacent grids |
27 |
C |
28 |
C ex3_t_num :: total number of tiles |
29 |
C ex3_t_iproc(t) :: MPI process ID for each tile |
30 |
C ex3_t_ori(t) :: tile orientation (1=rh, -1=lh) |
31 |
C ex3_t_nxy(t) :: number of X,Y cells in each tile |
32 |
C |
33 |
C ex3_f_ind(t) :: face index for each tile |
34 |
C ex3_f_nxy(2,t) :: face number of X,Y cells |
35 |
C ex3_f_oij(2,t) :: face i,j offsets (0 for face==tile) |
36 |
C . |
37 |
C ex3_e_n(t) :: number of E-neighbors |
38 |
C ex3_e_iam(e,t) :: E-neighbor affine matrix index |
39 |
C ex3_e_iopt(e,t) :: E-neighbor global tile index for the |
40 |
C . opposing tile |
41 |
C ex3_e_iope(e,t) :: E-neighbor edge index for the |
42 |
C . opposing tile |
43 |
C ex3_e_dat(k,d,e,t) :: E-neighbor information for each tile |
44 |
C . / 1 --> edge-alignment flag: |
45 |
C . | 0 : seam is NOT along |
46 |
C . | this direction |
47 |
C . | 1,-1 : interior is +,- |
48 |
C . | and use OLx,OLy |
49 |
C . k = | -ow- : use width value |
50 |
C . | from 3 below |
51 |
C . | 2 --> first cell index or the |
52 |
C . | abutting *inside* cell |
53 |
C . | 3 --> last cell index or the |
54 |
C . | exchange width as a |
55 |
C . \ distance and direction |
56 |
C . d = 1,2 --> i,j directions |
57 |
C . e = E-neighbor index |
58 |
C . t = tile index |
59 |
C |
60 |
C ex3_c_n(4,t) :: number of C-neighbors at each corner |
61 |
C ex3_c_ind(k,4,t) :: tile index for each C-neighbor |
62 |
C ex3_c_num(k,4,t) :: tile corner number for each C-neighbor |
63 |
C . 1 --> SW |
64 |
C . 2 --> SE (per above diagram) |
65 |
C . 3 --> NE |
66 |
C . 4 --> NW |
67 |
C ex3_c_ori(k,4,t) :: tile orientation for each C-neighbor |
68 |
C |
69 |
C |
70 |
C ===== "Local" Topology ===== |
71 |
C |
72 |
C The following "local" variables are dependent upon the particular |
73 |
C model decomposition (threads & MPI processes) used. |
74 |
C |
75 |
C ex3_p_ntile :: number of tiles associated with this |
76 |
C . (eg. MPI) process |
77 |
C ex3_p_itile(m) :: global indicies of the tiles associated |
78 |
C . with this MPI process [myBxLo..myBxHi] |
79 |
C |
80 |
C ex3_e_iopt_il(e,t) :: tile locality flag: |
81 |
C . -1: tile is not in local memory |
82 |
C . 1: local tile index ("bibj") |
83 |
|
84 |
INTEGER |
85 |
& ex3_affm(4,8) |
86 |
INTEGER |
87 |
& ex3_t_num, |
88 |
& ex3_t_iproc(EX3_MAX_TILES), |
89 |
& ex3_t_ori(EX3_MAX_TILES), |
90 |
& ex3_t_nxy(2,EX3_MAX_TILES), |
91 |
& ex3_f_ind(EX3_MAX_TILES), |
92 |
& ex3_f_nxy(2,EX3_MAX_TILES), |
93 |
& ex3_f_oij(2,EX3_MAX_TILES), |
94 |
& ex3_e_n(EX3_MAX_TILES), |
95 |
& ex3_e_iam(EX3_MAX_E_NBS,EX3_MAX_TILES), |
96 |
& ex3_e_iopt(EX3_MAX_E_NBS,EX3_MAX_TILES), |
97 |
& ex3_e_iope(EX3_MAX_E_NBS,EX3_MAX_TILES), |
98 |
& ex3_e_dat(3,2,EX3_MAX_E_NBS,EX3_MAX_TILES), |
99 |
& ex3_c_n(4,EX3_MAX_TILES), |
100 |
& ex3_c_ind(EX3_MAX_C_NBS,4,EX3_MAX_TILES), |
101 |
& ex3_c_num(EX3_MAX_C_NBS,4,EX3_MAX_TILES), |
102 |
& ex3_c_ori(EX3_MAX_C_NBS,4,EX3_MAX_TILES) |
103 |
|
104 |
COMMON / EX3_TOPO_GLOBAL / |
105 |
& ex3_affm, |
106 |
& ex3_t_num, |
107 |
& ex3_t_iproc, |
108 |
& ex3_t_ori, |
109 |
& ex3_t_nxy, |
110 |
& ex3_f_ind, |
111 |
& ex3_f_nxy, |
112 |
& ex3_f_oij, |
113 |
& ex3_e_n, |
114 |
& ex3_e_iam, |
115 |
& ex3_e_iopt, |
116 |
& ex3_e_iope, |
117 |
& ex3_e_dat, |
118 |
& ex3_c_n, |
119 |
& ex3_c_ind, |
120 |
& ex3_c_num, |
121 |
& ex3_c_ori |
122 |
|
123 |
INTEGER |
124 |
& ex3_p_ntile, |
125 |
& ex3_p_itile(EX3_MAX_TILES), |
126 |
& ex3_e_iopt_il(EX3_MAX_E_NBS,EX3_MAX_TILES) |
127 |
|
128 |
COMMON / EX3_TOPO_LOCAL / |
129 |
& ex3_p_ntile, |
130 |
& ex3_p_itile, |
131 |
& ex3_e_iopt_il |
132 |
|
133 |
|
134 |
CEH3 ;;; Local Variables: *** |
135 |
CEH3 ;;; mode:fortran *** |
136 |
CEH3 ;;; End: *** |