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 oop
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;
34 disp(
'Please type dbcont after inspecting the workspace variables');
38 disp(
'generation of model_data (grid, fem-info, etc.):');
39 model_data = gen_model_data(dmodel);
40 disp(
'Please type dbcont after inspecting the workspace variables');
43 % perform detailed simulation and
plot
45 plot_params.axis_equal = 1;
46 plot_params.axis_tight = 1;
47 sim_data = detailed_simulation(dmodel,model_data);
49 disp(
'Please type dbcont after inspecting the workspace variables');
52 % generation of high dimensional offline data
for RB-scheme
53 disp(
'computation of high dimensional offline-data (basis by greedy):');
54 detailed_data = gen_detailed_data(rmodel,model_data);
55 disp(
'Please type dbcont after inspecting the workspace variables');
58 % generation of low dimensional offline data
for RB-scheme
59 disp(
'computation of low dimensional offline-data:');
60 reduced_data = gen_reduced_data(rmodel,detailed_data);
61 disp(
'Please type dbcont after inspecting the workspace variables');
64 % perform online simulation
66 reduced_data = extract_reduced_data_subset(rmodel,reduced_data);
67 disp(
'Please type dbcont after inspecting the workspace variables');
70 % mu-parameter variation: sets the fields of params:
71 % params.c_init = 0; params.beta = 1; params.k = 5e-8;
72 disp(
'Selection of mu and online-simulation');
73 set_mu(rmodel, [0.1,1,1,1]);
74 sim_data = rb_simulation(rmodel, reduced_data);
75 disp(
'Please type dbcont after inspecting the workspace variables');
78 % reconstruction and
plot of reduced simulation
79 disp(
'reconstruction of reduced simulation:');
80 sim_data = rb_reconstruction(rmodel,detailed_data,sim_data);
82 disp(
'Please type dbcont after inspecting the workspace variables');
85 % complete interactive gui:
86 disp(
'complete interactive gui:');
function [ dmodel , rmodel ] = gen_models(ModelDescr descr,BasisGenDescr bg_descr)
generates an IDetailedModel and an IReducedModel instance from description structures.
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 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 model = thermalblock_model(params)
Thermal Block example similar as described in the book of A.T. patera and G. Rozza (just one paramete...
function p = plot(params)
plot of a rectgrid via plot_polygon_grid()
function res = thermalblock(step, params)
thermalblock example