next up previous contents index
Next: Global access to general Up: Description of the mesh Previous: Description of the geometric

Element data

 

We use a procedural access to single elements in this mesh concept. The procedures return element data in a small structure. This structure for an element of the mesh consists mainly of a pointer to an element description, which contains all information described above, and a vector of pointers to the world coordinates of the element's vertices.

Such information may be enlarged by optional global eindex and vindex[] integer indices of the element itself and its vertices and a pointer to a data area which contains additional information that may be used by the transformation routines or any other of the user-supplied routines.

The vertex indices, if present, allow the visualization routines to minimize the number of calls to the data function, if the data values are globally continuous. In this case, the values at a node are uniquely defined, independent of the element where it belongs to. If the data is not continuous between elements, the global vertex index may also be used to compute a continuous approximation to the data by averaging the values at the nodes.

The global element indices for example may be used to specify a set of elements of special attention and to display only these elements (or their neighbourhood).

typedef struct
{
  MESH3D                *mesh;        /* this is an element of 'mesh'    */
  float                 **vertex;     /* world coordinates of vertices   */
  int                   *vindex;      /* indices of vertices             */
  int                   eindex;       /* index of the element            */
  ELEMENT3D_DESCRIPTION *descr;       /* connectivity, ...               */

  int                   size_of_user_data; /* opt. size of user data area*/
  void                  *user_data;   /* optional pointer to user data   */
                                      /* of this element                 */
} ELEMENT3D;



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.