3 % Assembling Mass Weight Matrix by `P_1`-Lagrange finite elements
4 % using "base" version (see report).
6 % The Mass Weight Matrix is given by
7 % ``\MasseF{w}_{i,j}=\int_\DOMH w(\q)\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 nodes of the mesh, also noted `\nq`,
11 % nme: number of triangles, also noted `\nme`,
12 % me: `3\times\nme` 'int32' array,`\me(\jl,k)` index of storage, in the array `q`, of the `\jl`-th
13 % vertex of the triangle of index `k`, `\jl\in\{1,2,3\}` and `k\in\{1,\hdots,\nme\}.`
15 % areas: `1\times\nme` array, areas(k) is the area of triangle k.
16 % Tw: `\nme` '
double' array, `Tw(i)=w(\q^i),` `\forall i\in\ENS{1}{\nq}`.
19 % M: `\nq\times\nq` sparse matrix
25 % Tw=w(Th.q(1,:),Th.q(2,:));
42 M(i,j)=M(i,j)+E(il,jl);