Skip to content

Commit 360c86f

Browse files
author
Thomas Baumann
committed
Fixed some plots in thesis
1 parent dc3eed1 commit 360c86f

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

pySDC/projects/Resilience/work_precision.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def record_work_precision(
301301
exponents = [-2, -1, 0, 1, 2, 3][::-1]
302302
if problem.__name__ == 'run_Lorenz':
303303
exponents = [0, 1, 2, 3][::-1]
304-
if type(strategy).__name__ in ["AdaptivityStrategy"]:
304+
if type(strategy).__name__ in ["AdaptivityStrategy", "ESDIRKStrategy", "ERKStrategy"]:
305305
exponents = [0, 1, 2, 3, 4, 5][::-1]
306306
elif param == 'dt':
307307
power = 2.0
@@ -579,6 +579,20 @@ def plot_work_precision(
579579
* 7,
580580
minor=True,
581581
)
582+
elif problem.__name__ == 'run_Lorenz':
583+
if mode == 'parallel_efficiency_dt_k':
584+
ax.set_xticks(
585+
ticks=[
586+
0.1,
587+
0.2,
588+
0.3,
589+
0.4,
590+
5e-1,
591+
6e-1,
592+
],
593+
labels=['', r'$2\times 10^{-1}$', '', r'$4\times 10^{-1}$', '', ''],
594+
minor=True,
595+
)
582596

583597

584598
def plot_parallel_efficiency_diagonalSDC(
@@ -945,28 +959,16 @@ def get_configs(mode, problem):
945959
'strategies': RK_strategies,
946960
'num_procs': 1,
947961
}
948-
if problem.__name__ == 'run_Lorenz':
949-
configurations[3] = {
950-
'custom_description': desc_poly,
951-
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
952-
'num_procs': 4,
953-
'num_procs_sweeper': num_procs_dt_k,
954-
'plotting_params': {
955-
'label': rf'$\Delta t$-$k$-adaptivity $N$=4x{num_procs_dt_k}',
956-
'ls': ls[num_procs_dt_k * 4],
957-
},
958-
}
959-
else:
960-
configurations[3] = {
961-
'custom_description': desc_poly,
962-
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
963-
'num_procs': 1,
964-
'num_procs_sweeper': num_procs_dt_k,
965-
'plotting_params': {
966-
'label': rf'$\Delta t$-$k$-adaptivity $N$=1x{num_procs_dt_k}',
967-
'ls': ls[num_procs_dt_k],
968-
},
969-
}
962+
configurations[3] = {
963+
'custom_description': desc_poly,
964+
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
965+
'num_procs': 1,
966+
'num_procs_sweeper': num_procs_dt_k,
967+
'plotting_params': {
968+
'label': rf'$\Delta t$-$k$-adaptivity $N$=1x{num_procs_dt_k}',
969+
'ls': ls[num_procs_dt_k],
970+
},
971+
}
970972
if problem.__name__ in ['run_Lorenz']:
971973
configurations[2] = {
972974
'strategies': [AdaptivityStrategy(useMPI=True)],
@@ -1201,7 +1203,7 @@ def get_configs(mode, problem):
12011203
QI = {
12021204
(1, 3, 'run_Lorenz'): 'MIN-SR-NS',
12031205
(1, 1, 'run_Lorenz'): 'MIN-SR-NS',
1204-
(4, 1, 'run_Lorenz'): 'IE',
1206+
(4, 1, 'run_Lorenz'): 'MIN-SR-NS',
12051207
}
12061208

12071209
newton_inexactness = False if problem.__name__ in ['run_vdp'] else True

0 commit comments

Comments
 (0)