@@ -125,8 +125,8 @@ def accuracy_check(dt_list, problem, sweeper, V_ref, cwd='./'):
125125
126126 Args:
127127 dt_list (list): list of considered (initial) step sizes
128- problem (problem.__name__ ): Problem class used to consider (the class name)
129- sweeper (sweeper.__name__ ): Sweeper used to solve (the class name)
128+ problem (pySDC.core.Problem.ptype ): Problem class used to consider (the class name)
129+ sweeper (pySDC.core.Sweeper.sweeper ): Sweeper used to solve (the class name)
130130 V_ref (np.float): reference value for the switch
131131 cwd: current working directory
132132 """
@@ -240,11 +240,11 @@ def differences_around_switch(
240240
241241 Args:
242242 dt_list (list): list of considered (initial) step sizes
243- problem (problem.__name__ ): Problem class used to consider (the class name)
243+ problem (pySDC.core.Problem.ptype ): Problem class used to consider (the class name)
244244 restarts_SE (list): Restarts for the solve only using the switch estimator
245245 restarts_adapt (list): Restarts for the solve of only using adaptivity
246246 restarts_SE_adapt (list): Restarts for the solve of using both, switch estimator and adaptivity
247- sweeper (sweeper.__name__ ): Sweeper used to solve (the class name)
247+ sweeper (pySDC.core.Sweeper.sweeper ): Sweeper used to solve (the class name)
248248 V_ref (np.float): reference value for the switch
249249 cwd: current working directory
250250 """
@@ -284,16 +284,18 @@ def differences_around_switch(
284284 t_switch_SE_adapt = [v [1 ] for v in switches_SE_adapt ]
285285 t_switch_SE_adapt = t_switch_SE_adapt [- 1 ]
286286
287- vC_SE = get_sorted (stats_SE , type = 'voltage C ' , recomputed = False , sortby = 'time' )
288- vC_adapt = get_sorted (stats_adapt , type = 'voltage C ' , recomputed = False , sortby = 'time' )
289- vC_SE_adapt = get_sorted (stats_SE_adapt , type = 'voltage C ' , recomputed = False , sortby = 'time' )
290- vC = get_sorted (stats , type = 'voltage C ' , sortby = 'time' )
287+ vC_SE = [ me [ 1 ][ 1 ] for me in get_sorted (stats_SE , type = 'u ' , recomputed = False , sortby = 'time' )]
288+ vC_adapt = [ me [ 1 ][ 1 ] for me in get_sorted (stats_adapt , type = 'u ' , recomputed = False , sortby = 'time' )]
289+ vC_SE_adapt = [ me [ 1 ][ 1 ] for me in get_sorted (stats_SE_adapt , type = 'u ' , recomputed = False , sortby = 'time' )]
290+ vC = [ me [ 1 ][ 1 ] for me in get_sorted (stats , type = 'u ' , recomputed = False , sortby = 'time' )]
291291
292- diff_SE , diff = [v [1 ] - V_ref [0 ] for v in vC_SE ], [v [1 ] - V_ref [0 ] for v in vC ]
293- times_SE , times = [v [0 ] for v in vC_SE ], [v [0 ] for v in vC ]
292+ diff_SE , diff = vC_SE - V_ref [0 ], vC - V_ref [0 ]
293+ times_SE = [me [0 ] for me in get_sorted (stats_SE , type = 'u' , recomputed = False , sortby = 'time' )]
294+ times = [me [0 ] for me in get_sorted (stats , type = 'u' , recomputed = False , sortby = 'time' )]
294295
295- diff_adapt , diff_SE_adapt = [v [1 ] - V_ref [0 ] for v in vC_adapt ], [v [1 ] - V_ref [0 ] for v in vC_SE_adapt ]
296- times_adapt , times_SE_adapt = [v [0 ] for v in vC_adapt ], [v [0 ] for v in vC_SE_adapt ]
296+ diff_adapt , diff_SE_adapt = vC_adapt - V_ref [0 ], vC_SE_adapt - V_ref [0 ]
297+ times_adapt = [me [0 ] for me in get_sorted (stats_adapt , type = 'u' , recomputed = False , sortby = 'time' )]
298+ times_SE_adapt = [me [0 ] for me in get_sorted (stats_SE_adapt , type = 'u' , recomputed = False , sortby = 'time' )]
297299
298300 for m in range (len (times_SE )):
299301 if np .round (times_SE [m ], 15 ) == np .round (t_switch , 15 ):
@@ -387,8 +389,8 @@ def differences_over_time(dt_list, problem, sweeper, V_ref, cwd='./'):
387389
388390 Args:
389391 dt_list (list): list of considered (initial) step sizes
390- problem (problem.__name__ ): Problem class used to consider (the class name)
391- sweeper (sweeper.__name__ ): Sweeper used to solve (the class name)
392+ problem (pySDC.core.Problem.ptype ): Problem class used to consider (the class name)
393+ sweeper (pySDC.core.Sweeper.sweeper ): Sweeper used to solve (the class name)
392394 V_ref (np.float): reference value for the switch
393395 cwd: current working directory
394396 """
@@ -435,16 +437,18 @@ def differences_over_time(dt_list, problem, sweeper, V_ref, cwd='./'):
435437 restart_adapt = np .array (get_sorted (stats_adapt , type = 'restart' , recomputed = None , sortby = 'time' ))
436438 restart_SE_adapt = np .array (get_sorted (stats_SE_adapt , type = 'restart' , recomputed = None , sortby = 'time' ))
437439
438- vC_SE = get_sorted (stats_SE , type = 'voltage C ' , recomputed = False , sortby = 'time' )
439- vC_adapt = get_sorted (stats_adapt , type = 'voltage C ' , recomputed = False , sortby = 'time' )
440- vC_SE_adapt = get_sorted (stats_SE_adapt , type = 'voltage C ' , recomputed = False , sortby = 'time' )
441- vC = get_sorted (stats , type = 'voltage C ' , sortby = 'time' )
440+ vC_SE = [ me [ 1 ][ 1 ] for me in get_sorted (stats_SE , type = 'u ' , recomputed = False , sortby = 'time' )]
441+ vC_adapt = [ me [ 1 ][ 1 ] for me in get_sorted (stats_adapt , type = 'u ' , recomputed = False , sortby = 'time' )]
442+ vC_SE_adapt = [ me [ 1 ][ 1 ] for me in get_sorted (stats_SE_adapt , type = 'u ' , recomputed = False , sortby = 'time' )]
443+ vC = [ me [ 1 ][ 1 ] for me in get_sorted (stats , type = 'u ' , recomputed = False , sortby = 'time' )]
442444
443- diff_SE , diff = [v [1 ] - V_ref [0 ] for v in vC_SE ], [v [1 ] - V_ref [0 ] for v in vC ]
444- times_SE , times = [v [0 ] for v in vC_SE ], [v [0 ] for v in vC ]
445+ diff_SE , diff = vC_SE - V_ref [0 ], vC - V_ref [0 ]
446+ times_SE = [me [0 ] for me in get_sorted (stats_SE , type = 'u' , recomputed = False , sortby = 'time' )]
447+ times = [me [0 ] for me in get_sorted (stats , type = 'u' , recomputed = False , sortby = 'time' )]
445448
446- diff_adapt , diff_SE_adapt = [v [1 ] - V_ref [0 ] for v in vC_adapt ], [v [1 ] - V_ref [0 ] for v in vC_SE_adapt ]
447- times_adapt , times_SE_adapt = [v [0 ] for v in vC_adapt ], [v [0 ] for v in vC_SE_adapt ]
449+ diff_adapt , diff_SE_adapt = vC_adapt - V_ref [0 ], vC_SE_adapt - V_ref [0 ]
450+ times_adapt = [me [0 ] for me in get_sorted (stats_adapt , type = 'u' , recomputed = False , sortby = 'time' )]
451+ times_SE_adapt = [me [0 ] for me in get_sorted (stats_SE_adapt , type = 'u' , recomputed = False , sortby = 'time' )]
448452
449453 if len (dt_list ) > 1 :
450454 ax_diffs [0 , count_ax ].set_title (r'$\Delta t$=%s' % dt_item )
@@ -534,8 +538,8 @@ def iterations_over_time(dt_list, maxiter, problem, sweeper, cwd='./'):
534538 Args:
535539 dt_list (list): list of considered (initial) step sizes
536540 maxiter (np.int): maximum number of iterations
537- problem (problem.__name__ ): Problem class used to consider (the class name)
538- sweeper (sweeper.__name__ ): Sweeper used to solve (the class name)
541+ problem (pySDC.core.Problem.ptype ): Problem class used to consider (the class name)
542+ sweeper (pySDC.core.Sweeper.sweeper ): Sweeper used to solve (the class name)
539543 cwd: current working directory
540544 """
541545
0 commit comments