Given a closed connected subdomain of , whose boundary is divided by characteristic points into distinct line segments, D06BAF 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 routine is primarily designed for use with either D06AAF (a simple incremental method) or D06ABF (Delaunay–Voronoi method) or D06ACF (Advancing Front method) to triangulate the interior of the domain . For more details about the boundary and interior mesh generation, consult the D06 Chapter Introduction as well as George and Borouchaki (1998).
This routine is derived from material in the MODULEF package from INRIA (Institut National de Recherche en Informatique et Automatique).
George P L and Borouchaki H (1998) Delaunay Triangulation and Meshing: Application to Finite Elements Editions HERMES, Paris
1: – INTEGERInput
On entry: , the number of lines that define the boundary of the closed connected subdomain (this equals the number of characteristic points which separate the entire boundary into lines).
2: – REAL (KIND=nag_wp) arrayInput
On entry: contains the coordinate of the th characteristic point, for ; while contains the corresponding coordinate.
3: – INTEGER arrayInput
On entry: 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 , then the coordinates of the first end point are those stored in .
The second end point of the line. If , then 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 FBND 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 CRUS. In this case the line contains the points whose coordinates are stored in
, for .
For each line described by FBND (lines with
, for ) the two end points ( and ) lie on the curve defined by index in FBND, i.e.,
, for .
For all lines described as polygonal arcs (lines with
, for ) the sets of intermediate points (i.e., for all such that ) are not overlapping. This can be expressed as:
for a such that , and .
4: – REAL (KIND=nag_wp) FUNCTION, supplied by the user.External Procedure
FBND must be supplied to calculate the value of the function which describes the curve on segments of the boundary for which .
If there are no boundaries for which FBND will never be referenced by D06BAF and FBND may be the dummy function D06BAD. (D06BAD is included in the NAG Library.)
On entry: , the reference index of the line (portion of the contour) described.
2: – REAL (KIND=nag_wp)Input
3: – REAL (KIND=nag_wp)Input
On entry: the values of and at which is to be evaluated.
4: – REAL (KIND=nag_wp) arrayUser Workspace
5: – INTEGER arrayUser Workspace
FBND is called with the arguments RUSER and IUSER as supplied to D06BAF. You should use the arrays RUSER and IUSER to supply information to FBND.
FBND must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which D06BAF is called. Arguments denoted as Input must not be changed by this procedure.
5: – REAL (KIND=nag_wp) arrayInput
On entry: the coordinates of the intermediate points for polygonal arc lines. For a line defined as a polygonal arc (i.e., ), if , then
, for , must contain the coordinate of the consecutive intermediate points for this line. Similarly
, for , must contain the corresponding coordinate.
6: – INTEGERInput
On entry: the second dimension of the array CRUS as declared in the (sub)program from which D06BAF is called.
7: – REAL (KIND=nag_wp) arrayInput
On entry: is the geometric progression ratio between the points to be generated on the line , for and .
If , is not referenced.
if , , for .
8: – INTEGERInput
On entry: , the number of separately connected components of the boundary.
9: – INTEGER arrayInput
On entry: 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 .
, for ;
10: – INTEGER arrayInput
On entry: LCOMP 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 LCOMP, where and
must hold a valid permutation of the integers .
11: – INTEGERInput
On entry: the maximum number of the boundary mesh vertices to be generated.
12: – INTEGERInput
On entry: the maximum number of boundary edges in the boundary mesh to be generated.
13: – INTEGEROutput
On exit: the total number of boundary mesh vertices generated.
14: – REAL (KIND=nag_wp) arrayOutput
On exit: will contain the coordinate of the th boundary mesh vertex generated, for ; while will contain the corresponding coordinate.
15: – INTEGEROutput
On exit: the total number of boundary edges in the boundary mesh.
16: – INTEGER arrayOutput
On exit: 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 .
17: – INTEGERInput
On entry: the level of trace information required from D06BAF.
No output is generated.
Output from the boundary mesh generator is printed on the current advisory message unit (see X04ABF). 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 current advisory message unit. 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 routine, calling either D06AAF, D06ABF or D06ACF.
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.
18: – REAL (KIND=nag_wp) arrayUser Workspace
19: – INTEGER arrayUser Workspace
RUSER and IUSER are not used by D06BAF, but are passed directly to FBND and should be used to pass information to this routine.
20: – REAL (KIND=nag_wp) arrayWorkspace
21: – INTEGERInput
On entry: the dimension of the array RWORK as declared in the (sub)program from which D06BAF is called.
22: – INTEGER arrayWorkspace
23: – INTEGERInput
On entry: the dimension of the array IWORK as declared in the (sub)program from which D06BAF is called.
24: – INTEGERInput/Output
On entry: IFAIL must be set to , . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value is recommended. Otherwise, if you are not familiar with this argument, the recommended value is . When the value is used it is essential to test the value of IFAIL on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6 Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
for some with ;
for some ;
or for some ;
or for some ;
for some ;
, or for a ;
LCOMP does not represent a valid permutation of the integers in ;
one of the end points for a line described by the user-supplied function (lines with
, for ) does not belong to the corresponding curve in FBND;
the intermediate points for the lines described as polygonal arcs (lines with , for ) are overlapping.
An error has occurred during the generation of the boundary mesh. It appears that NEDMX is not large enough, so you are advised to increase the value of NEDMX.
An error has occurred during the generation of the boundary mesh. It appears that NVMAX is not large enough, so you are advised to increase the value of NVMAX.
An error has occurred during the generation of the boundary mesh. Check the definition of each line (the argument LINED) and each connected component of the boundary (the arguments NLCOMP, and LCOMP, as well as the coordinates of the characteristic points. Setting may provide more details.
An unexpected error has been triggered by this routine. Please
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.
8 Parallelism and Performance
D06BAF is not threaded in any implementation.
9 Further Comments
The boundary mesh generation technique in this routine has a ‘tree’ structure. The boundary should be partitioned into geometrically simple segments (straight lines or curves) delimited by characteristic points. Then, the lines should be assembled into connected components of the boundary domain.
Using this strategy, the inputs to that routine can be built up, following the requirements stated in Section 5:
the characteristic and the user-supplied intermediate points:
The example below details the use of this strategy.
The NAG logo is taken as an example of a geometry with holes. The boundary has been partitioned in lines characteristic points; including for the exterior boundary and for the logo itself. All line geometry specifications have been considered, see the description of LINED, including lines defined as polygonal arc, defined by FBND and all the others are straight lines.