3 %
function computing the h1 inner product matrix
for fv-functions on the grid.
5 % By
this function, inner products between functions can be
6 % computed by their DOF vectors: `<U_1, U_2>_{H^1,h} = U_1
' W U_2`
9 % W : inner product matrix
11 % Bernard Haasdonk 20.7.2006
13 grid = model_data.grid;
15 % currently simple diagonal weighting of element values sufficient
16 W = sparse(1:grid.nelements,1:grid.nelements,grid.A);
18 i=reshape(repmat([1:H],5,1),5*H,1);
19 j=reshape([1:H;grid.NBI'],5*H,1);
20 s=100*grid.DC(1,1) * reshape([-ones(1,H);1/4*ones(4,H)],5*H,1);
23 WH = sparse(i,j,s,H,H,5*H);
function W = fv_h1_inner_product_matrix(model, model_data)
function computing the h1 inner product matrix for fv-functions on the grid.