1 % Calculate the errors
for the basis stored in the matrix RB
2 function [errs, avg_time, errs_abs, errs_true] = error_indicator(model, model_data, RB_W, RB_V, training_mus)
3 errs = zeros(size(training_mus,1),1);
4 errs_abs = zeros(size(training_mus,1),1);
6 dd =
ARE.detailed_data;
10 rd = model.reduce(model_data, dd);
12 parfor i = 1:size(training_mus,1)
14 tmpModel.set_mu(training_mus(i, :));
15 tmpModel.RB_error_estimation = false;
16 tmpModel.RB_calc_residual = true;
18 rsim = rb_simulation(tmpModel, rd);
19 errs(i) = rsim.nresidual;
20 errs_abs(i) = rsim.residual;
23 warning(['Solution not calculable: ', e.message])
Implementation of the parametric algebraic Riccati equation.