naginterfaces.library.mesh.dim2_renumber¶
- naginterfaces.library.mesh.dim2_renumber(nnzmax, coor, edge, conn, itrace, io_manager=None)[source]¶
dim2_renumber
renumbers the vertices of a given mesh using a Gibbs method, in order the reduce the bandwidth of Finite Element matrices associated with that mesh.For full information please refer to the NAG Library document for d06cc
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/d06/d06ccf.html
- Parameters
- nnzmaxint
The maximum number of nonzero entries in the matrix based on the input mesh. It is the dimension of the arrays and as declared in the function from which
dim2_renumber
is called.- 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 .
- itraceint
The level of trace information required from
dim2_renumber
.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.
- io_managerFileObjManager, optional
Manager for I/O in this routine.
- Returns
- nnzint
The number of nonzero entries in the matrix based on the input mesh.
- coorfloat, ndarray, shape
will contain the coordinate of the th renumbered mesh vertex, for ; while will contain the corresponding coordinate.
- edgeint, ndarray, shape
The renumbered specification of the boundary or interface edges.
- connint, ndarray, shape
The renumbered connectivity of the mesh between triangles and vertices.
- irowint, ndarray, shape
The first elements contain the row and column indices of the nonzero elements supplied in the finite element matrix .
- icolint, ndarray, shape
The first elements contain the row and column indices of the nonzero elements supplied in the finite element matrix .
- 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, 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 )
An error has occurred during the computation of the compact sparsity of the finite element matrix. Check the Triangle/Vertices connectivity.
- (errno )
A serious error has occurred in an internal call to the renumbering function. Check the input mesh especially the connectivity. Seek expert help.
- Notes
dim2_renumber
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).
dim2_renumber
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).
- References
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