The purpose of a hmesh interface is to translate data stored in a
given user format - like the above bismesh structures - into the
HMESH2D/HELEMENT2D
structures. According to the interface mask the INTERFACE_ELEMENT
consists of all
data of the HELEMENT2D
. These are grouped in
HMESH2D_HELEMENT2D_STRUCT
. The additional variables support the
recursive mesh traversal and the generation of HELEMENT2D
s. Furthermore
there may be some entries which depend on the user's data format.
typedef struct interface_element { HMESH2D_HELEMENT2D_STRUCT; USER_ELEMENT* user_element; double* point_coords[MAX_NUMBER_OF_VERTICES_PER_ELEMENT]; int level; struct interface_element* next; ... /* additional entries by the user */ } INTERFACE_ELEMENT;
In our case the INTERFACE_ELEMENT
structure of the mask has the
concrete outline:
typedef struct interface_element { HMESH2D_HELEMENT2D_STRUCT; BELEMENT* belement; double* point_coords[MAX_NUMBER_OF_VERTICES_PER_ELEMENT]; int level; struct interface_element* next; VEC3 coord_of_new_node; } INTERFACE_ELEMENT;The
INTERFACE_ELEMENT
s are organized in a free list which is linked
via the next
pointer. The coordinates of the point that is created
while the element is being bisected are stored in
coord_of_new_node
. Although the routines for traversing the mesh have
pointers to HELEMENT2D
s as arguments and return values, in the inteface
these pointers will be casted pointers to INTERFACE_ELEMENT
s. In an
object oriented setting one would apply the subclass concept here.
Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.