D06DBF joins together (restitches) two adjacent, or overlapping, meshes.
SUBROUTINE D06DBF ( |
EPS, NV1, NELT1, NEDGE1, COOR1, EDGE1, CONN1, REFT1, NV2, NELT2, NEDGE2, COOR2, EDGE2, CONN2, REFT2, NV3, NELT3, NEDGE3, COOR3, EDGE3, CONN3, REFT3, ITRACE, IWORK, LIWORK, IFAIL) |
INTEGER |
NV1, NELT1, NEDGE1, EDGE1(3,NEDGE1), CONN1(3,NELT1), REFT1(NELT1), NV2, NELT2, NEDGE2, EDGE2(3,NEDGE2), CONN2(3,NELT2), REFT2(NELT2), NV3, NELT3, NEDGE3, EDGE3(3,*), CONN3(3,*), REFT3(*), ITRACE, IWORK(LIWORK), LIWORK, IFAIL |
REAL (KIND=nag_wp) |
EPS, COOR1(2,NV1), COOR2(2,NV2), COOR3(2,*) |
|
D06DBF joins together two adjacent, or overlapping, meshes. If the two meshes are adjacent then vertices belonging to the part of the boundary forming the common interface should coincide. If the two meshes overlap then vertices and triangles in the overlapping zone should coincide too.
This routine is partly derived from material in the MODULEF package from INRIA (Institut National de Recherche en Informatique et Automatique).
None.
- 1: – REAL (KIND=nag_wp)Input
-
On entry: the relative precision of the restitching of the two input meshes (see
Section 9).
Suggested value:
.
Constraint:
.
- 2: – INTEGERInput
-
On entry: the total number of vertices in the first input mesh.
Constraint:
.
- 3: – INTEGERInput
-
On entry: the number of triangular elements in the first input mesh.
Constraint:
.
- 4: – INTEGERInput
-
On entry: the number of boundary edges in the first input mesh.
Constraint:
.
- 5: – REAL (KIND=nag_wp) arrayInput
-
On entry: contains the coordinate of the th vertex of the first input mesh, for ; while contains the corresponding coordinate.
- 6: – INTEGER arrayInput
-
On entry: the specification of the boundary edges of the first input mesh. 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.
Constraint:
and , for and .
- 7: – INTEGER arrayInput
-
On entry: the connectivity between triangles and vertices of the first input mesh. For each triangle
, gives the indices of its three vertices (in anticlockwise order), for and .
Constraints:
- ;
- ;
- and , for and .
- 8: – INTEGER arrayInput
-
On entry: contains the user-supplied tag of the th triangle from the first input mesh, for .
- 9: – INTEGERInput
-
On entry: the total number of vertices in the second input mesh.
Constraint:
.
- 10: – INTEGERInput
-
On entry: the number of triangular elements in the second input mesh.
Constraint:
.
- 11: – INTEGERInput
-
On entry: the number of boundary edges in the second input mesh.
Constraint:
.
- 12: – REAL (KIND=nag_wp) arrayInput
-
On entry: contains the coordinate of the th vertex of the second input mesh, for ; while contains the corresponding coordinate.
- 13: – INTEGER arrayInput
-
On entry: the specification of the boundary edges of the second input mesh. 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.
Constraint:
and , for and .
- 14: – INTEGER arrayInput
-
On entry: the connectivity between triangles and vertices of the second input mesh. For each triangle
, gives the indices of its three vertices (in anticlockwise order), for and .
Constraints:
- ;
- ;
- and , for and .
- 15: – INTEGER arrayInput
-
On entry: contains the user-supplied tag of the th triangle from the second input mesh, for .
- 16: – INTEGEROutput
-
On exit: the total number of vertices in the resulting mesh.
- 17: – INTEGEROutput
-
On exit: the number of triangular elements in the resulting mesh.
- 18: – INTEGEROutput
-
On exit: the number of boundary edges in the resulting mesh.
- 19: – REAL (KIND=nag_wp) arrayOutput
-
Note: the second dimension of the array
COOR3
must be at least
.
On exit: will contain the coordinate of the th vertex of the resulting mesh, for ; while will contain the corresponding coordinate.
- 20: – INTEGER arrayOutput
-
Note: the second dimension of the array
EDGE3
must be at least
. This may be reduced to
once that value is known.
On exit: the specification of the boundary edges of the resulting mesh.
will contain the vertex number of the
th end point (
) of the
th boundary or interface edge.
If the two meshes overlap, will contain the same tag as the corresponding edge belonging to the first and/or the second input mesh.
If the two meshes are adjacent,
(i) |
if the th edge is part of the partition interface, then will contain the value where and are the tags for the same edge of the first and the second mesh respectively; |
(ii) |
otherwise, will contain the same tag as the corresponding edge belonging to the first and/or the second input mesh. |
- 21: – INTEGER arrayOutput
-
Note: the second dimension of the array
CONN3
must be at least
. This may be reduced to
once that value is known.
On exit: the connectivity between triangles and vertices of the resulting mesh.
will give the indices of its three vertices (in anticlockwise order), for and .
- 22: – INTEGER arrayOutput
-
Note: the dimension of the array
REFT3
must be at least
. This may be reduced to
once that value is known.
On exit: if the two meshes form a partition,
will contain the same tag as the corresponding triangle belonging to the first or the second input mesh, for . If the two meshes overlap, then
will contain the value where and are the user-supplied tags for the same triangle of the first and the second mesh respectively, for .
- 23: – INTEGERInput
-
On entry: the level of trace information required from D06DBF.
- No output is generated.
- Details about the common vertices, edges and triangles to both meshes are printed on the current advisory message unit (see X04ABF).
- 24: – INTEGER arrayWorkspace
- 25: – INTEGERInput
-
On entry: the dimension of the array
IWORK as declared in the (sub)program from which D06DBF is called.
Constraint:
.
- 26: – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction 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 parameter, 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).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Not applicable.
Not applicable.
D06DBF finds all the common vertices between the two input meshes using the relative precision of the restitching parameter
EPS. You are advised to vary the value of
EPS in the neighbourhood of
with
to get the optimal value for the meshes under consideration.
For this routine two examples are presented. There is a single example program for D06DBF, with a main program and the code to solve the two example problems given in Example 1 (EX1) and Example 2 (EX2).
This example involves the unit square
meshed uniformly, and then translated by a vector
(using
D06DAF). This translated mesh is then restitched with the original mesh. Two cases are considered:
(a) |
overlapping meshes (, ), |
(b) |
partitioned meshes (, ). |
The mesh on the unit square has
vertices,
triangles and its boundary has
edges.
In the partitioned case the resulting geometry is shown in Figure 1 in
Section 10.3 while the restitched mesh is shown in Figure 2 in
Section 10.3.
In the overlapping case the geometry and mesh are shown in Figure 3 and Figure 4 in
Section 10.3.
This example restitches three geometries by calling the routine D06DBF twice. The result is a mesh with three partitions. The first geometry is meshed by the Delaunay–Voronoi process (using
D06ABF), the second one meshed by an Advancing Front algorithm (using
D06ACF), while the third one is the result of a rotation (by
) of the second one (using
D06DAF). The resulting geometry is shown in Figure 5 in
Section 10.3 and restitched mesh in Figure 6 in
Section 10.3.