4 %
function which first computes a dual rb_simulation
using dual
5 % reduced_data and afterwards computes a primal improved rb_simulation
6 %
using primal improved reduced_data. This
finally yields the improved
7 % output and improved output estimator!
9 % simulation_data yields the
final results:
10 % - primal rb coefficients
11 % - primal energy error estimator
13 % - improved output estimator
15 % Dominik Garmatter 06.09 2012
18 % first split up the reduced_data in the dual and primal improved parts
20 % you want the energy error
for the improved output estimator
21 if ~strcmp(model.error_norm ,
'energy')
22 warning('Primal dual error estimator only implemented for energy error norm');
23 model.error_norm = 'energy';
25 % do a dual rb_simulation to recieve the dual rb coefficients and the dual
26 % energy error estimator - both required for the improved output and
27 % improved output estimator
30 % now do an improved primal rb_simulation
32 model.want_improved_output = 1;
33 % the dual rb coefficients and the dual energy error estimator are required
34 % for the improved simulation
35 reduced_data_primal_improved.dual_sim_data = rb_sim_data_dual.a;
36 reduced_data_primal_improved.dual_Delta = rb_sim_data_dual.Delta;
function simulation_data = lin_evol_primal_dual_rb_simulation(model, reduced_data)
simulation_data = lin_evol_primal_dual_rb_simulation(model, reduced_data)
function simulation_data = lin_evol_rb_simulation_primal_dual(model, reduced_data)
simulation_data = lin_evol_rb_simulation_primal_dual(model, reduced_data)
function [ reduced_data_primal_improved , reduced_data_dual ] = lin_evol_split_reduced_data(reduced_data)
[reduced_data_primal_improved, reduced_data_dual] = lin_evol_split_reduced_data(reduced_data) ...