xref: /petsc/src/tao/unconstrained/tutorials/convergencestudyburger.m (revision c20d77252dee0f9c80fc6f8b1a6f948e11175edb)
1fontsize_labels = 14;
2fontsize_grid   = 12;
3fontname = 'Times';
4
5%
6%   Uses for the initial guess the analytic solution; if one uses the other initial guess the code only convergences a very small amount
7%   ./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
9n = [8 16 32 64 128 256 512];
10e = [3.31018e-05 5.68753e-05 2.02074e-05 5.46704e-06 1.39818e-06 3.51656e-07 8.79429e-08];
11
12p = [8    24    40    56    72];
13f = [ 3.31018e-05 1.68731e-05 7.13636e-06 3.83633e-07 6.36686e-09];
14
15hold off
16clf
17set(gca,'FontName',fontname)
18set(gca,'FontSize',fontsize_grid)
19set(gca,'FontSize',fontsize_labels)
20loglog(n,e,'-+','Markersize',6,'LineWidth',2);
21hold on
22loglog(p,f,'-*','Markersize',6,'LineWidth',2);
23xlabel('Number of GLL points');
24ylabel('Analytic Error');
25print('convergencestudy-burgers','-depsc');
26
27