3 % Initialization of a minimalist 3D Mesh structure
for the cube domain
5 % Cube domain is `[0,1]\times[0,1]\times[0,1]` </br>
6 % \image html images/
CubeMesh.png
"figure : CubeMesh function with N=3"
8 % There are `(
N+1)` vertices on each edges and `(
N+1)\times(
N+1)`vertices on
12 % N: integer, number, minus one, of vertices on a edge
15 % Th: minimalist mesh structure
17 % Generated fields of Mesh:
18 % nq: total number of vertices, also denoted by `\nq`.
19 % q: Array of vertices coordinates, `3\times\nq` array. <br/>
20 % `{\q}(\il,j)` is the
21 % `\il`-th coordinate of the `j`-th vertex, `\il\in\{1,2,3\}` and
23 % nme: total number of elements, also denoted by `\nme`.
24 % me: Connectivity array, `4\times\nme` array. <br/>
25 % `\me(\jl,
k)` is the storage index of the
26 % `\jl`-th vertex of the `
k`-th tetrahedron in the array `\q` of vertices coordinates, `\jl\in\{1,2,3,4\}` and
27 % `k\in{\ENS{1}{\nme}}`.
28 % volumes: Array of volumes, `1\times\nme array`. volumes(
k) is the volume
29 % of the
k-th tetrahedron.
39 assert(~
isempty(ver('msh')),'package msh must be installed')
40 mesh=msh3m_structured_mesh(t,t,t,1,1:6); % package msh
44 [x,y,z] = meshgrid(t,t,t);
55 Th=struct('q',q,'me',me, ...
60 % 'areas',ComputeAreaOpt(q,me),...
61 % 'lbe',EdgeLengthOpt(be,q));