rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
lagrange_nodes_edges_llcoord.m
1 function llcoord = lagrange_nodes_edges_llcoord(pdeg)
2 % function llcoord = lagrange_nodes_edges_llcoord(pdeg)
3 %
4 % function returning edge-local coordinates of the
5 % lagrange-nodes of the reference triange. llcoord is a
6 % nlagrange_nodes x 3 matrix.
7 % llcoord(i,j) = real number on the unit-interval, if the i-th
8 % lagrange-node lies on the j-th edge
9 % llcoord(i,j) = -1, else
10 
11 % Immanuel Maier, 11.03.2011
12 
13 switch pdeg
14  case 1
15  llcoord = [1 -1 0;
16  0 1 -1;
17  -1 0 1];
18  case 2
19  llcoord = [1 -1 0;
20  0.5 -1 -1;
21  0 1 -1;
22  -1 -1 0.5;
23  -1 0.5 -1;
24  -1 0 1];
25  case 3
26  llcoord = [3 -3 0;
27  2 -3 -3;
28  1 -3 -3;
29  0 3 -3;
30  -3 -3 2;
31  -3 -3 -3;
32  -3 2 -3;
33  -3 -3 1;
34  -3 1 -3;
35  -3 0 3]/3;
36  otherwise
37  error('pdeg < 1 or > 3 not supported in lagrange_nodes_edges_llcoord!');
38 end;