naginterfaces.library.mesh.dim2_​smooth_​bary

naginterfaces.library.mesh.dim2_smooth_bary(coor, edge, conn, numfix, itrace, nqint, io_manager=None)[source]

dim2_smooth_bary uses a barycentering technique to smooth a given mesh.

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

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

Parameters
coorfloat, array-like, shape

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

edgeint, array-like, shape

The specification of the boundary or interface 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 or interface edge: for an interior edge and has a nonzero tag otherwise.

connint, array-like, 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 .

numfixint, array-like, shape

The indices in of fixed interior vertices of the input mesh.

itraceint

The level of trace information required from dim2_smooth_bary.

No output is generated.

A histogram of the triangular element qualities is printed on the file object associated with the advisory I/O unit (see FileObjManager) before and after smoothing. This histogram gives the lowest and the highest triangle quality as well as the number of elements lying in each of the equal intervals between the extremes.

The output is similar to that produced when but the connectivity between vertices and triangles (for each vertex, the list of triangles in which it appears) is given.

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

nqintint

The number of intervals between the extreme quality values for the input and the smoothed mesh.

If , is not referenced.

io_managerFileObjManager, optional

Manager for I/O in this routine.

Returns
coorfloat, ndarray, shape

will contain the coordinate of the th smoothed mesh vertex, for ; while will contain the corresponding coordinate. Note that the coordinates of boundary and interface edge vertices, as well as those specified by you (see the description of ), are unchanged by the process.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , , and .

Constraint: and .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, , , and .

Constraint: and .

(errno )

On entry, , and .

Constraint: and .

(errno )

On entry, and .

Constraint: .

(errno )

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

(errno )

On entry, vertices and of the triangle have the same index : and .

(errno )

On entry, vertices and of the triangle have the same index : and .

(errno )

On entry, vertices and of the triangle have the same index : and .

(errno )

A serious error has occurred in an internal call to an auxiliary function. Check the input mesh especially the connectivity. Seek expert help.

Notes

dim2_smooth_bary uses a barycentering approach to improve the smoothness of a given mesh. The measure of quality used for a triangle is

where is the diameter (length of the longest edge) of , is the radius of its inscribed circle and is a normalization factor chosen to give for an equilateral triangle. ranges from , for an equilateral triangle, to , for a totally flat triangle.

dim2_smooth_bary makes small perturbation to vertices (using a barycenter formula) in order to give a reasonably good value of for all neighbouring triangles. Some vertices may optionally be excluded from this process.

For more details about the smoothing method, especially with regard to differing quality, 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