next up previous contents
Next: Boundary Display Methods on Up: HMesh3d Previous: Memory Methods on HMesh3d

Display Methods on HMesh3d

 

All display-methods on HMeshes offer the possibility of adaptive visualization with regard to various thresholds and error estimates which have to be provided by the user in a prescribed way or can be calculated by default-routines. See the example-HMesh-interfaces for further details. Without any error-estimates the HMesh is always drawn up to the level given by its level_of_interest entry, whereas with error-estimates some elements may be extracted on a higher hierarchy-level without losing essential detail-information but gaining a speedup because of this partial inspection of the mesh.

   

(HMESH3D *)GRAPE(hmesh, "display")()

HMESH3D *hmesh

The HMesh3d instance hmesh is rendered on the standard device in a default manner. All the boundary faces of the elements are displayed as flat shaded patches in patch mode and in grid mode the edges of these faces are drawn. If boundary-estimators are provided, these are used for adaptive visualization.

   

 figure2252

(HMESH3D *)GRAPE(hmesh, "clip")(f, var, draw_clip, scal)
GRAPE(mesh, "clip-ball-disp")()
GRAPE(mesh, "clip-plane-disp")()
GRAPE(mesh, "clip-deg-fine-disp")()
GRAPE(mesh, "clip-isoline-disp")()
GRAPE(mesh, "clip-vect-disp")()

HMESH3D *hmesh
MESH3D *mesh
double (*f)(VEC3 x,void *var)
void *var
int (*draw_clip)(CLIPM3D_PAR)
void *scal

These methods are designed to support general clipping facilities with varying hyper surface and local rendering function. The most basic method with the greatest flexibility is the method "clip". The others are special predefined interactive methods derived from the latter one. The domain of the mesh is split by the implicitly given clipping function f into a visible (f > 0) and an invisible (f < 0) part. The zero level of this clipping function defines the intersection surface. The method "clip" on HMesh3d supports hierarchical search algorithms for extracting the intersection surface and uses adaptive resolution strategies, if the error estimator of the underlying function data is supplied.

The variable var in the parameter list of the method call and of this function f must be of the same type. The parameter *var allows an interactive varying of the clipping function. The implicit functions describing a plane or a ball are predefined:

typedef struct MPLANE_PARM = { double n_x, n_y, n_z, distance;};

double mplane(VEC3 x, MPLANE_PARM *var)

typedef struct MBALL_PARM = { double cx,cy,cz,radius;};

double mball(VEC3 x, MBALL_PARM *var)

The pointer draw_clip points to a function which renders the surface of intersection on a single element. This function works on the data corresponding to one single clipped element. A NIL pointer causes the standard visualization of the surfaces including normal shading.

There are some predefined local rendering functions:

 figure2276

The interactive methods "clip-isoline-disp", "clip-deg-fine-disp", "clip-vect-disp" use these routines while calling the standard clipping method "clip". Figure 20 shows the interactive layer of the "clip-isoline-disp" method. With the rulers "normal x/y/z" the normal of a clipping plane is chosen, whereas the "distance" ruler adjusts the plane to the desired position. The ruler "graph height" gives a scaled height to the graph of the displayed isolines. Finally the "clolorbar" interface can be used to adjust the colours of the isolines to the given function values.

To construct a new private rendering method working on the surface of intersection, the user can add new clipping methods by using other and different surfaces or by adding new local rendering functions. Therefore we now explain the parameter structure for the local rendering function draw_clip. The general 'clip' method calls this function in the following way:

