@@ -580,13 +580,14 @@ def plot_RBC_solution(setup='resilience'): # pragma: no cover
580580
581581 from mpl_toolkits .axes_grid1 import make_axes_locatable
582582
583+ nplots = 3 if setup == 'thesis_intro' else 2
584+ aspect = 0.8 if nplots == 3 else 0.5
583585 plt .rcParams ['figure.constrained_layout.use' ] = True
584- fig , axs = plt .subplots (2 , 1 , sharex = True , sharey = True , figsize = figsize_by_journal (JOURNAL , 1.0 , 0.5 ))
586+ fig , axs = plt .subplots (nplots , 1 , sharex = True , sharey = True , figsize = figsize_by_journal (JOURNAL , 1.0 , aspect ))
585587 caxs = []
586- divider = make_axes_locatable (axs [0 ])
587- caxs += [divider .append_axes ('right' , size = '3%' , pad = 0.03 )]
588- divider2 = make_axes_locatable (axs [1 ])
589- caxs += [divider2 .append_axes ('right' , size = '3%' , pad = 0.03 )]
588+ for ax in axs :
589+ divider = make_axes_locatable (ax )
590+ caxs += [divider .append_axes ('right' , size = '3%' , pad = 0.03 )]
590591
591592 from pySDC .projects .Resilience .RBC import RayleighBenard , PROBLEM_PARAMS
592593
@@ -607,15 +608,20 @@ def _plot(t, ax, cax):
607608 elif setup == 'resilience_thesis' :
608609 _plot (20 , axs [0 ], caxs [0 ])
609610 _plot (21 , axs [1 ], caxs [1 ])
611+ elif setup == 'thesis_intro' :
612+ _plot (0 , axs [0 ], caxs [0 ])
613+ _plot (18 , axs [1 ], caxs [1 ])
614+ _plot (30 , axs [2 ], caxs [2 ])
610615
611- axs [1 ].set_xlabel ('$x$' )
612- axs [0 ].set_ylabel ('$z$' )
613- axs [1 ].set_ylabel ('$z$' )
616+ for ax in axs :
617+ ax .set_ylabel ('$z$' )
618+ ax .set_aspect (1 )
619+ axs [- 1 ].set_xlabel ('$x$' )
614620
615621 savefig (fig , f'RBC_sol_{ setup } ' , tight_layout = False )
616622
617623
618- def plot_GS_solution (): # pragma: no cover
624+ def plot_GS_solution (tend = 500 ): # pragma: no cover
619625 my_setup_mpl ()
620626
621627 fig , axs = plt .subplots (1 , 2 , figsize = figsize_by_journal (JOURNAL , 1.0 , 0.45 ), sharex = True , sharey = True )
@@ -641,19 +647,19 @@ def plot_GS_solution(): # pragma: no cover
641647 'Dv' : 1e-5 ,
642648 }
643649 P = grayscott_imex_diffusion (** problem_params )
644- Tend = 500
645- im = axs [0 ].pcolormesh (* P .X , P .u_exact (0 )[0 ], rasterized = True , cmap = 'binary' )
646- im1 = axs [1 ].pcolormesh (* P .X , P .u_exact (Tend )[0 ], rasterized = True , cmap = 'binary' )
650+ Tend = tend
651+ im = axs [0 ].pcolormesh (* P .X , P .u_exact (0 )[1 ], rasterized = True , cmap = 'binary' )
652+ im1 = axs [1 ].pcolormesh (* P .X , P .u_exact (Tend )[1 ], rasterized = True , cmap = 'binary' )
647653
648654 fig .colorbar (im , cax = cax [0 ])
649655 fig .colorbar (im1 , cax = cax [1 ])
650- axs [0 ].set_title (r'$u (t=0)$' )
651- axs [1 ].set_title (rf'$u (t={{{ Tend } }})$' )
656+ axs [0 ].set_title (r'$v (t=0)$' )
657+ axs [1 ].set_title (rf'$v (t={{{ Tend } }})$' )
652658 for ax in axs :
653659 ax .set_aspect (1 )
654660 ax .set_xlabel ('$x$' )
655661 ax .set_ylabel ('$y$' )
656- savefig (fig , 'GrayScott_sol' )
662+ savefig (fig , f 'GrayScott_sol{ f"_ { tend } " if tend != 500 else "" } ' )
657663
658664
659665def plot_Schroedinger_solution (): # pragma: no cover
@@ -896,6 +902,8 @@ def make_plots_for_notes(): # pragma: no cover
896902def make_plots_for_thesis (): # pragma: no cover
897903 global JOURNAL
898904 JOURNAL = 'TUHH_thesis'
905+ for setup in ['thesis_intro' , 'resilience_thesis' , 'work_precision' ]:
906+ plot_RBC_solution (setup )
899907
900908 from pySDC .projects .Resilience .RBC import plot_factorizations_over_time
901909
@@ -918,9 +926,8 @@ def make_plots_for_thesis(): # pragma: no cover
918926 all_problems (** all_params , mode = mode )
919927 all_problems (** {** all_params , 'work_key' : 'param' }, mode = 'compare_strategies' )
920928
921- plot_GS_solution ()
922- for setup in ['resilience_thesis' , 'work_precision' ]:
923- plot_RBC_solution (setup )
929+ for tend in [500 , 2000 ]:
930+ plot_GS_solution (tend = tend )
924931 for setup in ['resilience' , 'adaptivity' ]:
925932 plot_vdp_solution (setup = setup )
926933
0 commit comments