Mercurial > fem-fenics-eugenio
changeset 13:36882e185f02
New test for the mesh class
author | gedeone-octave <marco.vassallo@outlook.com> |
---|---|
date | Sat, 06 Jul 2013 01:08:12 +0200 |
parents | b7c74c0bdabd |
children | f329fc94b1a2 |
files | test/mesh_test.m |
diffstat | 1 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/mesh_test.m Sat Jul 06 01:08:12 2013 +0200 @@ -0,0 +1,32 @@ +#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); +