3 % Computation of the element stiffness elasticity matrix
for
4 % `P_1`-Lagrange method.
5 % The method for numbering the degrees of freedom is local alternate numbering (classical method)
11 % Numbering of local points in reference element is :
12 % P=[(0, 0), (1, 0), (0, 1)]
15 % q1 : array of coordinates of the first point of the triangle
16 % q2 : array of coordinates of the second point of the triangle
17 % q3 : array of coordinates of the third point of the triangle
18 % area : triangle area
19 % lambda : first Lame coefficient in Hooke's law
20 % mu : second Lame coefficient in Hooke's law
23 % Elem : element stiffness elasticity matrix, 6-by-6 matrix
27 % q1=[0;0];q2=[1;0];q3=[0;1];
40 C=[lambda+2*mu,lambda,0;lambda,lambda+2*mu,0;0,0,mu];
41 % Matrice des déformations (x par 2*area)
42 B=[u(2),0,v(2),0,w(2),0; ...
43 0,-u(1),0,-v(1),0,-w(1); ...
44 -u(1),u(2),-v(1),v(2),-w(1),w(2)];