1 function [RBext,par_dummy] = comsol_RB_extension_greedy_lin_stat(model,detailed_data)
2 %
function [RBext,par_dummy] = RB_extension_simple_greedy_lin_stat_comsol(model,detailed_data)
4 %
this function is needed
for the greedy-algorithm
for stationary functions.
5 % It returns an orthonormalized basis
function
7 % Oliver Zeeb, 18.09.2012
12 sim_data=detailed_simulation(model,detailed_data);
13 RBext = model.get_dofs_from_sim_data(sim_data);
15 % orthonormalize
new basis vector
16 InProd_matrix = model.get_inner_product_matrix(detailed_data);
18 detailed_data.RB * (detailed_data.RB
' * InProd_matrix * ...
20 norm_Uproj = sqrt(max(Uproj'*InProd_matrix*Uproj,0)); %norm
22 %
if nonzero projection error -> end with
new snapshot
23 Uproj = Uproj/norm_Uproj;
25 % due to scaling, no precise orthonormalization is obtained. So perform
26 %
explicit orthonormalization
27 RBtmp = orthonormalize([detailed_data.RB,Uproj],InProd_matrix);
28 if size(RBtmp,2)> size(detailed_data.RB,2)
31 error('accuracy problem, should not reach this point!!');
35 %return orthonormalized basis vector