naginterfaces.library.mesh.dim2_gen_boundary¶
- naginterfaces.library.mesh.dim2_gen_boundary(coorch, lined, crus, rate, nlcomp, lcomp, nvmax, nedmx, itrace, fbnd=None, data=None, io_manager=None)[source]¶
dim2_gen_boundary
generates a boundary mesh on a closed connected subdomain of .For full information please refer to the NAG Library document for d06ba
https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/d06/d06baf.html
- Parameters
- coorchfloat, array-like, shape
contains the coordinate of the th characteristic point, for ; while contains the corresponding coordinate.
- linedint, array-like, shape
The description of the lines that define the boundary domain. The line , for , is defined as follows:
The number of points on the line, including two end points.
The first end point of the line. If , the coordinates of the first end point are those stored in .
The second end point of the line. If , the coordinates of the second end point are those stored in .
This defines the type of line segment connecting the end points. Additional information is conveyed by the numerical value of as follows:
, the line is described in with as the index. In this case, the line must be described in the trigonometric (anticlockwise) direction;
, the line is a straight line;
if , say (), then the line is a polygonal arc joining the end points and interior points specified in . In this case the line contains the points whose coordinates are stored in , where , , and .
- crusfloat, array-like, shape
The coordinates of the intermediate points for polygonal arc lines. For a line defined as a polygonal arc (i.e., ), if , , for , must contain the coordinate of the consecutive intermediate points for this line. Similarly , for , must contain the corresponding coordinate.
- ratefloat, array-like, shape
is the geometric progression ratio between the points to be generated on the line , for and .
If , is not referenced.
- nlcompint, array-like, shape
is the number of line segments in component of the contour. The line of component runs in the direction to if , and in the opposite direction otherwise; for .
- lcompint, array-like, shape
must contain the list of line numbers for the each component of the boundary. Specifically, the line numbers for the th component of the boundary, for , must be in elements to of , where and .
- nvmaxint
The maximum number of the boundary mesh vertices to be generated.
- nedmxint
The maximum number of boundary edges in the boundary mesh to be generated.
- itraceint
The level of trace information required from
dim2_gen_boundary
.or
No output is generated.
Output from the boundary mesh generator is printed. This output contains the input information of each line and each connected component of the boundary.
An analysis of the output boundary mesh is printed on the file object associated with the advisory I/O unit (see
FileObjManager
). This analysis includes the orientation (clockwise or anticlockwise) of each connected component of the boundary. This information could be of interest to you, especially if an interior meshing is carried out using the output of this function, calling eitherdim2_gen_inc()
,dim2_gen_delaunay()
ordim2_gen_front()
.The output is similar to that produced when , but the coordinates of the generated vertices on the boundary are also output.
You are advised to set , unless you are experienced with finite element mesh generation.
- fbndNone or callable retval = fbnd(i, x, y, data=None), optional
Note: if this argument is None then a NAG-supplied facility will be used.
must be supplied to calculate the value of the function which describes the curve on segments of the boundary for which .
- Parameters
- iint
, the reference index of the line (portion of the contour) described.
- xfloat
The values of and at which is to be evaluated.
- yfloat
The values of and at which is to be evaluated.
- dataarbitrary, optional, modifiable in place
User-communication data for callback functions.
- Returns
- retvalfloat
The value of at the specified point.
- dataarbitrary, optional
User-communication data for callback functions.
- io_managerFileObjManager, optional
Manager for I/O in this routine.
- Returns
- nvbint
The total number of boundary mesh vertices generated.
- coorfloat, ndarray, shape
will contain the coordinate of the th boundary mesh vertex generated, for ; while will contain the corresponding coordinate.
- nedgeint
The total number of boundary edges in the boundary mesh.
- edgeint, ndarray, shape
The specification of the boundary edges. and will contain the vertex numbers of the two end points of the th boundary edge. is a reference number for the th boundary edge and
, where and are such that the th edges is part of the th line of the boundary and ;
, where and are such that the th edges is part of the th line of the boundary and .
- Raises
- NagValueError
- (errno )
On entry, the indices of the extremities of line are both equal to .
- (errno )
On entry, the sum of absolute values of all numbers of line segments is different from . The sum of all the elements of . .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, the geometric progression ratio between the points to be generated on line is . It should be greater than unless the line segment is defined by user-supplied points.
- (errno )
On entry, the index of the second end point of line is . It should be greater than or equal to and less than or equal to .
- (errno )
On entry, the index of the first end point of line is . It should be greater than or equal to and less than or equal to .
- (errno )
On entry, the number of points on line is . It should be greater than or equal to .
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, the line list for the separate connected component of the boundary is badly set: and . It should be less than or equal to and greater than or equal to .
- (errno )
On entry, end point , with index , does not lie on the curve representing line with index : , , , .
- (errno )
On entry, end point , with index , does not lie on the curve representing line with index : , , , .
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, there is a correlation problem between the user-supplied coordinates and the specification of the polygonal arc representing line with the index in .
- (errno )
On entry, the absolute number of line segments in the th component of the contour should be less than or equal to and greater than . , and .
- (errno )
An error has occurred during the generation of the boundary mesh. It appears that is not large enough: .
- (errno )
An error has occurred during the generation of the boundary mesh. It appears that is not large enough: .
- (errno )
An error has occurred during the generation of the boundary mesh. Check the definition of each line (the argument ) and each connected component of the boundary (the arguments , and , as well as the coordinates of the characteristic points. Setting may provide more details.
- Notes
Given a closed connected subdomain of , whose boundary is divided by characteristic points into distinct line segments,
dim2_gen_boundary
generates a boundary mesh on . Each line segment may be a straight line, a curve defined by the equation , or a polygonal curve defined by a set of given boundary mesh points.This function is primarily designed for use with either
dim2_gen_inc()
(a simple incremental method) ordim2_gen_delaunay()
(Delaunay–Voronoi method) ordim2_gen_front()
(Advancing Front method) to triangulate the interior of the domain . For more details about the boundary and interior mesh generation, 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