1 function res = func_phi_product(lcoord,func,df_info)
2 %
function res = func_phi_product(lcoord,func,df_info)
4 % auxiliary
function computing the product, which is used in l2
5 % projecting a given analytical
function.
6 % lcoord is a 2-vector of local coordinates, func the analytical
7 % function with calling syntax func(einds,loc1,loc2,grid,params)
8 % res is a vector of projected values on all elements. This
9 % function is used for integration and results in the dof values
10 % of the l2-projected function.
11 % params.evaluate_basis is supposed to be a function doing
12 % point-evaluation of basis functions
14 % Bernard Haasdonk 2.2.2009
16 % Phi will be a ndofs_per_element x dimrange matrix
17 Phi = df_info.evaluate_basis(lcoord,df_info);
19 nel = df_info.grid.nelements;
20 % F will be a nelements x dimrange matrix
21 %F = func(1:nel,ones(nel,1)*lcoord(:)',grid,params);
22 F = func(1:nel,lcoord(:)
',df_info.grid);
23 % small loop over dofs