H2Lib  3.0
Data Structures | Typedefs | Functions
tri2d.h File Reference
#include "settings.h"

Go to the source code of this file.

Data Structures

struct  _tri2d
 Representation of a two-dimensional triangular mesh. More...
 
struct  _tri2dref
 Representation of the refinement relationship between two meshes. More...
 

Typedefs

typedef struct _tri2d tri2d
 Two-dimensional triangulat mesh.
 
typedef tri2dptri2d
 Pointer to tri2d object.
 
typedef const tri2dpctri2d
 Pointer to constant tri2d object.
 
typedef struct _tri2dref tri2dref
 
typedef tri2drefptri2dref
 Pointer to tri2dref object.
 
typedef const tri2drefpctri2dref
 Pointer to constant tri2dref object.
 
typedef struct _tri2dbuilder tri2dbuilder
 Tool for constructing tri2d meshes.
 
typedef tri2dbuilderptri2dbuilder
 

Functions

ptri2d new_tri2d (uint vertices, uint edges, uint triangles)
 Create a partially initialized tri2d mesh. More...
 
void del_tri2d (ptri2d t2)
 Delete a tri2d object. More...
 
ptri2d new_unitsquare_tri2d ()
 Create a mesh containing two triangles representing the unit square, $[-1,1] \times [-1,1] $. More...
 
ptri2d new_unitcircle_tri2d ()
 Create a mesh containing four triangles representing the unit square, $[-1,1] \times [-1,1] $. More...
 
ptri2d new_lshape_tri2d ()
 Create a mesh containing six triangles representing a L-shaped domain with vertices $(-1,-1), (0,-1), (1,-1), (-1,0), (0,0), (1,0), (-1,1) and (0,1)$. More...
 
ptri2d new_ushape_tri2d ()
 Create a mesh containing twentyfour triangles representing a U-shaped domain. More...
 
void write_tri2d (pctri2d t2, const char *name)
 Write a triangular mesh to a file. More...
 
ptri2d read_tri2d (const char *name)
 Read a triangular mesh from a file. More...
 
void getvertices_tri2d (pctri2d t2, uint tn, uint v[])
 Find the vertices of a triangle. More...
 
void fixnormals_tri2d (ptri2d t2)
 Ensure that the vertices of boundary edges are in counter-clockwise order as seen from outside of the mesh. More...
 
void check_tri2d (pctri2d t2)
 Perform various consistency checks. More...
 
ptri2d refine_tri2d (pctri2d t2, ptri2dref *t2r)
 Regular refinement of a triangular mesh. More...
 
void del_tri2dref (ptri2dref t2r)
 Delete a tri2dref object. More...
 
void draw_cairo_tri2d (pctri2d t2, const char *filename, bool mark_refedges, int mark_triangle)
 Draw a tri2d mesh. More...
 
void smooth_unitcircle_tri2d (ptri2d t2)
 Smooth a tri2d unitcircle. More...
 
ptri2dbuilder new_tri2dbuilder (uint vertices)
 Create a new tri2dbuilder object. More...
 
void del_tri2dbuilder (ptri2dbuilder tb)
 Delete a tri2dbuilder object. More...
 
real(* getx_tri2dbuilder (ptri2dbuilder tb))[2]
 Obtain array of vertex coordinates in tri2dbuilder object. More...
 
void addtriangle_tri2dbuilder (ptri2dbuilder tb, uint v0, uint v1, uint v2)
 Add a triangle to a tri2dbuilder object. More...
 
ptri2d buildmesh_tri2dbuilder (ptri2dbuilder tb)
 Create a tri2d mesh from the geometrical and topological information stored in a tri2dbuilder object. More...
 

Detailed Description

Author
Dirk Boysen