Skip to content

Commit 079ff2c

Browse files
committed
Merge pull request #77 from danielru/fix/lobatto_node_stifflimit_plot
Fixes stiff limit plots for Lobatto nodes
2 parents 7967cc2 + d09a4ce commit 079ff2c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/fwsw/plot_stifflimit_specrad.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
pparams['lambda_f'] = np.array([50.0*1j], dtype='complex')
2222
pparams['u0'] = 1.0
2323
swparams = {}
24+
#
25+
#
26+
#
27+
#swparams['collocation_class'] = collclass.CollGaussRadau_Right
2428
swparams['collocation_class'] = collclass.CollGaussLegendre
29+
#swparams['collocation_class'] = collclass.CollGaussLobatto
2530

2631
nodes_v = np.arange(2,10)
2732
specrad = np.zeros((2,np.size(nodes_v)))
@@ -58,10 +63,12 @@
5863
Q = Q[1:,1:]
5964
# Eigenvalue of error propagation matrix in stiff limit: E = I - inv(QI)*Q
6065
evals, evecs = np.linalg.eig( np.eye(nnodes-1) - np.linalg.inv(QI).dot(Q) )
66+
norm[0,i] = np.linalg.norm( np.eye(nnodes-1) - np.linalg.inv(QI).dot(Q), np.inf )
6167
else:
6268
evals, evecs = np.linalg.eig( np.eye(nnodes) - np.linalg.inv(QI).dot(Q) )
69+
norm[0,i] = np.linalg.norm( np.eye(nnodes) - np.linalg.inv(QI).dot(Q), np.inf )
6370
specrad[0,i] = np.linalg.norm( evals, np.inf )
64-
norm[0,i] = np.linalg.norm( np.eye(nnodes) - np.linalg.inv(QI).dot(Q), np.inf )
71+
6572

6673
### Plot result
6774
rcParams['figure.figsize'] = 2.5, 2.5

0 commit comments

Comments
 (0)