251 bool mark_refedges,
int mark_triangle);
const tri2dref * pctri2dref
Pointer to constant tri2dref object.
Definition: tri2d.h:33
ptri2d new_unitcircle_tri2d()
Create a mesh containing four triangles representing the unit square, .
void del_tri2dbuilder(ptri2dbuilder tb)
Delete a tri2dbuilder object.
ptri2dbuilder new_tri2dbuilder(uint vertices)
Create a new tri2dbuilder object.
void fixnormals_tri2d(ptri2d t2)
Ensure that the vertices of boundary edges are in counter-clockwise order as seen from outside of the...
uint * et
Type of father for an edge: 1 means edge, 2 means triangle.
Definition: tri2d.h:212
ptri2d new_ushape_tri2d()
Create a mesh containing twentyfour triangles representing a U-shaped domain.
real(* getx_tri2dbuilder(ptri2dbuilder tb))[2]
Obtain array of vertex coordinates in tri2dbuilder object.
uint * eb
Boundary flags for edges.
Definition: tri2d.h:79
ptri2d refine_tri2d(pctri2d t2, ptri2dref *t2r)
Regular refinement of a triangular mesh.
ptri2d read_tri2d(const char *name)
Read a triangular mesh from a file.
ptri2d buildmesh_tri2dbuilder(ptri2dbuilder tb)
Create a tri2d mesh from the geometrical and topological information stored in a tri2dbuilder object...
uint vertices
Number of vertices.
Definition: tri2d.h:58
uint(* t)[3]
Edge of a triangle.
Definition: tri2d.h:73
unsigned uint
Unsigned integer type.
Definition: settings.h:70
uint * tf
Father index of a triangle.
Definition: tri2d.h:215
Representation of a two-dimensional triangular mesh.
Definition: tri2d.h:56
Representation of the refinement relationship between two meshes.
Definition: tri2d.h:203
void write_tri2d(pctri2d t2, const char *name)
Write a triangular mesh to a file.
void del_tri2d(ptri2d t2)
Delete a tri2d object.
tri2dref * ptri2dref
Pointer to tri2dref object.
Definition: tri2d.h:30
void draw_cairo_tri2d(pctri2d t2, const char *filename, bool mark_refedges, int mark_triangle)
Draw a tri2d mesh.
uint * xb
Boundary flags for vertices.
Definition: tri2d.h:76
tri2dbuilder * ptri2dbuilder
Definition: tri2d.h:39
uint edges
Number of edges.
Definition: tri2d.h:61
tri2d * ptri2d
Pointer to tri2d object.
Definition: tri2d.h:21
ptri2d new_lshape_tri2d()
Create a mesh containing six triangles representing a L-shaped domain with vertices ...
void addtriangle_tri2dbuilder(ptri2dbuilder tb, uint v0, uint v1, uint v2)
Add a triangle to a tri2dbuilder object.
uint triangles
Number of triangles.
Definition: tri2d.h:64
ptri2d new_tri2d(uint vertices, uint edges, uint triangles)
Create a partially initialized tri2d mesh.
ptri2d new_unitsquare_tri2d()
Create a mesh containing two triangles representing the unit square, .
uint * ef
Father index of an edge.
Definition: tri2d.h:210
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
uint * xf
Father index of a vertex.
Definition: tri2d.h:205
void check_tri2d(pctri2d t2)
Perform various consistency checks.
struct _tri2dbuilder tri2dbuilder
Tool for constructing tri2d meshes.
Definition: tri2d.h:36
uint * xt
Type of father for a vertex: 0 means vertex, 1 means edge.
Definition: tri2d.h:207
real(* x)[2]
coordinates of vertices
Definition: tri2d.h:67
uint(* e)[2]
Start and end points of edges.
Definition: tri2d.h:70
void getvertices_tri2d(pctri2d t2, uint tn, uint v[])
Find the vertices of a triangle.
void smooth_unitcircle_tri2d(ptri2d t2)
Smooth a tri2d unitcircle.
void del_tri2dref(ptri2dref t2r)
Delete a tri2dref object.
const tri2d * pctri2d
Pointer to constant tri2d object.
Definition: tri2d.h:24