| OptFEM2DP1 Toolbox V1.2b3 Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D

- Main Page
- Related Pages
- Files

- File List
- File Members

All Files Functions Pages
ElemMassMatP1.m
Go to the documentation of this file.
1 function AElem=ElemMassMatP1(area)
2 % function AElem=ElemMassMat(area)
3 % Computation of the element mass matrix for
4 % `P_1`-Lagrange finite elements
5 %
6 % Parameters:
7 % area: triangle area
8 %
9 % Return values:
10 % AElem: Element mass matrix, `3\times 3` matrix
11 % ``AElem=\frac{area}{12}\left( \begin{array}{ccc}
12 % 2 &1 &1 \\
13 % 1 &2 &1 \\
14 % 1 &1 &2
15 % \end{array} \right)``
16 %
17 % Example:
18 % @verbatim
19 % area=1/2.;
20 % AElem=ElemMassMatP1(area);
21 % @endverbatim
22 % Copyright:
23 % See \ref license
24 AElem=(area/12)*[2 1 1; 1 2 1; 1 1 2];