rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
porsche_rb_simulation.m
1 function rb_sim_data = porsche_rb_simulation(model,reduced_data)
2 %function rb_sim_data = porsche_rb_simulation(model,reduced_data)
3 %
4 % this function performs a reduced simulation by using lin_stat_rb_simulation.
5 % After this, the output is calculated.
6 % This has to be done this way, because in lin_stat_rb_simulation
7 % it is not possible to use the gradient of the
8 % solution instead of the solution itself for computing the
9 % output-functional.
10 %
11 % generated fields in rb_sim_data:
12 % - uN: coefficients of the reduced solution
13 % - Delta: error bound of the solution
14 % - Delta_s: error bound of the output
15 % - s: output (calculated by reduced basis method)
16 %
17 old_compute_output_functional=model.compute_output_functional;
18 model.compute_output_functional=0;
19 rb_sim_data = lin_stat_rb_simulation(model, reduced_data);
20 model.compute_output_functional=old_compute_output_functional;
21 if model.compute_output_functional == 1
22  rb_sim_data.s = lincomb_sequence(reduced_data.lN_comp, rb_sim_data.uN);
23 end