next up previous contents
Next: The test-if-proceed routine Up: Data Extraction Previous: Preparing the traverse

The projection routine

The purpose of the projection routine is to fill the element specific data in the element data structure. In the example above this was of the type HM2_COORD_DATA and contained only the vertex coordinates of the respective element. The data of the current element may depend on the data in the HELEMENT2D and the element data of the parent element. Additionally the entries of the HM2_GENERAL-structure may play a role in assembling and calculating the data on the current element.

The GRAPE library features several projection routines that can be reused by any other display method. In the 2D-case these are:

These routines use the following data structure as element data:
typedef struct hm2_coord_data {
  VEC3 vertex_coord[MESH2D_MAX_VERTEX];
  int  	in_lens_area;
} HM2_COORD_DATA;

typedef struct hm2_scalar_fct_data {
  double vertex_value[MESH2D_MAX_VERTEX]; 
  int   in_lens_area;
} HM2_SCALAR_FCT_DATA;

typedef struct hm2_vec_fct_data {
  VEC3 	vertex_coord[MESH2D_MAX_VERTEX];
  VEC3 	vertex_value[MESH2D_MAX_VERTEX]; 
  int  	in_lens_area;
} HM2_VEC_FCT_DATA;

typedef struct hm2_coord_color_data {
  VEC3 	vertex_coord[MESH2D_MAX_VERTEX];
  VEC3 	vertex_color[MESH2D_MAX_VERTEX];
  int  	in_lens_area;
} HM2_COORD_COLOR_DATA;

typedef struct hm2_coord_color_fct_data {
  VEC3 	 vertex_coord[MESH2D_MAX_VERTEX];
  VEC3   vertex_color[MESH2D_MAX_VERTEX];
  double vertex_value[MESH2D_MAX_VERTEX];
  int    in_lens_area;
} HM2_COORD_COLOR_FCT_DATA;
The names of the projection routines indicate which data are calculated: _coord_ means that vertex coordinates are compiled, _vec_fct_ means that vector valued functions are calculated and so on.

Within these projection routines the vertex error estimators are used to decide wether a given datum has to be interpolated from parent data in order to assure continuity or if it has to be filled with the original value provided by the HMESH interface.


next up previous contents
Next: The test-if-proceed routine Up: Data Extraction Previous: Preparing the traverse

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.