1 function res = fem_matrix_neumann_integral_kernel(x,model,df_info,i,j,neumann_elind,neumann_edgeind)
2 %
function res = fem_matrix_neumann_integral_kernel(x,model,df_info,i,j,neumann_elind,neumann_edgeind)
4 % auxiliary
function for integral kernel
for A_neumann
5 % integral kernel on all neumann-edges simultaneously
6 % here x is a scalar value on unit interval
7 % f(x) = (b^T n) hatphi_i hatphi_j
8 % multiplication with |edge| is realized in caller after quadrature.
9 %
function can handle cell-array valued data
11 % B. Haasdonk 22.2.2011
15 for local_edge_id = 1:3
16 % transform 1d coordinate to 2d local coordinate
17 lcoord = llocal2local(df_info.grid,local_edge_id,x); % local coord
for x on edge 1
18 hat_phi_i = fem_evaluate_basis_function(df_info,lcoord,i);
19 hat_phi_j = fem_evaluate_basis_function(df_info,lcoord,j);
20 inds = find(neumann_edgeind==local_edge_id);
21 b = model.velocity(df_info.grid,neumann_elind(inds),lcoord,model); % local model!
24 ( b(:,1).*df_info.grid.NX(neumann_elind(inds),local_edge_id) ...
25 + b(:,2).*df_info.grid.NY(neumann_elind(inds),local_edge_id) ...
26 ) * hat_phi_i * hat_phi_j; ...
30 res = cell(1,length(b));
37 ( b{q}(:,1).*df_info.grid.NX(neumann_elind(inds),local_edge_id) ...
38 + b{q}(:,2).*df_info.grid.NY(neumann_elind(inds),local_edge_id) ...
39 ) * hat_phi_i * hat_phi_j; ...