OptFEM2DP1 Toolbox  V1.2
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
base/ElemMassMat2DP1.m
Go to the documentation of this file.
00001 function AElem=ElemMassMat2DP1(area)
00002 % function AElem=ElemMassMat2DP1(area)
00003 %   Computation of the element mass matrix for
00004 %  `P_1`-Lagrange finite elements
00005 %
00006 % Parameters:
00007 %  area: triangle area
00008 %
00009 % Return values:
00010 %  AElem: Element mass matrix, `3\times 3` matrix
00011 % ``AElem=\frac{area}{12}\left( \begin{array}{ccc}
00012 %  2 &1 &1 \\
00013 %  1 &2 &1 \\
00014 %  1 &1 &2
00015 %  \end{array} \right)``
00016 %
00017 % Example:
00018 %  @verbatim 
00019 %    area=1/2.;
00020 %    AElem=ElemMassMat2DP1(area);
00021 %  @endverbatim
00022 % Copyright:
00023 %   See \ref license
00024 AElem=(area/12)*[2 1 1; 1 2 1; 1 1 2];
 All Files Functions