@@ -96,7 +96,7 @@ def _qbx_lp_general(knl, sources, targets, centers, radius,
9696 return result_qbx
9797
9898
99- def _create_ellipse (n_p , mode_nr = 10 , quad_convg_rate = 100 , a = 2 ):
99+ def _create_ellipse (n_p , mode_nr = 10 , quad_convg_rate = 100 , a = 2 ):
100100 t = np .linspace (0 , 2 * np .pi , n_p , endpoint = False )
101101
102102 phi = sp .symbols ("phi" )
@@ -322,24 +322,39 @@ def _construct_laplace_axis_2d(orders, resolutions):
322322def plot ():
323323 import matplotlib .pyplot as plt
324324 orders = [5 , 7 , 9 , 11 ]
325- colors = ['b' , 'g' , 'r' , 'c' ]
325+ colors = ["b" , "g" , "r" , "c" ]
326326 resolutions = [2000 , 300 , 4000 ]
327327 err_mat , err_mat1 = _construct_laplace_axis_2d (orders , resolutions )
328328
329- fig , ax1 = plt .subplots (1 , 1 , sharey = True , figsize = (6 , 6 ))
329+ _fig , ax1 = plt .subplots (1 , 1 , sharey = True , figsize = (6 , 6 ))
330330
331331 ax1 .set_yscale ("log" )
332332 for i in range (len (orders )):
333- ax1 .scatter (9.68845 / np .array (resolutions ), np .array (err_mat [i ]), marker = '+' , label = "$u = u_{qbxrec}$ (" + "$p_{QBX}$=" + str (orders [i ])+ ")" , c = colors [i ], s = 50 )
334- ax1 .scatter (9.68845 / np .array (resolutions ), np .array (err_mat1 [i ]), marker = 'x' , label = "$u = u_{qbx}$ (" + "$p_{QBX}$=" + str (orders [i ]) + ")" , c = colors [i ], s = 50 )
333+ ax1 .scatter (
334+ 9.68845 / np .array (resolutions ), np .array (err_mat [i ]),
335+ marker = "+" ,
336+ label = "$u = u_{qbxrec}$ ("
337+ + "$p_{QBX}$=" + str (orders [i ]) + ")" ,
338+ c = colors [i ], s = 50 )
339+ ax1 .scatter (
340+ 9.68845 / np .array (resolutions ), np .array (err_mat1 [i ]),
341+ marker = "x" ,
342+ label = "$u = u_{qbx}$ ("
343+ + "$p_{QBX}$=" + str (orders [i ]) + ")" ,
344+ c = colors [i ], s = 50 )
335345
336346 ax1 .set_xlabel ("Mesh Resolution ($h$)" , fontsize = 14 )
337- ax1 .set_ylabel ("Relative Error ($L_{\infty}$)" , fontsize = 14 )
347+ ax1 .set_ylabel (r "Relative Error ($L_{\infty}$)" , fontsize = 14 )
338348 ax1 .set_title ("$(u-u_{true})/u_{true}$" , fontsize = 16 )
339349 ax1 .legend ()
340350
341- plt .suptitle ("Laplace 2D: Ellipse SLP Boundary Evaluation Error ($m=100$, $p_{offaxis}=8$)" , fontsize = 16 )
342- plt .savefig ("../../S_on_surface_convergence.pgf" , bbox_inches = 'tight' , pad_inches = 0 )
351+ plt .suptitle (
352+ "Laplace 2D: Ellipse SLP Boundary Evaluation Error"
353+ " ($m=100$, $p_{offaxis}=8$)" , fontsize = 16 )
354+ plt .savefig (
355+ "../../S_on_surface_convergence.pgf" ,
356+ bbox_inches = "tight" , pad_inches = 0 )
343357 plt .show ()
344358
345- plot ()
359+
360+ plot ()
0 commit comments