@@ -176,9 +176,6 @@ def main(dt, problem, sweeper, use_switch_estimator, use_adaptivity):
176176 dill .dump (stats , f )
177177 f .close ()
178178
179- iter_counts = get_sorted (stats , type = 'niter' , recomputed = None , sortby = 'time' )
180- print (np .sum ([v [1 ] for v in iter_counts ]))
181-
182179 return stats , description
183180
184181
@@ -232,8 +229,6 @@ def plot_voltages(description, problem, sweeper, recomputed, use_switch_estimato
232229 # convert filtered statistics to list of iterations count, sorted by process
233230 cL = get_sorted (stats , type = 'current L' , recomputed = False , sortby = 'time' )
234231 vC = get_sorted (stats , type = 'voltage C' , recomputed = False , sortby = 'time' )
235- print ('cL:' , [v [1 ] for v in cL ][- 1 ])
236- print ('vC:' , [v [1 ] for v in vC ][- 1 ])
237232
238233 times = [v [0 ] for v in cL ]
239234
@@ -248,19 +243,16 @@ def plot_voltages(description, problem, sweeper, recomputed, use_switch_estimato
248243
249244 assert len (switches ) >= 1 , 'No switches found!'
250245 t_switch = [v [1 ] for v in switches ]
251- print ('switches:' , t_switch )
252246 ax .axvline (x = t_switch [- 1 ], linestyle = '--' , linewidth = 0.8 , color = 'r' , label = 'Switch' )
253247
254248 if use_adaptivity :
255249 dt = np .array (get_sorted (stats , type = 'dt' , recomputed = False ))
256- e_em = np .array (get_sorted (stats , type = 'error_embedded_estimate' , recomputed = False , sortby = 'time' ))
257- print ('dt:' , dt [- 1 , 1 ])
258- print ('e_em:' , e_em [- 1 , 1 ])
250+
259251 dt_ax = ax .twinx ()
260252 dt_ax .plot (dt [:, 0 ], dt [:, 1 ], linestyle = '-' , linewidth = 0.8 , color = 'k' , label = r'$\Delta t$' )
261253 dt_ax .set_ylabel (r'$\Delta t$' , fontsize = 8 )
262254 dt_ax .legend (frameon = False , fontsize = 8 , loc = 'center right' )
263- print ( 'restarts:' , np . sum ( np . array ( get_sorted ( stats , type = 'restart' , recomputed = None , sortby = 'time' ))[:, 1 ]))
255+
264256 ax .axhline (y = 1.0 , linestyle = '--' , linewidth = 0.8 , color = 'g' , label = '$V_{ref}$' )
265257
266258 ax .legend (frameon = False , fontsize = 8 , loc = 'upper right' )
0 commit comments