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 block numbering
7 % The elasticity matrix obtained from Hooke's law is given by:
8 % ``C=\left\{\begin{array}[ccc]
9 % &\lambda+2\mu &\lambda &0\\
10 % &\lambda &\lambda+2\mu &0\\
19 % Numbering of local points in reference element is :
20 % P=[(0, 0), (1, 0), (0, 1)]
23 % q1 : array of coordinates of the first point of the triangle
24 % q2 : array of coordinates of the second point of the triangle
25 % q3 : array of coordinates of the third point of the triangle
26 % area : triangle area
27 % lambda : first Lame coefficient in Hooke
's law
28 % mu : second Lame coefficient in Hooke's law
31 % Elem : element stiffness elasticity matrix, 6-by-6 matrix
35 % q1=[0;0];q2=[1;0];q3=[0;1];
48 C=[lambda+2*mu,lambda,0;lambda,lambda+2*mu,0;0,0,mu];
49 % Matrice des déformations (x par 2*area)
50 B=[u(2),v(2),w(2),0,0,0; ...
51 0,0,0,-u(1),-v(1),-w(1); ...
52 -u(1),-v(1),-w(1),u(2),v(2),w(2)];