rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
hp_demo_elliptic.m
Go to the documentation of this file.
1 %demo script for hp-approach routine using a elliptic problem
2 clear;
3 
4 model = thermalblock_model_hp();
5 
6 model.rb_init_data_basis = @RB_init_data_basis_stationary_default;
7 model.RB_error_indicator = 'estimator';
8 model.RB_extension_algorithm = @RB_extension_lin_stat_default;
9 model.get_rb_from_detailed_data = @(detailed_data)detailed_data.RB;
10 
11 
12 
13 model.RB_train_size = 50;
14 model.RB_train_rand_seed = 1234;
15 model.RB_stop_Nmax = 8;
16 model.RB_stop_epsilon=1e-4;
17 
18 
19 % boundary box parameter:
20 hp_params.boundarybox = 0.25;
21 hp_params.boundarybox_minimum = 0.15;
22 hp_model=hp_gen_model_elliptic(model,hp_params);
23 %generate model data
24 model_data = gen_model_data(model);
25 
26 
27 
28 
29 %set the first anchor
30 hp_model = set_mu(hp_model,[1;1]);
31 %compute a h_refinment and RB generation
32 hp_model = hp_elliptic(hp_model,model_data);
33 
34 hp_model = set_mu(hp_model,[0.13;0.13]);
35 
36 sim_data = hp_simulation(hp_model);
37 
38