The mesh must be "rebuilt" : tetrahedrons faces must be referenced exactly twice in the mesh, this means a face must belong to two mesh elements. (this is a topological and not geometric reference). Tetrahedrons face which belong to only one mesh element define the border of the mesh (or the skin of the mesh)
Tetrahedrons must be numbered as follows:

Data structure for this mesh is defined by ns_tetrahedrons, Tmesh3D, Tscalar3D_data and Tvec3D_data :
Remark : The array nodes may include vertices which do not belong to any tetrahedron of the mesh. In this case the mesh does not provide a continuous numeration of the vertices and num_nodes is not the total number of vertices of the mesh but the dimension of nodes array.