@@ -54,6 +54,8 @@ function claw1ez() # No arguments
54
54
# ## character*12 fname
55
55
# ## #
56
56
# ## open(10,file='fort.info',status='unknown',form='formatted')
57
+
58
+ unit10 = open (" fort.info" , " w" )
57
59
# ##
58
60
# ## #
59
61
# ## # # Read the input in standard form from claw.data:
@@ -68,16 +70,6 @@ function claw1ez() # No arguments
68
70
# ## #
69
71
# ## # # Read the input in standard form from claw.data:
70
72
# ## #
71
- # ##
72
- # ## read(55,*) ndim
73
- # ##
74
- # ## read(55,*) xlower
75
- # ## read(55,*) xupper
76
- # ## read(55,*) mx
77
- # ## read(55,*) meqn
78
- # ## read(55,*) mwaves
79
- # ## read(55,*) maux
80
- # ## read(55,*) t0
81
73
# ##
82
74
r = Reader (" claw.data" )
83
75
@@ -92,16 +84,8 @@ function claw1ez() # No arguments
92
84
93
85
println (" read from claw.data : ndim: $ndim xlower: $xlower xupper: $xupper mx: $mx meqn: $meqn mwaves: $mwaves maux: $maux t0: $t0 " )
94
86
95
- # ## read(55,*) outstyle
96
-
97
87
outstyle = readint (r)
98
88
99
- # ## if (outstyle == 1) then
100
- # ## read(55,*) nout
101
- # ## read(55,*) tfinal
102
- # ## read(55,*) output_t0 ! Not currently used
103
- # ## nstepout = 1
104
-
105
89
tout = Array (Float64, 1 )
106
90
if outstyle == 1
107
91
nout = readint (r)
@@ -118,66 +102,25 @@ function claw1ez() # No arguments
118
102
println (" tout: $tout " )
119
103
nstepout = 1
120
104
121
-
122
- # ## else if (outstyle == 3) then
123
- # ## read(55,*) nstepout
124
- # ## read(55,*) nstop
125
- # ## read(55,*) output_t0
126
- # ## nout = nstop
127
- # ## else
128
- # ## print *, '*** Unrecognized output style ', outstyle
129
- # ## print *, '*** Exiting claw1ez'
130
- # ## go to 900
131
- # ## end if
132
- # ##
133
-
134
105
elseif outstyle == 3
106
+ nstepout = readint (r)
107
+ nstop = readint (r)
108
+ output_t0 = readbool (r) # Not currently used
109
+ nout = nstop
135
110
136
111
else
112
+ println (" nout: $nout tfinal: $tfinal output_t0: $output_t0 " )
137
113
println (" *** Unrecognized output style $outstyle " )
138
114
error (" *** Exiting claw1ez" )
139
115
end
140
116
141
- # ## read(55,*) output_format ! Not used yet
142
117
output_format = readint (r) # Not used yet
143
118
144
- # ## ! These iout variables are not currently used, but hang onto them
145
- # ## ! anyway in case somebody wants to use them at a future date. The
146
- # ## ! same goes for outaux_init_only.
147
- # ## allocate(iout_q(meqn), stat=allocate_status)
148
- # ## if (allocate_status .ne. 0) then
149
- # ## print *, '*** Error allocating iout_q array; exiting claw1ez'
150
- # ## go to 900 ! Exception handling, old school style
151
- # ## end if
152
- # ## read(55,*) (iout_q(i), i = 1, meqn)
153
- inout_q = readfltarray (r, meqn)
154
- println (" inout_q: $inout_q " )
155
-
156
- # if maux > 0
157
- # ## allocate(iout_aux(maux), stat=allocate_status)
158
- # ## if (allocate_status .ne. 0) then
159
- # ## print *, '*** Error allocating iout_aux array;',
160
- # ## & ' exiting claw1ez'
161
- # ## go to 900
162
- # ## end if
119
+ iout_q = readfltarray (r, meqn)
120
+ println (" iout_q: $iout_q " )
163
121
164
122
# iout_aux
165
123
166
- # ## read(55,*) (iout_aux(i), i = 1, maux)
167
- # ## read(55,*) outaux_init_only
168
- # ## ! Not implementing selective output of aux fields yet
169
- # ## if (any(iout_aux .ne. 0)) then
170
- # ## outaux_always = .not. outaux_init_only
171
- # ## else
172
- # ## outaux_always = .false.
173
- # ## outaux_init_only = .false.
174
- # ## end if
175
- # ## else
176
- # ## outaux_always = .false.
177
- # ## outaux_init_only = .false. ! Just to initialize
178
- # end
179
-
180
-
181
124
iout_aux = Array (Int, 1 )
182
125
if maux > 0
183
126
iout_aux = readintarray (r, maux)
@@ -197,26 +140,13 @@ function claw1ez() # No arguments
197
140
198
141
println (" dtv: $dtv cflv: $cflv nv: $nv " )
199
142
200
- # ## read(55,*) dt_variable ! Variable or fixed dt
201
- # ## if (dt_variable) then
202
- # ## method(1) = 1
203
- # ## else
204
- # ## method(1) = 0
205
- # ## end if
206
-
207
143
dt_variable:: Bool = readbool (r)
208
144
method[1 ] = dt_variable ? 1 : 0
209
145
210
146
method[2 ] = readint (r) # Order
211
147
212
- # ## ! method(3) (transverse order) not used in 1D
213
- # ## ! No dimensional splitting in 1D
214
- # ## read(55,*) method(4) ! Verbosity
215
- # ## read(55,*) method(5) ! Source term splitting style
216
- # ## read(55,*) method(6) ! Index into aux of capacity function
217
- # ## method(7) = maux ! Number of aux variables
218
- # ##
219
-
148
+ # method(3) (transverse order) not used in 1D
149
+ # No dimensional splitting in 1D
220
150
221
151
method[4 ] = readint (r) # Verbosity
222
152
method[5 ] = readint (r) # Source term splitting style
@@ -225,17 +155,8 @@ function claw1ez() # No arguments
225
155
226
156
println (" method: $method " )
227
157
228
- # ## read(55,*) use_fwaves
229
- # ##
230
158
use_fwaves:: Bool = readbool (r)
231
159
232
- # ## allocate(mthlim(mwaves), stat=allocate_status)
233
- # ## if (allocate_status .ne. 0) then
234
- # ## print *, '*** Error allocating mthlim array; exiting claw1ez'
235
- # ## go to 900
236
- # ## end if
237
- # ## read(55,*) (mthlim(i), i = 1, mwaves)
238
-
239
160
mthlim:: Array{Int, 1} = readintarray (r, mwaves)
240
161
println (" mthlim: $mthlim " )
241
162
@@ -250,14 +171,6 @@ function claw1ez() # No arguments
250
171
# just close the file now.
251
172
close_reader (r)
252
173
253
- # ## ! Check consistency for periodic BCs
254
- # ## if ((mthbc(1).eq.2 .and. mthbc(2).ne.2) .or.
255
- # ## & (mthbc(2).eq.2 .and. mthbc(1).ne.2)) then
256
- # ## write(6,*) '*** ERROR *** periodic boundary conditions'
257
- # ## write(6,*) ' require mthbc(1) and mthbc(2) BOTH be set to 2'
258
- # ## stop
259
- # ## endif
260
-
261
174
# Check consistency for periodic BCs
262
175
if (mthbc[1 ] == 2 && mthbc[2 ] != 2 ) ||
263
176
(mthbc[2 ] == 2 && mthbc[1 ] != 2 )
@@ -360,9 +273,13 @@ function claw1ez() # No arguments
360
273
aux,maux,outaux_always)
361
274
362
275
@printf (" CLAW1EZ: Frame %4d output files done at time t = %12.4e\n " , iframe,tend)
363
- @printf (" tend = %15.4e \n info =%5d\n smallest dt =%15.4e\n largest dt =%15.4e\n last dt =%15.4e\n largest cfl =%15.4e\n last cfl =%15.4e\n steps taken =%4d\n " ,
364
- tend,info,dtv[3 ],dtv[4 ],dtv[5 ],cflv[3 ],cflv[4 ],nv[2 ])
276
+ @printf (unit10," tend = %15.4e \n info =%5d\n smallest dt =%15.4e\n largest dt =%15.4e\n " ,
277
+ tend,info,dtv[3 ],dtv[4 ])
278
+ @printf (unit10," last dt =%15.4e\n largest cfl =%15.4e\n last cfl =%15.4e\n steps taken =%4d\n " ,
279
+ dtv[5 ],cflv[3 ],cflv[4 ],nv[2 ])
365
280
366
281
end
367
282
end
283
+ Base. close (unit10)
284
+
368
285
end # claw1ez
0 commit comments