H2Lib
3.0

Representation of a parametrized surface. More...
#include <macrosurface3d.h>
Data Fields  
uint  vertices 
Number of vertices.  
uint  edges 
Number of edges.  
uint  triangles 
Number of triangles.  
real(*  x )[3] 
Vertex coordinates.  
uint(*  e )[2] 
Edge vertices.  
uint(*  t )[3] 
Triangle vertices. More...  
uint(*  s )[3] 
Triangle edges. More...  
void(*  phi )(uint i, real xr1, real xr2, void *phidata, real xt[3]) 
Parametrization callback. More...  
void *  phidata 
Pointer that will be passed to the phi callback function.  
Representation of a parametrized surface.
This class is intended as a simple mesh generator for boundary element applications. A surface is described by a (hopefully small) set of triangles associated with parametrizations.
The topology is described by vertices, edges, and triangles. The parametrization callback phi
uses these parameters to describe the geometry.
The function build_from_macrosurface3d_surface3d can then be used to create a standard surface3d mesh.
Parametrization callback.
Given a triangle index i
and coordinates xr1
and xr2
in the reference triangle , this function returns the point in the parametrized triangle in the array xt
.
Usually, the callback function will use the geometric information in x
, e
, t
, and s
to accomplish its task. Additional information can be provided via the pointer phidata
.
It is up to the user to ensure that the vertices and edges of a refined triangulation produced by evaluating in the vertices and along the edges of the macro triangulation in adjacent triangles match.
uint(* s)[3] 
Triangle edges.
Edge s[i][j]
lies opposite of vertex t[i][j]
.
uint(* t)[3] 
Triangle vertices.
The vertices are ordered counterclockwise as seen from outside of the geometry, i.e., taking the cross product of x[t[i][1]]x[t[i][0]]
and x[t[i][2]]x[t[i][0]]
is supposed to yield an outer normal vector of the (unparametrized) triangle.