xref: /petsc/src/tao/unconstrained/tutorials/convergencestudyburger.m (revision c20d77252dee0f9c80fc6f8b1a6f948e11175edb)
1*c4762a1bSJed Brownfontsize_labels = 14;
2*c4762a1bSJed Brownfontsize_grid   = 12;
3*c4762a1bSJed Brownfontname = 'Times';
4*c4762a1bSJed Brown
5*c4762a1bSJed Brown%
6*c4762a1bSJed Brown%   Uses for the initial guess the analytic solution; if one uses the other initial guess the code only convergences a very small amount
7*c4762a1bSJed Brown%   ./burgers_spectral  -ts_adapt_dt_max 3.e-3 -E 512 -N 2  -tao_grtol 1.e-12  -tao_gatol 0  -tao_max_it 30 -mu .001
8*c4762a1bSJed Brown
9*c4762a1bSJed Brownn = [8 16 32 64 128 256 512];
10*c4762a1bSJed Browne = [3.31018e-05 5.68753e-05 2.02074e-05 5.46704e-06 1.39818e-06 3.51656e-07 8.79429e-08];
11*c4762a1bSJed Brown
12*c4762a1bSJed Brownp = [8    24    40    56    72];
13*c4762a1bSJed Brownf = [ 3.31018e-05 1.68731e-05 7.13636e-06 3.83633e-07 6.36686e-09];
14*c4762a1bSJed Brown
15*c4762a1bSJed Brownhold off
16*c4762a1bSJed Brownclf
17*c4762a1bSJed Brownset(gca,'FontName',fontname)
18*c4762a1bSJed Brownset(gca,'FontSize',fontsize_grid)
19*c4762a1bSJed Brownset(gca,'FontSize',fontsize_labels)
20*c4762a1bSJed Brownloglog(n,e,'-+','Markersize',6,'LineWidth',2);
21*c4762a1bSJed Brownhold on
22*c4762a1bSJed Brownloglog(p,f,'-*','Markersize',6,'LineWidth',2);
23*c4762a1bSJed Brownxlabel('Number of GLL points');
24*c4762a1bSJed Brownylabel('Analytic Error');
25*c4762a1bSJed Brownprint('convergencestudy-burgers','-depsc');
26*c4762a1bSJed Brown
27