rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
rb_output_functional_prep.m
1 function reduced_data = rb_output_functional_prep(...
2  model,reduced_data,detailed_data)
3 %function reduced_data = rb_output_functional_prep(...
4 % model,reduced_data,detailed_data)
5 %
6 % function computing the output-functional evaluation of the
7 % reduced basis RB in detailed_data into the aditional fields s_RB
8 % and s_l2norm.
9 %
10 % Required fields of model:
11 % name_output_functional : name of output functional to compute
12 
13 % Bernard Haasdonk 16.5.2008
14 
15 nRB = size(detailed_data.RB,2);
16 s_RB = zeros(nRB,1);
17 
18 for n = 1:size(detailed_data.RB,2)
19  s = output_functional(model,detailed_data,detailed_data.RB(:,n));
20  s_RB(n) = s.value;
21 end;
22 reduced_data.s_RB = s_RB;
23 reduced_data.s_l2norm = s.l2norm;
24