rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fv_mass_matrix.m
1 function W = fv_mass_matrix(U,grid,model)
2 %function M = fv_mass_matrix([],grid,[])
3 %
4 % function computing the l2 inner product matrix for fv-functions
5 % on the grid.
6 % By this function, inner products between functions can be
7 % computed by their DOF vectors: K = U1' * W * U2;
8 %
9 % most arguments are empty as they are only required for ldg functions
10 
11 % Bernard Haasdonk 20.7.2006
12 
13 % currently simple diagonal weighting of element values sufficient
14 W = sparse(1:grid.nelements,1:grid.nelements,grid.A);
15