[32a023]: obsolete / test / mesh_test.m Maximize Restore History

Download this file

mesh_test.m    33 lines (23 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Example of how we expect the Octave interface to look like
#This file is our test for the TDD about mesh
# Create mesh
fem_init_env ();
msh1 = msh2m_structured_mesh(1:6,1:4,0,3:6);
msh2 = fem_init_mesh (msh1);
msh3 = fem_get_mesh (msh2);
# assert (msh1, msh3) doesn't work because the order of column inside "e" and "t"
# depends on the algorithm used for visiting the mesh
assert (msh1.p, msh3.p);
e= [1 5 9 13 21 17 22 23 1 2 4 3 8 12 16 20
5 9 13 17 22 21 23 24 2 3 8 4 12 16 20 24
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 3 3 3 4 3 4 4 6 6 5 6 5 5 5 5
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
assert (msh3.e, e);
t= [1 2 3 5 6 7 9 10 11 13 14 15 17 18 19 1 2 3 5 6 7 9 10 11 13 14 15 17 18 19
5 6 7 9 10 11 13 14 15 17 18 19 21 22 23 2 3 4 6 7 8 10 11 12 14 15 16 18 19 20
6 7 8 10 11 12 14 15 16 18 19 20 22 23 24 6 7 8 10 11 12 14 15 16 18 19 20 22 23 24
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
assert (msh3.t, t);