3 % Assembly of the Mass vectors fields Matrix by `P_1`-Lagrange finite elements in 3D
4 % using OptV0
version (see report).
6 % The Mass vectors fields is given by
7 % ``\MassVF_{i,j}=\int_\DOMH \DOT{\BasisFuncTwoD_m(\q)}{ \BasisFuncTwoD_l(\q)}d(\q), \ \forall (m,l)\in\ENS{1}{3\,\nq}^2,``
8 % where `\BasisFuncTwoD_m` are `P_1`-Lagrange vector basis functions.
11 % nq: total number of vertices, also denoted by `\nq`.
12 % nme: total number of elements, also denoted by `\nme`.
13 % me: Connectivity array, `4\times\nme` array. <br/>
14 % `\me(\jl,
k)` is the storage index of the
15 % `\jl`-th vertex of the `k`-th tetrahedron in the array `\q` of vertices coordinates, `\jl\in\{1,2,3,4\}` and
16 % `k\in{\ENS{1}{\nme}}`.
17 % volumes: Array of volumes, `1\times\nme array`. volumes(
k) is the volume
18 % of the
k-th tetrahedron.
20 % - 0 global alternate numbering with local alternate numbering (classical method),
21 % - 1 global block numbering with local alternate numbering,
22 % - 2 global alternate numbering with local block numbering,
23 % - 3 global block numbering with local block numbering.
26 %
M: `3\nq\times 3\nq` Global Mass vectors fields sparse matrix
34 %
#BuildIkFunc, #BuildElemMassVFMatFunc
43 %E=ElemStiffElasMat(q(:,me(:,
k)),volumes(
k),H);
45 M(I,I)=
M(I,I)+volumes(
k)*E;