3 % Assembly of the Mass Matrix by `P_1`-Lagrange finite elements in 3D
6 % The Mass Matrix `\Masse` is given by
7 % ``\Masse_{i,j}=\int_\DOMH \FoncBase_i(\q)\, \FoncBase_j(\q)\, d\q,\ \forall (i,j)\in{\ENS{1}{\nq}}^2``
8 % where `\FoncBase_i` are `P_1`-Lagrange basis functions.
10 % nq: total number of vertices, also denoted by `\nq`.
11 % nme: total number of elements, also denoted by `\nme`.
12 % me: Connectivity array, `4\times\nme` array. <br/>
13 % `\me(\jl,
k)` is the storage index of the
14 % `\jl`-th vertex of the `k`-th tetrahedron in the array `\q` of vertices coordinates, `\jl\in\{1,2,3,4\}` and
15 % `k\in{\ENS{1}{\nme}}`.
16 % volumes: Array of volumes, `1\times\nme array`. volumes(
k) is the volume
17 % of the
k-th tetrahedron.
20 %
M: Global mass matrix, `\nq\times\nq` sparse matrix.
39 M(i,j)=
M(i,j)+E(il,jl);