3 % small animation of the adaptive basis generation
for the
4 % gdl-convection-diffusion problem. I.e. the parameter domain is
5 % plotted with the adaptive grid that is used in the basis
6 % generation procedure. The selected parameter is indicated with a
7 % point
for each new basis vector and the colors indicate the
8 % number of basis functions selected
for the parameter (as we have
9 % a time-dependent problem, many snapshots
for identical parameter
10 % can possibly be end up in the basis: essentially all
11 % time-instants of the trajectory.)
13 % The nice aspect here is, that the physics of the problem is
14 % recovered: The beta-value (x-axis) represents a weight in the
15 % convex combination defining the boundary data. Hence the most
16 % important snapshots are correctly found for beta=0 and 1 (and
17 % almost reflection symmetric!)
18 % The y-axis represents the diffusivity: We also recover the
19 % optimal logarithmical distribution of snapshot points, which is
20 % known from theory. But here it is found completely automatically.
22 % Bernard Haasdonk 12.12.2007
26 fn = 'RB_adaptive_refined_2_2_r1_smax1000_theta5e-2.mat';
29 % change/add some settings, if datafile has been generated by earlier versions
33 params.flux_linear = 1;
34 for i = 1:length(detailed_data.RB_info.MMesh_list)
35 detailed_data.RB_info.MMesh_list{i} = ...
36 extend_class_from_struct(
'cubegrid',detailed_data.RB_info.MMesh_list{i});
38 save(fullfile(rbmatlabhome,
'demos',
'datafiles',fn),
'detailed_data',
'params');
41 animate_basisgen(detailed_data,params)
function demo_adaptive_basisgen()
demo_adaptive_basisgen