rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fv_inner_product.m
1 function K = fv_inner_product(model,model_data,U1,U2)
2 %function K = fv_inner_product(model,[model_data],U1,U2)
3 %
4 % function computing the l2 inner product between all pairs of
5 % fv-functions in U1,U2. Result is a matrix K of size size(U1,2) x
6 % size(U2,2) with the inner products.
7 % Correct Omega-integrals are computed by respecting the cell-areas
8 % defined in grid,params. Actually, params is currently
9 % superfluous, but kept for consistency of command line arguments.
10 % perhaps later params may indicate polynomial degree, etc.
11 
12 % Bernard Haasdonk 20.7.2006
13 
14 % currently simple diagonal weighting of element values sufficient
15 if(isempty(model_data))
16  model_data = model.gen_model_data(model);
17 end
18 W = model.get_inner_product_matrix(model_data);
19 K = U1' * W * U2;
20 
21 %| \docupdate