naginterfaces.library.mesh.dim2_transform_affine¶
- naginterfaces.library.mesh.dim2_transform_affine(mode, itype, trans, coori, edgei, conni, itrace, io_manager=None)[source]¶
dim2_transform_affine
is a utility which performs an affine transformation of a given mesh.For full information please refer to the NAG Library document for d06da
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/d06/d06daf.html
- Parameters
- modeint
If , the arguments , and are overwritten on exit by the output values described in , and respectively. In this case , and are not referenced, and you can save storage space.
If , no such aliasing is assumed.
- itypeint, array-like, shape
, for , indicates the type of each transformation as follows:
Identity transformation.
Translation.
Symmetric transformation with respect to a user-supplied line.
Rotation.
Scaling.
User-supplied analytic transformation.
Note that the transformations are applied in the order described in .
- transfloat, array-like, shape
The arguments for each transformation. For , to contain the arguments of the th transformation.
If , elements to are not referenced.
If , the translation vector is , where and , while elements to are not referenced.
If , the user-supplied line is the curve {; such that }, where , and , while elements to are not referenced.
If , the centre of the rotation is where and , is its angle in degrees, while elements to are not referenced.
If , is the scaling coefficient in the -direction, is the scaling coefficient in the -direction, and are the scaling centre coordinates, with and ; while elements to are not referenced.
If , the user-supplied analytic affine transformation is such that and where, and with .
- coorifloat, array-like, shape
contains the coordinate of the th vertex of the input mesh, for ; while contains the corresponding coordinate.
- edgeiint, 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 edge.
- conniint, array-like, shape
The connectivity of the input 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_transform_affine
.No output is generated.
Details of each transformation, the matrix and the vector of the final transformation, which is the composition of all the transformations, are printed.
- io_managerFileObjManager, optional
Manager for I/O in this routine.
- Returns
- coorifloat, ndarray, shape
See Further Comments.
- edgeiint, ndarray, shape
If , holds the output values described in .
- conniint, ndarray, shape
If , holds the output values described in .
- cooroNone or float, ndarray, shape
will contain the coordinate of the th vertex of the transformed mesh, for ; while will contain the corresponding coordinate.
- edgeoNone or int, ndarray, shape
The specification of the boundary or interface edges of the transformed mesh. If the number of symmetric transformations is even or zero then , for , for ; otherwise , and , for .
- connoNone or int, ndarray, shape
The connectivity of the transformed mesh between triangles and vertices. If the number of symmetric transformations is even or zero then , for , for ; otherwise , and , for .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: , , , , or .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, , , and .
Constraint: and .
- (errno )
On entry, , , and .
Constraint: and .
- (errno )
On entry, .
Constraint: .
- (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 )
A serious error has occurred in an internal call to an auxiliary function. Check the input mesh especially the connectivities and the details of each transformations.
- Notes
dim2_transform_affine
generates a mesh (coordinates, triangle/vertex connectivities and edge/vertex connectivities) resulting from an affine transformation of a given mesh. This transformation is of the form , where, and are in , and
is a real matrix.
Such a transformation includes a translation, a rotation, a scale reduction or increase, a symmetric transformation with respect to a user-supplied line, a user-supplied analytic transformation, or a composition of several transformations.
This function is partly derived from material in the MODULEF package from INRIA (Institut National de Recherche en Informatique et Automatique).