rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
inner_product.m
1 function K = inner_product(U1,U2,grid,params)
2 %function K = inner_product(U1,U2,grid,params)
3 %
4 % function computing the l2 inner product between all pairs of
5 % discrete 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 %
9 % required fields of params:
10 %
11 % 'inner_product_matrix_algorithm' : name of function, which
12 % gives the matrix W for L2-norm computation U1' * W * U2
13 % e.g. fv_inner_product_matrix. Arguments of this function
14 % are the grid and params.
15 
16 % Bernard Haasdonk 20.7.2006
17 
18 % currently simple diagonal weighting of element values sufficient
19 W = inner_product_matrix(grid,params);
20 K = U1' * W * U2;
21 
22 % TO BE ADJUSTED TO NEW SYNTAX
23 %| \docupdate