1 function res = fem_matrix_robin_integral_kernel(x,model,df_info,i,j,robin_elind,robin_edgeind)
2 %
function res = fem_matrix_robin_integral_kernel(x,model,df_info,i,j,robin_elind,robin_edgeind)
4 % auxiliary
function for integral kernel
for A_robin
5 % integral kernel on all robin-edges simultaneously
6 % here x is a scalar value on unit interval
7 % f(x) = (
alpha/beta + b^T n) hatphi_i hatphi_j
8 % multiplication with |edge| is realized in caller after
10 % This function can handle cell-array valued data
12 % B. Haasdonk 22.2.2011
17 for local_edge_id = 1:3
18 lcoord = llocal2local(grid,local_edge_id,x); % local coord
for x on edge 1
19 hat_phi_i = fem_evaluate_basis_function(df_info,lcoord,i);
20 hat_phi_j = fem_evaluate_basis_function(df_info,lcoord,j);
21 inds = find(robin_edgeind==local_edge_id);
22 elinds = robin_elind(inds);
23 b = model.velocity(grid,elinds,lcoord,model); % local model!
26 res = [res; ( (model.robin_beta(grid,elinds,local_edge_id,x, ...
28 model.robin_alpha(grid,elinds,local_edge_id,x, ...
30 + b(:,1) .* grid.
NX(elinds,local_edge_id) ...
31 + b(:,2) .* grid.
NY(elinds,local_edge_id) ...
32 ) * hat_phi_i * hat_phi_j ]; % local model!
33 else % iscell => components mode
35 % number of components = 1+ Q_velocity y
37 res = cell(1,length(b)+1);
43 ( (model.robin_beta(grid,elinds,local_edge_id,x, ...
45 model.robin_alpha(grid,elinds,local_edge_id,x, ...
47 ) * hat_phi_i * hat_phi_j ]; % local model!
49 res{q+1} = [res{q+1};...
50 ( b{q}(:,1).*grid.NX(elinds,local_edge_id) ...
51 + b{q}(:,2).*grid.NY(elinds,local_edge_id) ...
52 ) * hat_phi_i * hat_phi_j; ...