Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions pySDC/projects/Resilience/work_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def record_work_precision(
exponents = [-2, -1, 0, 1, 2, 3][::-1]
if problem.__name__ == 'run_Lorenz':
exponents = [0, 1, 2, 3][::-1]
if type(strategy).__name__ in ["AdaptivityStrategy"]:
if type(strategy).__name__ in ["AdaptivityStrategy", "ESDIRKStrategy", "ERKStrategy"]:
exponents = [0, 1, 2, 3, 4, 5][::-1]
elif param == 'dt':
power = 2.0
Expand Down Expand Up @@ -579,6 +579,20 @@ def plot_work_precision(
* 7,
minor=True,
)
elif problem.__name__ == 'run_Lorenz':
if mode == 'parallel_efficiency_dt_k':
ax.set_xticks(
ticks=[
0.1,
0.2,
0.3,
0.4,
5e-1,
6e-1,
],
labels=['', r'$2\times 10^{-1}$', '', r'$4\times 10^{-1}$', '', ''],
minor=True,
)


def plot_parallel_efficiency_diagonalSDC(
Expand Down Expand Up @@ -945,28 +959,16 @@ def get_configs(mode, problem):
'strategies': RK_strategies,
'num_procs': 1,
}
if problem.__name__ == 'run_Lorenz':
configurations[3] = {
'custom_description': desc_poly,
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
'num_procs': 4,
'num_procs_sweeper': num_procs_dt_k,
'plotting_params': {
'label': rf'$\Delta t$-$k$-adaptivity $N$=4x{num_procs_dt_k}',
'ls': ls[num_procs_dt_k * 4],
},
}
else:
configurations[3] = {
'custom_description': desc_poly,
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
'num_procs': 1,
'num_procs_sweeper': num_procs_dt_k,
'plotting_params': {
'label': rf'$\Delta t$-$k$-adaptivity $N$=1x{num_procs_dt_k}',
'ls': ls[num_procs_dt_k],
},
}
configurations[3] = {
'custom_description': desc_poly,
'strategies': [AdaptivityPolynomialError(useMPI=True, newton_inexactness=newton_inexactness)],
'num_procs': 1,
'num_procs_sweeper': num_procs_dt_k,
'plotting_params': {
'label': rf'$\Delta t$-$k$-adaptivity $N$=1x{num_procs_dt_k}',
'ls': ls[num_procs_dt_k],
},
}
if problem.__name__ in ['run_Lorenz']:
configurations[2] = {
'strategies': [AdaptivityStrategy(useMPI=True)],
Expand Down Expand Up @@ -1201,7 +1203,7 @@ def get_configs(mode, problem):
QI = {
(1, 3, 'run_Lorenz'): 'MIN-SR-NS',
(1, 1, 'run_Lorenz'): 'MIN-SR-NS',
(4, 1, 'run_Lorenz'): 'IE',
(4, 1, 'run_Lorenz'): 'MIN-SR-NS',
}

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