rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fem_l2_norm.m
1 function res = fem_l2_norm(df)
2 %function res = fem_l2_norm(df)
3 %
4 % function computing the l2-norm of a discrete fem function
5 
6 ressqr = df.dofs(:)' * ...
7  df.df_info.l2_inner_product_matrix * ...
8  df.dofs(:);
9 if ressqr < 0
10  ressqr = 0;
11 end;
12 res = sqrt(ressqr);