3 % Computation of areas of triangles in the mesh
7 % q: Array of vertices coordinates, `2\times\nq` array. <br/>
9 % `\il`-th coordinate of the `j`-th vertex, `\il\in\{1,2\}` and
11 % me: Connectivity array, `3\times\nme` array.<br/>
12 % `\me(\jl,k)` is the storage index of the
13 % `\jl`-th vertex of the `k`-th triangle in the array `\q` of vertices coordinates, `\jl\in\{1,2,3\}` and
14 % `k\in{\ENS{1}{\nme}}`.
17 % area: Array of areas, `1\times\nme` array. area(k) is the area of the `k`-th triangle.
21 d21 = q(:,me(2,:))-c1;
22 d31 = q(:,me(3,:))-c1;
23 area = 0.5*(d21(1,:).*d31(2,:)-d21(2,:).*d31(1,:));