OptFEM2DP1 Toolbox  V1.2b3
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
 All Files Functions Pages
ElemStiffElasMatP1BaOptV0.m
Go to the documentation of this file.
1 function Ke=ElemStiffElasMatP1BaOptV0(ql,area,C)
2 % function [Elem]=ElemStiffElasMatP1BaOptV0(ql,area,C)
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)
6 %
7 % Hooke's matrix :
8 % C=[L + 2*M L 0]
9 % [ L L + 2*M 0]
10 % [ 0 0 M]
11 % Numbering of local points in reference element is :
12 % P=[(0, 0), (1, 0), (0, 1)]
13 %
14 % Parameters:
15 % ql : array of coordinates of the vertices of the triangle, 2-by-3 matrix (double)
16 % area : triangle area (double)
17 % C : Hooke's matrix (3-by-3 double)
18 %
19 % Return values:
20 % Elem : element stiffness elasticity matrix, 6-by-6 matrix (double)
21 %
22 % Example:
23 % @verbatim
24 % ql=[0 1 0;0 0 1];
25 % area=1/2.;
26 % lambda=1.; mu=1.;
27 % C=[lambda+2*mu, lambda, 0;lambda, lambda + 2*mu, 0;0, 0, mu];
28 % Elem=ElemStiffElasMatP1BaOptV0(ql,area,C);
29 % @endverbatim
30 % Copyright:
31 % See \ref license
32 u=ql(:,2)-ql(:,3);
33 v=ql(:,3)-ql(:,1);
34 w=ql(:,1)-ql(:,2);
35 % Matrice des déformations (x par 2*area)
36 B=[u(2),0,v(2),0,w(2),0; ...
37  0,-u(1),0,-v(1),0,-w(1); ...
38  -u(1),u(2),-v(1),v(2),-w(1),w(2)];
39 Ke=B'*C*B/(4*area);