1 function res = fem_evaluate(df, eindices, lcoord, dummy1, dummy2)
2 %
function res = fem_evaluate(df, eindices, lcoord)
4 % method evaluating a fem
function df in local coordinates in the point
5 % `\hat x` = lcoord in several elements simultaneously given by
7 % res is a length(eindices) x dimrange vector
9 % dummy arguments is ignored, only required for consistency to
12 % Bernard Haasdonk 12.1.2011
14 % evaluate all reference basis functions in the lcoords,
15 % is a ndofs_per_element x dimrange matrix
16 basis_values = fem_evaluate_basis(df,lcoord);
17 %res = zeros(params.dimrange,length(eindices));
18 %res = zeros(length(eindices),params.dimrange);
19 % linear combination with DOFS to get function values
20 gid = df.global_dof_index(eindices,:); % only first scalar component!
21 % insert the incremented dofs
22 ind = ones(df.dimrange,1)*(1:size(gid,2));
25 incr = ones(size(gid,1),1) * (0:(df.dimrange-1));
26 iincr = repmat(incr,1,size(gid,2));
29 d = reshape(d,length(eindices),df.ndofs_per_element);
30 res = d * basis_values;
32 %fem_evaluate_basis([0,0],params)'*dofs(1,:)'