# naginterfaces.library.mesh.dim2_​gen_​inc¶

naginterfaces.library.mesh.dim2_gen_inc(edge, coor, bspace, smooth, itrace, coef=0.75, power=0.25, io_manager=None)[source]

dim2_gen_inc generates a triangular mesh of a closed polygonal region in , given a mesh of its boundary. It uses a simple incremental method.

For full information please refer to the NAG Library document for d06aa

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/d06/d06aaf.html

Parameters
edgeint, array-like, shape

The specification of the boundary edges. and contain the vertex numbers of the two end points of the th boundary edge. is a user-supplied tag for the th boundary edge and is not used by dim2_gen_inc.

coorfloat, array-like, shape

contains the coordinate of the th input boundary mesh vertex; while contains the corresponding coordinate, for .

bspacefloat, array-like, shape

The desired mesh spacing (triangle diameter, which is the length of the longer edge of the triangle) near the boundary vertices.

smoothbool

Indicates whether or not mesh smoothing should be performed.

If , the smoothing is performed; otherwise no smoothing is performed.

itraceint

The level of trace information required from dim2_gen_inc.

No output is generated.

Output from the meshing solver is printed. This output contains details of the vertices and triangles generated by the process.

You are advised to set , unless you are experienced with finite element mesh generation.

coeffloat, optional

The coefficient in the stopping criteria for the generation of interior vertices. This argument controls the triangle density and the number of triangles generated is in . The mesh will be finer if is greater than and is a good value.

powerfloat, optional

Controls the rate of change of the mesh size during the generation of interior vertices. The smaller the value of , the faster the decrease in element size away from the boundary.

io_managerFileObjManager, optional

Manager for I/O in this routine.

Returns
nvint

The total number of vertices in the output mesh (including both boundary and interior vertices). If , no interior vertices will be generated and .

neltint

The number of triangular elements in the mesh.

coorfloat, ndarray, shape

will contain the coordinate of the th generated interior mesh vertex; while will contain the corresponding coordinate, for . The remaining elements are unchanged.

connint, ndarray, shape

The connectivity of the mesh between triangles and vertices. For each triangle , gives the indices of its three vertices (in anticlockwise order), for , for .

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , , and .

Constraint: and .

(errno )

On entry, the end points of the edge have the same index : and .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

An error has occurred during the generation of the interior mesh. Check the definition of the boundary (arguments and ) as well as the orientation of the boundary (especially in the case of a multiple connected component boundary). Setting may provide more details.

Notes

dim2_gen_inc generates the set of interior vertices using a process based on a simple incremental method. A smoothing of the mesh is optionally available. For more details about the triangulation method, consult the D06 Introduction as well as George and Borouchaki (1998).

This function is derived from material in the MODULEF package from INRIA (Institut National de Recherche en Informatique et Automatique).

References

George, P L and Borouchaki, H, 1998, Delaunay Triangulation and Meshing: Application to Finite Elements, Editions HERMES, Paris