This mesh is defined giving a list of num_elems polygonal element, num_nodes vertices. Each mesh element is defined giving a list of vertex numbers. This mesh is said heterogeneous because number of element vertices may vary for each element. The mesh must be "rebuilt" : Each couple of consecutive points of an element (defining a virtual edge) must be referenced twice in the mesh, this means an edge must belong to two mesh elements. (this is a topological and not geometric reference). An edge which belong to only one mesh element is supposed to be on the border of the mesh (or on the skin of the mesh)
Data structure for heterogeneous non-structured mesh is:
Remark : The array nodes may include vertices which do not belong to any element 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.
example
