22! Used when many ISIZE vars would exceed F77 line limit in COMMON.
33MODULE diffsizes_access
44 IMPLICIT NONE
5- INTEGER , SAVE :: ISIZE1OFAp_global, ISIZE1OFCx_global, ISIZE1OFCy_global, ISIZE1OFDx_global, &
6- ISIZE1OFDy_global, ISIZE1OFSx_global, ISIZE1OFSy_global, ISIZE1OFX_global, ISIZE1OFY_global, &
7- ISIZE1OFZx_global, ISIZE1OFZy_global, ISIZE2OFA_global, ISIZE2OFB_global
5+ INTEGER , SAVE :: ISIZE1OFAp_global, ISIZE1OFCx_global, ISIZE1OFCy_global, ISIZE1OFDx_global, ISIZE1OFDy_global, &
6+ ISIZE1OFSx_global, ISIZE1OFSy_global, ISIZE1OFX_global, ISIZE1OFY_global, ISIZE1OFZx_global, ISIZE1OFZy_global , &
7+ ISIZE2OFA_global, ISIZE2OFB_global
88 ! Initialize to invalid so we can detect "not set"
9- DATA ISIZE1OFAp_global /- 1 / , ISIZE1OFCx_global /- 1 / , ISIZE1OFCy_global /- 1 / , ISIZE1OFDx_global /- 1 / , &
10- ISIZE1OFDy_global /- 1 / , ISIZE1OFSx_global /- 1 / , ISIZE1OFSy_global /- 1 / , ISIZE1OFX_global /- 1 / , &
11- ISIZE1OFY_global /- 1 / , ISIZE1OFZx_global /- 1 / , ISIZE1OFZy_global /- 1 / , ISIZE2OFA_global /- 1 / , &
12- ISIZE2OFB_global /- 1 /
9+ DATA ISIZE1OFAp_global /- 1 / , ISIZE1OFCx_global /- 1 / , ISIZE1OFCy_global /- 1 / , ISIZE1OFDx_global /- 1 / , &
10+ ISIZE1OFDy_global /- 1 / , ISIZE1OFSx_global /- 1 / , ISIZE1OFSy_global /- 1 / , ISIZE1OFX_global /- 1 / , ISIZE1OFY_global /- 1 / , &
11+ ISIZE1OFZx_global /- 1 / , ISIZE1OFZy_global /- 1 / , ISIZE2OFA_global /- 1 / , ISIZE2OFB_global /- 1 /
1312CONTAINS
1413
1514 SUBROUTINE set_ISIZE1OFAp (val )
1615 INTEGER , INTENT (IN ) :: val
1716 ISIZE1OFAp_global = val
1817 END SUBROUTINE
18+
1919 INTEGER FUNCTION get_ISIZE1OFAp ()
2020 get_ISIZE1OFAp = ISIZE1OFAp_global
2121 END FUNCTION
22+
2223 SUBROUTINE check_ISIZE1OFAp_initialized ()
2324 IF (ISIZE1OFAp_global < 0 ) THEN
24- WRITE (* ,' (A)' ) ' Error: ISIZE1OFAp_global not set.'
25+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFAp_global not set. Call set_ISIZE1OFAp before differentiated routine. '
2526 STOP 1
2627 END IF
2728 END SUBROUTINE
@@ -30,12 +31,14 @@ SUBROUTINE set_ISIZE1OFCx(val)
3031 INTEGER , INTENT (IN ) :: val
3132 ISIZE1OFCx_global = val
3233 END SUBROUTINE
34+
3335 INTEGER FUNCTION get_ISIZE1OFCx ()
3436 get_ISIZE1OFCx = ISIZE1OFCx_global
3537 END FUNCTION
38+
3639 SUBROUTINE check_ISIZE1OFCx_initialized ()
3740 IF (ISIZE1OFCx_global < 0 ) THEN
38- WRITE (* ,' (A)' ) ' Error: ISIZE1OFCx_global not set.'
41+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFCx_global not set. Call set_ISIZE1OFCx before differentiated routine. '
3942 STOP 1
4043 END IF
4144 END SUBROUTINE
@@ -44,12 +47,14 @@ SUBROUTINE set_ISIZE1OFCy(val)
4447 INTEGER , INTENT (IN ) :: val
4548 ISIZE1OFCy_global = val
4649 END SUBROUTINE
50+
4751 INTEGER FUNCTION get_ISIZE1OFCy ()
4852 get_ISIZE1OFCy = ISIZE1OFCy_global
4953 END FUNCTION
54+
5055 SUBROUTINE check_ISIZE1OFCy_initialized ()
5156 IF (ISIZE1OFCy_global < 0 ) THEN
52- WRITE (* ,' (A)' ) ' Error: ISIZE1OFCy_global not set.'
57+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFCy_global not set. Call set_ISIZE1OFCy before differentiated routine. '
5358 STOP 1
5459 END IF
5560 END SUBROUTINE
@@ -58,12 +63,14 @@ SUBROUTINE set_ISIZE1OFDx(val)
5863 INTEGER , INTENT (IN ) :: val
5964 ISIZE1OFDx_global = val
6065 END SUBROUTINE
66+
6167 INTEGER FUNCTION get_ISIZE1OFDx ()
6268 get_ISIZE1OFDx = ISIZE1OFDx_global
6369 END FUNCTION
70+
6471 SUBROUTINE check_ISIZE1OFDx_initialized ()
6572 IF (ISIZE1OFDx_global < 0 ) THEN
66- WRITE (* ,' (A)' ) ' Error: ISIZE1OFDx_global not set.'
73+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFDx_global not set. Call set_ISIZE1OFDx before differentiated routine. '
6774 STOP 1
6875 END IF
6976 END SUBROUTINE
@@ -72,12 +79,14 @@ SUBROUTINE set_ISIZE1OFDy(val)
7279 INTEGER , INTENT (IN ) :: val
7380 ISIZE1OFDy_global = val
7481 END SUBROUTINE
82+
7583 INTEGER FUNCTION get_ISIZE1OFDy ()
7684 get_ISIZE1OFDy = ISIZE1OFDy_global
7785 END FUNCTION
86+
7887 SUBROUTINE check_ISIZE1OFDy_initialized ()
7988 IF (ISIZE1OFDy_global < 0 ) THEN
80- WRITE (* ,' (A)' ) ' Error: ISIZE1OFDy_global not set.'
89+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFDy_global not set. Call set_ISIZE1OFDy before differentiated routine. '
8190 STOP 1
8291 END IF
8392 END SUBROUTINE
@@ -86,12 +95,14 @@ SUBROUTINE set_ISIZE1OFSx(val)
8695 INTEGER , INTENT (IN ) :: val
8796 ISIZE1OFSx_global = val
8897 END SUBROUTINE
98+
8999 INTEGER FUNCTION get_ISIZE1OFSx ()
90100 get_ISIZE1OFSx = ISIZE1OFSx_global
91101 END FUNCTION
102+
92103 SUBROUTINE check_ISIZE1OFSx_initialized ()
93104 IF (ISIZE1OFSx_global < 0 ) THEN
94- WRITE (* ,' (A)' ) ' Error: ISIZE1OFSx_global not set.'
105+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFSx_global not set. Call set_ISIZE1OFSx before differentiated routine. '
95106 STOP 1
96107 END IF
97108 END SUBROUTINE
@@ -100,45 +111,18 @@ SUBROUTINE set_ISIZE1OFSy(val)
100111 INTEGER , INTENT (IN ) :: val
101112 ISIZE1OFSy_global = val
102113 END SUBROUTINE
114+
103115 INTEGER FUNCTION get_ISIZE1OFSy ()
104116 get_ISIZE1OFSy = ISIZE1OFSy_global
105117 END FUNCTION
118+
106119 SUBROUTINE check_ISIZE1OFSy_initialized ()
107120 IF (ISIZE1OFSy_global < 0 ) THEN
108- WRITE (* ,' (A)' ) ' Error: ISIZE1OFSy_global not set.'
109- STOP 1
110- END IF
111- END SUBROUTINE
112-
113- SUBROUTINE set_ISIZE1OFZx (val )
114- INTEGER , INTENT (IN ) :: val
115- ISIZE1OFZx_global = val
116- END SUBROUTINE
117- INTEGER FUNCTION get_ISIZE1OFZx ()
118- get_ISIZE1OFZx = ISIZE1OFZx_global
119- END FUNCTION
120- SUBROUTINE check_ISIZE1OFZx_initialized ()
121- IF (ISIZE1OFZx_global < 0 ) THEN
122- WRITE (* ,' (A)' ) ' Error: ISIZE1OFZx_global not set.'
121+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFSy_global not set. Call set_ISIZE1OFSy before differentiated routine.'
123122 STOP 1
124123 END IF
125124 END SUBROUTINE
126125
127- SUBROUTINE set_ISIZE1OFZy (val )
128- INTEGER , INTENT (IN ) :: val
129- ISIZE1OFZy_global = val
130- END SUBROUTINE
131- INTEGER FUNCTION get_ISIZE1OFZy ()
132- get_ISIZE1OFZy = ISIZE1OFZy_global
133- END FUNCTION
134- SUBROUTINE check_ISIZE1OFZy_initialized ()
135- IF (ISIZE1OFZy_global < 0 ) THEN
136- WRITE (* ,' (A)' ) ' Error: ISIZE1OFZy_global not set.'
137- STOP 1
138- END IF
139- END SUBROUTINE
140-
141-
142126 SUBROUTINE set_ISIZE1OFX (val )
143127 INTEGER , INTENT (IN ) :: val
144128 ISIZE1OFX_global = val
@@ -171,6 +155,38 @@ SUBROUTINE check_ISIZE1OFY_initialized()
171155 END IF
172156 END SUBROUTINE
173157
158+ SUBROUTINE set_ISIZE1OFZx (val )
159+ INTEGER , INTENT (IN ) :: val
160+ ISIZE1OFZx_global = val
161+ END SUBROUTINE
162+
163+ INTEGER FUNCTION get_ISIZE1OFZx ()
164+ get_ISIZE1OFZx = ISIZE1OFZx_global
165+ END FUNCTION
166+
167+ SUBROUTINE check_ISIZE1OFZx_initialized ()
168+ IF (ISIZE1OFZx_global < 0 ) THEN
169+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFZx_global not set. Call set_ISIZE1OFZx before differentiated routine.'
170+ STOP 1
171+ END IF
172+ END SUBROUTINE
173+
174+ SUBROUTINE set_ISIZE1OFZy (val )
175+ INTEGER , INTENT (IN ) :: val
176+ ISIZE1OFZy_global = val
177+ END SUBROUTINE
178+
179+ INTEGER FUNCTION get_ISIZE1OFZy ()
180+ get_ISIZE1OFZy = ISIZE1OFZy_global
181+ END FUNCTION
182+
183+ SUBROUTINE check_ISIZE1OFZy_initialized ()
184+ IF (ISIZE1OFZy_global < 0 ) THEN
185+ WRITE (* ,' (A)' ) ' Error: ISIZE1OFZy_global not set. Call set_ISIZE1OFZy before differentiated routine.'
186+ STOP 1
187+ END IF
188+ END SUBROUTINE
189+
174190 SUBROUTINE set_ISIZE2OFA (val )
175191 INTEGER , INTENT (IN ) :: val
176192 ISIZE2OFA_global = val
0 commit comments