next up previous contents
Next: Projects for Meshes Up: HMesh2d Previous: Display Methods on HMesh2d

Other Methods on HMesh2d

  GRAPE(hmesh, "xdr")(xdr)

XDR *xdr
This method implements XDR interface of GRAPE for the class HMesh2d. Of course neither function pointers nor the underlying user data can be handled, but all scalar values are converted, so it is an abstract method. To use the read/write facilities of GRAPE, one has to overload this method.

   

(HMESH2D *)GRAPE(hmesh, "get-bnd-box")(xmin, xmax, ymin, ymax, zmin, zmax)

HMESH2D *hmesh
double *xmin,*xmax,*ymin,*ymax,*zmin,*zmax

Determines the bounding-box of the instance mesh and returns it by its extremal coordinates. This method is faster than the Mesh2d-version because only macro-elements have to be inspected.

   

(HMESH2D *)GRAPE(hmesh, "search")(v, c, el)

HMESH2D *hmesh
VEC3 v
double *c
HELEMENT2D **el

This method searches within the hmesh for a given point with world-coordinates v. If el is not NULL local search is performed starting at the element el. This means walking up in the hierarchy until an element is found, which contains v, and then walking down to the wanted element. If el is NULL at the beginning, hierarchical search is applied by walking over the macro-elements and then walking down the hierarchy.
If successful, the method returns in el the element on level level_of_interest which contains the given point v, and in c the local coordinates of this point. The pointer varc has to be allocated with enough memory before calling the method. If the search failed, el will be NULL. The search relies on the HMesh2d-method "select_child". On one hand this means that this pointer has to be filled in the interface at least with the default-method "g_hmesh2d_def_select_child". On the other hand it implies that implementing this method efficiently is a possibility of speeding up the search.

   

(HMESH2D *)GRAPE(hmesh, "find-pick-intersec")(v,u,w,el,c)

HMESH2D *hmesh
VEC3 v
double u,w
HELEMENT2D **el
double *c

For hmesh with dimension_of_world equal 2 this method determines for given screen-coordinates u,w which point on the mesh is hit by these pick-coordinates. The world coordinates of this point are returned in v, the element on level meshtex2html_wrap_inline3530level_of_interest which contains this point and its local-coordinates are returned in el and c. The only difference to the Mesh2d-version is the use of improved hierarchical searching.


next up previous contents
Next: Projects for Meshes Up: HMesh2d Previous: Display Methods on HMesh2d

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.