1 %demo script
for hp-approach routine with error distance
function
3 params.coarse_factor =8;
4 model = advection_fv_output_model(params);
6 model.RB_train_rand_seed = 1234;
7 model.RB_error_indicator =
'estimator';
8 model.get_rb_from_detailed_data = @(detailed_data)detailed_data.RB;
9 model.orthonormalize=@model_orthonormalize_qr;
10 %size of the training set:
11 model.RB_train_size = 15;
14 hp_params.distance_function = @error_distance;
15 hp_params.error_distance_extionsion = 1;
17 % parameters
for hp-approach
19 hp_params.rho_POD = 1;
20 hp_params.error_tol1=0.8;
21 hp_params.error_tol2=0.01;
22 %
do not use the boundary box method:
23 hp_params.trainingsset_generation_mode =
'mu_ranges';
26 %generate the hp-model and the model_data
27 hp_model=hp_gen_model(model,hp_params);
28 model_data = gen_model_data(hp_model);
31 hp_model = set_mu(hp_model,[1;1]);
33 %compute a h_refinment and RB generation
34 hp_model = h_refinement(hp_model,model_data);
35 hp_model = hp_rb_generation(hp_model);
37 % %compute a reduced simulation
for parameter [0.13;0.13]
38 hp_model = set_mu(hp_model,[0.13;0.13]);
39 sim_data = hp_simulation(hp_model);
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.