3 % Computation of the element weighted mass matrix
for
4 % `P_1`-Lagrange finite elements
7 % area: triangle area (
double)
8 % w: values of the weight function at the triangle vertices,
9 % `3\times 1` array (
double)
12 % AElem: Element weighted mass matrix, `3\times 3` matrix (
double)
21 % OptFEM2DP1 [V1.2b1] - Copyright (C) 2013 CJS (LAGA)
23 % This file is part of OptFEM2DP1.
24 % OptFEM2DP1 is free software: you can redistribute it and/or modify
25 % it under the terms of the GNU General Public License as published by
26 % the Free Software Foundation, either version 3 of the License, or
27 % (at your option) any later version.
29 % OptFEM2DP1 is distributed in the hope that it will be useful,
30 % but WITHOUT ANY WARRANTY; without even the implied warranty of
31 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 % GNU General Public License
for more details.
34 % You should have received a copy of the GNU General Public License
35 % along with
this program. If not, see <http:
36 AElem=(area/30)*[ 3*w(1)+w(2)+w(3), w(1)+w(2)+w(3)/2, w(1)+w(2)/2+w(3); ...
37 w(1)+w(2)+w(3)/2, w(1)+3*w(2)+w(3), w(1)/2+w(2)+w(3); ...
38 w(1)+w(2)/2+w(3), w(1)/2+w(2)+w(3), w(1)+w(2)+3*w(3)];