3 % Assembly of the Stiffness Elasticity Matrix by `P_1`-Lagrange finite elements in 3D
4 % using basic
version (see report).
6 % The Stiffness Elasticity Matrix is given by
7 % ``\StiffElas_{m,l}=\int_{\DOMH} \Odv^t(\BasisFuncTwoD_m) \Ocv(\BasisFuncTwoD_l)dT, \ \forall (m,l)\in\ENS{1}{2\,\nq}^2,``
8 % where `\BasisFuncTwoD_m` are `P_1`-Lagrange vector basis functions.
9 % Here `\Ocv=(\Occ_{xx},\Occ_{yy},\Occ_{zz}, \Occ_{xy}, \Occ_{yz}, \Occ_{xz})^t` and
10 % `\Odv=(\Odc_{xx},\Odc_{yy},\Odc_{zz},2\Odc_{xy},2\Odc_{yz},2\Odc_{xz})^t`
11 % are the elastic stress and strain tensors respectively.
14 % nq: total number of vertices, also denoted by `\nq`.
15 % nme: total number of elements, also denoted by `\nme`.
16 % q: Array of vertices coordinates, `3\times\nq` array. <br/>
17 % `{\q}(\il,j)` is the
18 % `\il`-th coordinate of the `j`-th vertex, `\il\in\{1,2,3\}` and
20 % me: Connectivity array, `4\times\nme` array. <br/>
21 % `\me(\jl,
k)` is the storage index of the
22 % `\jl`-th vertex of the `
k`-th tetrahedron in the array `\q` of vertices coordinates, `\jl\in\{1,2,3,4\}` and
23 % `k\in{\ENS{1}{\nme}}`.
24 % volumes: Array of volumes, `1\times\nme array`. volumes(
k) is the volume
25 % of the
k-th tetrahedron.
26 % lambda: the first Lame coefficient in
Hooke's law
27 % mu: the second Lame coefficient in
Hooke's law
29 % - 0 global alternate numbering with local alternate numbering (classical method),
30 % - 1 global block numbering with local alternate numbering,
31 % - 2 global alternate numbering with local block numbering,
32 % - 3 global block numbering with local block numbering.
35 % K: `3\nq\times 3\nq` stiffness elasticity sparse matrix
43 %
#BuildIkFunc, #BuildElemStiffElasMatFunc
51 E=ElemStiffElasMat(q(:,me(:,
k)),volumes(
k),H);
55 K(I(il),I(jl))=K(I(il),I(jl))+E(il,jl);