Skip to content

Commit 28e5a1e

Browse files
author
Daniel Ruprecht
committed
now prints out inf norm of final pressure to clearly indicate unstable solutions
1 parent d638602 commit 28e5a1e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/acoustic_1d_imex/runmultiscale.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126
x_0 = 0.75
127127
x_1 = 0.25
128128

129+
print ('Maximum pressure in SDC: %5.3e' % np.linalg.norm(uend.values[1,:], np.inf))
130+
print ('Maximum pressure in DIRK: %5.3e' % np.linalg.norm(pnew_dirk, np.inf))
131+
print ('Maximum pressure in RK-IMEX: %5.3e' % np.linalg.norm(pnew_imex, np.inf))
132+
129133
#plt.plot(P.mesh, pnew_tp, '-', color='c', label='Trapezoidal')
130134
plt.plot(P.mesh, pnew_imex, '-', color='c', label='IMEX('+str(rkimex.order)+')')
131135
plt.plot(P.mesh, uend.values[1,:], '--', color='b', label='SDC('+str(sparams['maxiter'])+')')

examples/boussinesq_2d_imex/rungmrescounter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
# This comes as read-in for the problem class
5454
pparams = {}
55-
#pparams['nvars'] = [(4,450,30)]
56-
pparams['nvars'] = [(4,300,30)]
55+
pparams['nvars'] = [(4,450,30)]
56+
#pparams['nvars'] = [(4,300,30)]
5757
pparams['u_adv'] = 0.02
5858
pparams['c_s'] = 0.3
5959
pparams['Nfreq'] = 0.01
@@ -63,7 +63,7 @@
6363
pparams['order_upw'] = [5]
6464
pparams['gmres_maxiter'] = [500]
6565
pparams['gmres_restart'] = [10]
66-
pparams['gmres_tol'] = [1e-5]
66+
pparams['gmres_tol'] = [1e-3]
6767

6868
# This comes as read-in for the transfer operations
6969
tparams = {}

0 commit comments

Comments
 (0)