d06ccc uses a Gibbs method to renumber the vertices of a given mesh in order to reduce the bandwidth of the associated finite element matrix
. This matrix has elements
such that:
This function reduces the bandwidth
, which is the smallest integer such that
whenever
(see
Gibbs et al. (1976) for details about that method).
d06ccc also returns the sparsity structure of the matrix associated with the renumbered mesh.
This function is derived from material in the MODULEF package from INRIA (Institut National de Recherche en Informatique et Automatique).
Gibbs N E, Poole W G Jr and Stockmeyer P K (1976) An algorithm for reducing the bandwidth and profile of a sparse matrix SIAM J. Numer. Anal. 13 236–250
-
1:
– Integer
Input
-
On entry: the total number of vertices in the input mesh.
Constraint:
.
-
2:
– Integer
Input
-
On entry: the number of triangles in the input mesh.
Constraint:
.
-
3:
– Integer
Input
-
On entry: the number of boundary edges in the input mesh.
Constraint:
.
-
4:
– Integer
Input
-
On entry: the maximum number of nonzero entries in the matrix based on the input mesh. It is the dimension of the arrays
irow and
icol as declared in the function from which
d06ccc is called.
Constraint:
.
-
5:
– Integer *
Output
-
On exit: the number of nonzero entries in the matrix based on the input mesh.
-
6:
– double
Input/Output
-
Note: the th element of the matrix is stored in .
On entry: contains the coordinate of the th input mesh vertex, for ; while contains the corresponding coordinate.
On exit: will contain the coordinate of the th renumbered mesh vertex, for ; while will contain the corresponding coordinate.
-
7:
– Integer
Input/Output
-
Note: the th element of the matrix is stored in .
On entry: 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. Note that the edge vertices are numbered from
to
nv.
Constraint:
and , for and .
On exit: the renumbered specification of the boundary or interface edges.
-
8:
– Integer
Input/Output
-
Note: the th element of the matrix is stored in .
On entry: the connectivity of the mesh between triangles and vertices. For each triangle
,
gives the indices of its three vertices (in anticlockwise order), for
and
. Note that the mesh vertices are numbered from
to
nv.
Constraint:
and and and , for and .
On exit: the renumbered connectivity of the mesh between triangles and vertices.
-
9:
– Integer
Output
-
10:
– Integer
Output
-
On exit: the first
nnz elements contain the row and column indices of the nonzero elements supplied in the finite element matrix
.
-
11:
– Integer
Input
-
On entry: the level of trace information required from
d06ccc.
- No output is generated.
- Information about the effect of the renumbering on the finite element matrix are output. This information includes the half bandwidth and the sparsity structure of this matrix before and after renumbering.
- The output is similar to that produced when but the sparsities (for each row of the matrix, indices of nonzero entries) of the matrix before and after renumbering are also output.
-
12:
– const char *
Input
-
On entry: the name of a file to which diagnostic output will be directed. If
outfile is
NULL the diagnostic output will be directed to standard output.
-
13:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_FAIL_SPARSITY
-
An error has occurred during the computation of the compact sparsity of the finite element matrix. Check the Triangle/Vertices connectivity.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
On entry, the end points of the edge have the same index : and .
On entry, vertices and of the triangle have the same index : and .
On entry, vertices and of the triangle have the same index : and .
On entry, vertices and of the triangle have the same index : and .
- NE_INT_3
-
On entry, , and .
Constraint: and .
- NE_INT_4
-
On entry, , , and .
Constraint: and , where denotes .
On entry, , , and .
Constraint: and , where denotes .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
A serious error has occurred in an internal call to the renumbering function. Check the input mesh especially the connectivity. Seek expert help.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
- NE_NOT_CLOSE_FILE
-
Cannot close file .
- NE_NOT_WRITE_FILE
-
Cannot open file for writing.
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
In this example, a geometry with two holes (two interior circles inside an exterior one) is considered. The geometry has been meshed using the simple incremental method (
d06aac) and it has
vertices and
triangles (see Figure 1 in
Section 10.3). The function
d06bac is used to renumber the vertices, and one can see the benefit in terms of the sparsity of the finite element matrix based on the renumbered mesh (see Figure 2 and 3 in
Section 10.3).