*SMAT

*SMAT, Matrix, Type, Method, Val1, Val2, Val3, Val4
Creates a sparse matrix.

Compatible Products: – | Pro | Premium | Enterprise | Ent PP | Ent Solver | DYNA

Argument Descriptions

Matrix

Name used to identify the matrix. Must be specified.

Type

Matrix type:

D -- 

Double precision real values (default).

Z -- 

Complex double precision values.

Method

Method used to create the matrix:

COPY -- 

Copy an existing matrix.

IMPORT -- 

Import the matrix from a file.

Val1, Val2, Val3, Val4

Additional input. The meaning of Val1 through Val4 will vary depending on the specified Method. See details below.

The following Valx fields are used with Method = COPY.

Val1

Name of the matrix to copy (can be either a dense or a sparse matrix).

Val2

Method used for copying the matrix:

DIAG -- 

Copy only the diagonal of the matrix. Val3 and Val4 are ignored.

TRANS --

Transpose the original matrix. Val3 and Val4 are ignored.

EXTRACT -- 

Extract a submatrix based on row and column numbers specified by Val3 and Val4.

Val3

Name of integer vector (*VEC) containing row numbers. If no vector is specified, defaults to all rows.

Val4

Name 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
Val1Val2Val3Description
FULLFile nameMatrix type:
STIFF - Stiffness matrix
MASS - Mass matrix
DAMP - Damping matrix
NOD2BCS - Mapping vector relating the full set of nodal DOFs to the subset that the solver uses
USR2BCS - Mapping vector relating the full set of external nodal DOFs to the subset that the solver uses
GMAT - Constraint equation matrix
K_RE - Real part of the stiffness matrix
K_IM - Imaginary part of the stiffness matrix
Import a matrix from an existing FULL file.
For a complex stiffness matrix, you can use the K_RE or K_IM label to import only the real part or only the imaginary part. The K_RE and K_IM options both create real matrices.
Note that the K_IM matrix is only available for MODOPT,UNSYM and MODOPT,DAMP modal analyses.
HBMATFile nameFile format:
ASCII
BINARY
Import a matrix from an existing Harwell-Boeing format file.
MMFFile name(not used)Import a matrix from an existing Matrix Market format file.
DMIGFile nameSeparator character (default = blank)Import a matrix from an existing NASTRAN DMIG file.
MATFile name(not used)Restore from a previous *EXPORT (FORMAT = MAT) command..

Notes

Use the *DMAT command to create a dense matrix.

Unlike the *DMAT command, the *SMAT command cannot be used to allocate a sparse matrix.

For more information on the NOD2BCS and USR2BCS 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.

Menu Paths

This command cannot be accessed from a menu.

Release 18.2 - © ANSYS, Inc. All rights reserved.