1 function M = ldg_local_mass_matrix(qdeg,df_info)
2 %
function M = ldg_local_mass_matrix(qdeg,df_info)
4 %
function computing the local mass matrix of a scalar ldg basis by
5 % numerical integration of degree qdeg.
7 % Result is a numlocal_base_function x num_local_base_functions
9 %``\int_{\mbox{ref}_{\mbox{tria}}} \hat \phi_i \hat \phi_j.``
11 % The matrix should be unity due to orthonormalization of the
12 % basis, but due to numerical errors,
this can be slightly different.
14 % Bernard Haasdonk 31.8.2009
16 f = @(lcoord) gram_matrix(ldg_evaluate_basis(lcoord,df_info)
');
17 M = triaquadrature(qdeg,f);