3 % Script demonstrating the RB-model
for the discontinuous
4 % initial data
for the nonlinear burgers equation.
5 % Both moving shock front and rarefaction waves can be modelled.
6 % discretization is with
explicit fv scheme and empirical
7 % interpolation of the space
operator.
8 % The model demonstrates the space-dimension reduction: the
9 % subgrid that is extracted in the offline phase is exactly the row
10 % of cells along the bottom line.
12 % To start: set u_left or u_right to some different value.
13 % Then observe either a moving shock or a rarefaction wave
14 % depending on the direction of the velocity.
16 % Bernard Haasdonk 10.9.2008
20 detailedfname =
'riemann_burgers_detailed.mat';
23 % change/add some settings,
if datafile has been generated by earlier versions
27 detailed_data.grid = construct_grid(model);
28 % detailed_data.grid = extend_class_from_struct(
'triagrid',detailed_data.grid);
29 model.newton_solver = 0;
30 model.implicit_nonlinear = 0;
31 model.local_stencil_size = 1;
32 model.get_rb_size = @get_rb_size_default;
33 model.enable_error_estimator = 0;
34 model.get_mu = @get_mu_default;
35 % plot_params.axis_equal = 1;
36 % plot_params.axis_tight = 1;
37 % save(fullfile(rbmatlabhome,
'demos',
'datafiles',detailedfname),
'detailed_data',
'plot_params',
'model');
40 %[model,detailed_data,plot_params] =
renew_model(model,detailed_data);
42 %model = riemann_burgers_model;
44 %model.N = model.get_rb_size(model,detailed_data);
45 %size(detailed_data.RB,2);
46 %model.M = size(detailed_data.QM{1},2);
48 rb_plot_interpolation_points(detailed_data,model);
51 %model.rb_operators = @nonlin_evol_rb_operators;
52 %rb_plot_interpolation_points(detailed_data,model);
53 %model.set_time = @set_time_default;
54 %model.set_mu = @set_mu_default;
56 %%model.rb_simulation = @nonlin_evol_rb_simulation;
58 % temporary: transform to
"model"
59 % [model, detailed_data, plot_params] =
renew_model(params, detailed_data);
61 demo_rb_gui(model,detailed_data); %,[],plot_params,
'riemann burgers');
function reduced_data = nonlin_evol_gen_reduced_data(model, detailed_data, params)
method which produces reduced_data, which is the data, that will be passed to an online-algorithm.
function demo_rb_gui(varargin)
reduced basis demo with sliders
function demo_rb_riemann_burgers()
demo_rb_riemann_burgers
function reduced_data_subset = nonlin_evol_reduced_data_subset(model, reduced_data)
method which modifies reduced_data, which is the data, that will be passed to the online-simulation a...
function [ nmodel , nddata , plot_params ] = renew_model(model, detailed_data)
change fields of old param structure to new model structure with excessive use of function pointers...