6 %
function computing the matrix of the h10 inner product on the
7 % boundary specified through elind and edgeind. elind and edgeind
8 % have to be vectors of the same length.
11 % G: ndofs x ndofs matrix with nonzero entries only
for those
12 % dofs, who lie on the specified boundary.
14 % I. Maier, 19.07.2011
16 qdeg = 2*df_info.pdeg;
17 ndofs = df_info.ndofs;
18 nlagrange_nodes = df_info.nlagrange_nodes;
20 j = sub2ind(size(df_info.grid.EL),elind,edgeind);
21 EL = df_info.grid.EL(j);
23 G = spalloc(ndofs,ndofs,1);
24 for i = 1:nlagrange_nodes
25 for j = 1:nlagrange_nodes
27 f = @(x) G_int_kernel(x,df_info,i,j,elind,edgeind);
31 gids_i = df_info.global_dof_index(elind,i);
32 gids_j = df_info.global_dof_index(elind,j);
34 G_tmp = sparse(gids_i,gids_j,res,ndofs,ndofs);
39 function res = G_int_kernel(x,df_info,i,j,elind,edgeind)
40 %
function res = G_int_kernel(x,df_info,i,j,elind,edgeind)
43 for local_edge_id = 1:3
44 lcoord = llocal2local(df_info.grid,local_edge_id,x);
45 hat_phi_i = fem_evaluate_scalar_basis_function_derivative(df_info,lcoord,i);
46 hat_phi_j = fem_evaluate_scalar_basis_function_derivative(df_info,lcoord,j);
47 inds = find(edgeind == local_edge_id);
48 switch (local_edge_id)
50 res = [res; ones(size(inds)) * hat_phi_i(1) * hat_phi_j(1)];
52 res = [res; ones(size(inds)) * hat_phi_i(2) * hat_phi_j(2)];
54 res = [res; ones(size(inds)) * (hat_phi_i(2)-hat_phi_i(1)) * ...
55 (hat_phi_j(2) - hat_phi_j(1))];
function res = intervalquadrature(poldeg, func, varargin)
integration of function func over reference interval == unit interval. by Gaussian quadrature exactly...
function G = fem_h10_boundary_inner_product_matrix(df_info, elind, edgeind)
fem_h10_boundary_inner_product_matrix(df_info,elind,edgeind)