1 % small collection of RBmatlab
's rb-simulation abilities
2 % please inspect the source-file during execution, as the main
3 % purpose is to demonstrate the possibilities of RBmatlab's
6 %
this script demonstrates use
for struct
14 % Bernard Haasdonk 11.4.2007
18 disp(
'Small demonstration of RBmatlab reduced basis commands');
19 disp([
'Please type dbcont after inspecting the workspace variables' ...
20 ' at different halt points.']);
21 disp(
'Opening figures can be closed.');
23 % detailled simulation:
26 %
get problem description and generate model
27 disp(
'generation of problem description and model:');
31 params.numintervals_per_block = 20;
33 disp('Please type dbcont after inspecting the workspace variables');
37 disp('generation of model_data (grid, fem-info, etc.):');
38 model_data = gen_model_data(model)
39 disp('Please type dbcont after inspecting the workspace variables');
42 % perform detailed simulation and
plot
44 plot_params.axis_equal = 1;
45 plot_params.axis_tight = 1;
46 sim_data = detailed_simulation(model,model_data)
48 disp('Please type dbcont after inspecting the workspace variables');
51 % generation of high dimensional offline data for RB-scheme
52 disp('computation of high dimensional offline-data (basis by greedy):');
53 detailed_data = gen_detailed_data(model,model_data)
54 disp('Please type dbcont after inspecting the workspace variables');
57 % generation of low dimensional offline data for RB-scheme
58 disp('computation of low dimensional offline-data:');
59 reduced_data = gen_reduced_data(model,detailed_data)
60 disp('Please type dbcont after inspecting the workspace variables');
63 % perform online simulation
65 reduced_data = model.reduced_data_subset(model,reduced_data)
66 disp('Please type dbcont after inspecting the workspace variables');
69 % mu-parameter variation: sets the fields of params:
70 % params.c_init = 0; params.beta = 1; params.k = 5e-8;
71 disp('Selection of mu and online-simulation');
72 set_mu(model, [0.1,1,1,1]);
73 sim_data = rb_simulation(model, reduced_data)
74 disp('Please type dbcont after inspecting the workspace variables');
77 % reconstruction and
plot of reduced simulation
78 disp('reconstruction of reduced simulation:');
79 sim_data = rb_reconstruction(model,detailed_data,sim_data)
81 disp('Please type dbcont after inspecting the workspace variables');
84 % complete interactive gui:
85 disp('complete interactive gui:');
function demo_rb_steps_oop()
small collection of RBmatlab's rb-simulation abilities please inspect the source-file during executio...
function demo_rb_gui(varargin)
reduced basis demo with sliders
function model = thermalblock_model_struct(params)
Thermal Block example similar as described in the book of A.T. patera and G. Rozza (just one paramete...
function demo_rb_steps_struct()
small collection of RBmatlab's rb-simulation abilities please inspect the source-file during executio...
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.
function p = plot(params)
plot of a rectgrid via plot_polygon_grid()
function res = thermalblock(step, params)
thermalblock example