rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
ldg_local_mass_matrix.m
1 function M = ldg_local_mass_matrix(qdeg,df_info)
2 %function M = ldg_local_mass_matrix(qdeg,df_info)
3 %
4 % function computing the local mass matrix of a scalar ldg basis by
5 % numerical integration of degree qdeg.
6 %
7 % Result is a numlocal_base_function x num_local_base_functions
8 % matrix with entries
9 %``\int_{\mbox{ref}_{\mbox{tria}}} \hat \phi_i \hat \phi_j.``
10 %
11 % The matrix should be unity due to orthonormalization of the
12 % basis, but due to numerical errors, this can be slightly different.
13 
14 % Bernard Haasdonk 31.8.2009
15 
16 f = @(lcoord) gram_matrix(ldg_evaluate_basis(lcoord,df_info)');
17 M = triaquadrature(qdeg,f);
18 %| \docupdate