rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fem_matrix_reac_integral_kernel.m
1 function res = fem_matrix_reac_integral_kernel(x,model,df_info,i,j)
2 % function res = fem_matrix_reac_integral_kernel(x,model,df_info,i,j)
3 %
4 % auxiliary function for integral kernel for A_reac
5 % integral kernel on all elements simultaneously
6 % here x is in reference triangle!
7 % f(x) = c hatphi_j hatphi_i
8 % multiplication with |det(DF)| is realized in caller after quadrature.
9 % function can integrate cell-array valued data
10 
11 % B. Haasdonk 22.2.2011
12 % I. Maier 24.03.2011
13 
14 hat_phi_i = fem_evaluate_basis_function(df_info,x,i);
15 hat_phi_j = fem_evaluate_basis_function(df_info,x,j);
16 c = model.reaction(df_info.grid,1:df_info.grid.nelements,x,model); % local model!
17 if ~iscell(c)
18  % the following is vectorial of size nelements!
19  res = hat_phi_j * hat_phi_i * c;
20 else % iscell!!!
21  res = cell(1,length(c));
22  for q = 1:length(c)
23  res{q} = hat_phi_j * hat_phi_i * c{q};
24  end;
25 end;