*SMAT
*SMAT,
Matrix, Type,
Method, Val1,
Val2, Val3,
Val4 , Val5
Creates a sparse matrix.
Argument Descriptions
MatrixName used to identify the matrix. Must be specified.
TypeMatrix type:
- D --
Double precision real values (default).
- Z --
Complex double precision values.
MethodMethod used to create the matrix:
- ALLOC --
Allocate a new matrix.
- COPY --
Copy an existing matrix.
- IMPORT --
Import the matrix from a file.
Val1,Val2,Val3,Val4,Val5Additional input. The meaning of
Val1throughVal5will vary depending on the specifiedMethod. See details below.
The following Valx
fields are used with Method = ALLOC.
Val1Method used to create the matrix:
- DIAG --
Allocate a diagonal square matrix.
Val2is used;Val3,Val4, andVal5are ignored.Val2Matrix size.
- CSR --
Create a square sparse matrix based on Compressed Sparse Row (CSR) format description vectors. This format requires 3 input vectors specified as
Val2,Val3andVal4.Val2,Val3,Val4Names of required row_ptr, col_ind and val vectors. These vectors must be created using the *VEC command.
Note: row_ptr is a long integer vector (use of L instead of I as the scalar type in the *VEC call); col_ind is an integer vector. Val can be a real of complex values vector, according to the matrix type.
Val5Specifies whether the matrix is symmetric (TRUE) or unsymmetric (FALSE). Default = TRUE.
The following Valx fields are used with Method = COPY.
Val1Name of the matrix to copy (can be either a dense or a sparse matrix).
Val2Method used for copying the matrix:
- DIAG --
Copy only the diagonal of the matrix.
Val3andVal4are ignored.- TRANS --
Transpose the original matrix.
Val3andVal4are ignored.- EXTRACT --
Extract a submatrix based on row and column numbers specified by
Val3andVal4.
Val3Name of integer vector (*VEC) containing row numbers. If no vector is specified, defaults to all rows.
Val4Name of integer vector (*VEC) containing column numbers. If no vector is specified, defaults to all columns.
The following table describes the Valx fields used with Method = IMPORT.
Method = IMPORT | |||||||||||||
Val1 | Val2 | Val3 | Val4 | Val5 | Description | ||||||||
| FULL | File name [a] | Matrix type:
| (not used) | (not used) | Import a matrix from an existing FULL file. | ||||||||
| HBMAT | File name [a] | File format:
| (not used) | (not used) | Import a matrix from an existing Harwell-Boeing format file. | ||||||||
| MMF | File name [a] | (not used) | (not used) | (not used) | Import a matrix from an existing Matrix Market format file. | ||||||||
| DMIG | File name [a] | File Format:
| Delimeter character (only for FREE field format); defautl is ’,’ | Matrix name (default is the first matrix of the DMIG file) | Import a matrix from an existing NASTRAN DMIG file. | ||||||||
| MAT | File name [a] | (not used) | (not used) | (not used) | Restore from a previous *EXPORT
(FORMAT = MAT) command.. | ||||||||
[a] File name is case-sensitive with a 32-character maximum.
Notes
Use the *DMAT command to create a dense matrix.
For more information on the CSR format, see Creating a Sparse Matrix Using the CSR Format in the Ansys Parametric Design Language Guide.
For more information on the NOD2SOLV and USR2SOLV mapping vectors, see Degree of Freedom Ordering in the Ansys Parametric Design Language Guide.
For more information about .full file contents, see the HBMAT in the Command Reference.