Skip to content

Commit 3aef563

Browse files
author
Daniel Ruprecht
committed
fixed script for Figure 5: multiscale plot
1 parent 22b4a4a commit 3aef563

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

examples/acoustic_1d_imex/runmultiscale.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
lparams['restol'] = 1E-10
3333

3434
sparams = {}
35-
sparams['maxiter'] = 5
35+
sparams['maxiter'] = 2
3636

3737
# setup parameters "in time"
3838
t0 = 0.0
@@ -59,9 +59,11 @@
5959
description['problem_params'] = pparams
6060
description['dtype_u'] = mesh
6161
description['dtype_f'] = rhs_imex_mesh
62-
description['collocation_class'] = collclass.CollGaussLegendre
62+
#description['collocation_class'] = collclass.CollGaussLobatto
63+
#description['collocation_class'] = collclass.CollGaussLegendre
64+
description['collocation_class'] = collclass.CollGaussRadau_Right
6365
# Number of nodes
64-
description['num_nodes'] = 3
66+
description['num_nodes'] = 2
6567
description['sweeper_class'] = imex_1st_order
6668
description['level_params'] = lparams
6769
description['hook_class'] = plot_solution
@@ -152,7 +154,7 @@
152154
plt.legend(loc='upper left', fontsize=fs, prop={'size':fs}, handlelength=3)
153155
fig.gca().grid()
154156
#plt.show()
155-
filename = 'sdc-fwsw-multiscale-K'+str(sparams['maxiter'])+'-M'+str(description['num_nodes'])+'.pdf'
157+
filename = 'multiscale-K'+str(sparams['maxiter'])+'-M'+str(description['num_nodes'])+'.pdf'
156158
plt.gcf().savefig(filename, bbox_inches='tight')
157159
call(["pdfcrop", filename, filename])
158160

@@ -168,6 +170,6 @@
168170
fig.gca().tick_params(axis='both', labelsize=fs)
169171
fig.gca().grid()
170172
#plt.show()
171-
filename = 'sdc-fwsw-multiscale-initial.pdf'
173+
filename = 'multiscale-initial.pdf'
172174
plt.gcf().savefig(filename, bbox_inches='tight')
173175
call(["pdfcrop", filename, filename])

examples/ruprecht_speck_2016.README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Figure 2: fwsw/plot_stability.py
33
Figure 3: acoustic_1d_imex/plot_dispersion.py
44
Figure 4 (left): acoustic_1d_imex/runconvergence.py and then plotconvergence.py
55
Figure 4 (right): acoustic_1d_imex/runitererror.py
6-
Figure 5:
6+
Figure 5: acoustic_1d_imex/runmultiscale.py
77
Figure 6: boussinesq_2d_imex/rungmrescounter.py and then plotgmrescounter.py for sparams['maxiter']=4 and dirk_order=4
88

99
Table 1: boussinesq_2d_imex/rungmrescounter.py and then plotgmrescounter.py

0 commit comments

Comments
 (0)