draw_clip((CLIPM3D_PAR *clip3d_par)

The structure clip3d_par with the following typedef is filled by the general "clip" method.

typedef struct clipm3d_par 
{ ELEMENT3D *e;        
  int n;     
  VEC3 *v;    
  double *coord;    
  double (*f)();  
  void *var;       
  void *scal; 
  int flag ;         
  int dimension_of_value;
} CLIPM3D_PAR;

This structure describes the intersection of the hyper surface with a single element. The filled structure is delivered by the actual method "clip". The variable e points to the intersected element and n gives the number of intersection points of one connected intersection patch. The array v[tex2html_wrap_inline3728][tex2html_wrap_inline3730] contains the global Euclidean coordinates of these points. They are located on edges of the element's boundary at a linearly interpolated intersection position. In all the listed interactive methods a plane is used as the clipping function. coord is a pointer to a list of the local coordinates of the intersection points , which are stored in global coordinates in v. In this 1D array the i'th coordinate vector starts at position (coord+i*d) where d is the dimension of coordinate space on the current element. The pointer var points to the parameters of the function describing the intersecting hyper surface. At the memory address scal the function draw_clip finds a user defined structure filled with parameters for the specific rendering style. These parameters can be influenced interactively, if the user supports this in an appropriate interactive method (see also the GRAPE reference manual).

   

 figure2294

(HMESH3D *)GRAPE(hmesh, "level")(func, lev, mode)
GRAPE(mesh, "level-disp")()

HMESH3D *hmesh
MESH3D *mesh
void (*func)(ELEMENT3D *el, int, double *coord, double *val, void *function_data)
double lev
int mode

The slices of those elements where the one-dimensional finite element function func has the level lev are calculated and displayed. The parameters of func are equal to those used for a one dimensional FEM function on a HMesh3d instance: f(HELEMENT3D *el, double *coord, double *val, void *function_data). If func is NULL and hmesh includes a function then this finite element function is taken into account. If its dimension of value is greater than 1 the absolute value of the value vector defines the function under consideration. The resulting 2D level surface consists of a polygonal approximation. If "mode = 1" or "mode = -1" the super or sub volumes of the function on the volume geometry are shown.

 figure2310

The method "level-disp" calls the method "level" with the standard finite element function and inserts a ruler (cf. Figure 22) into the options menu to adjust the value "lev" interactively. The method "level" on HMesh3d supports hierarchical and adaptive search algorithms, if the error estimators of the underlying function data is supplied. Furthermore an interactive layer with the following buttons is added:

 figure2324

   

(HMESH3D *)GRAPE(hmesh, "post-processing-send")()

HMESH3D *hmesh

The method "post-processing-send" inserts a post processing layer into the options menu, which enables the user to activate one or more cutting planes, which cut off certain areas of the isosurface (cf. Figure 23). In detail there is the following functionality:

GRAPE(hmesh,"shrink-disp")()

HMESH3D* hmesh

This method draws all elements of the mesh shrinked by a factor which can be changed by the corresponding ruler. The elements are drawn as a grid or as patches depending on the grid-patch mode. The method uses the threshold and get_element_estimate of the meshs f_data to determine whether it displays elements on a coarser level.

(HMESH3D*) GRAPE(hmesh,"inspect-disp")()

HMESH3D* hmesh

The "inspect-disp" method works similar to its twodimensional pendant. It displays the complete mesh with shrinked elements (as grid or as patches) and a grid of the boundary-faces of the mesh using blue lines. It is possible to traverse the mesh hierarchically via the buttons of the group select element to inspect.

figure2355

Inspect features two different traversal modes, which can be selected via the use function threshold button: When the checkbox is turned off, the user can traverse the whole hierarchical mesh and the grid is displayed on the level of the current element. When turned on, the threshold of f_data and the current level_of_interest select the subtree which can be traversed and is displayed. The boundary error estimator is used to draw the blue boundary grid.

The current element is always highlighted in red. Additional debugging-information can be shown in the graphic window or in the shell: Boundary faces can be marked with orange color and global vertex indices can be shown in the graphics window. It is also possible to print some information about the current element and the function on it to stderr.

figure2364


next up previous contents
Next: Boundary Display Methods on Up: HMesh3d Previous: Memory Methods on HMesh3d

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.