*DMAT
*DMAT, Matrix
, Type
, Method
, Val1
, Val2
, Val3
, Val4
, Val5
Creates a dense matrix.
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.
- I --
Integer values.
Method
Method used to create the matrix:
- ALLOC --
Allocate space for a matrix (default).
- RESIZE --
Resize an existing matrix to new row and column dimensions. Values are kept from the original matrix. If the dimensions specified by
Val1
(rows) andVal2
(columns) are greater than the original matrix size, the additional entries are assigned a value of zero.- COPY --
Copy an existing matrix.
- LINK --
Link to an existing matrix. The memory will be shared between the original matrix and the new matrix. This is useful for manipulating a submatrix of a larger matrix. The
Val1
throughVal5
arguments will be used to specify the lower and upper bounds of row and column numbers from the original matrix.- IMPORT --
Import the matrix from a file.
Val1
,Val2
,Val3
,Val4
,Val5
Additional input. The meaning of
Val1
throughVal5
will vary depending on the specifiedMethod
. See details below.
The following Valx
fields are used with Method
= ALLOC or Method
= RESIZE:
Val1
Number of rows in the matrix.
Val2
Number of columns in the matrix.
Val3
Memory allocation type (used only with
Method
= ALLOC):- INCORE --
In-core memory allocation (default).
- OUTOFCORE --
Out-of-core memory allocation.
The following Valx
fields are used with Method
= COPY:
Val1
Name of the matrix to copy.
Val2
Method used for copying the matrix:
- TRANS --
Transpose the original matrix.
Val3
andVal4
are ignored.- REAL --
Copy the real part to the output matrix. This option only applies when copying a complex value matrix to a real value matrix.
Val3
andVal4
are ignored.- IMAG --
Copy the imaginary part to the output matrix. This option only applies when copying a complex value matrix to a real value matrix.
Val3
andVal4
are ignored.- EXTRACT --
Extract a submatrix based on row and column numbers specified by
Val3
andVal4
.
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 Valx
fields are used with Method
= LINK:
Val1
Name of the original matrix.
Val2
First column number (defaults to 1).
Val3
Last column number (defaults to the maximum column number of the original matrix).
Val4
First row number (defaults to 1).
Val5
Last row number (defaults to the maximum row number of the original matrix).
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 or load vector from an existing FULL file.
| |||||||
MODE | File name [a] | First mode number | Last mode number | (not used) | Import a set of modes from an existing MODE file. | |||||||
CMS | File name [a] | Mode type:
| (not used) | (not used) | Import a modal basis from an existing CMS file. | |||||||
TCMS | File name [a] | Mode type:
| (not used) | (not used) | Import a modal basis from an existing TCMS file. | |||||||
RST | File name [a] | First data set number | Last data set number |
Result Type:
| Import degree of freedom results from an existing RST file. | |||||||
SUB | File name [a] | Matrix type:
| (not used) | (not used) | Import a matrix or load vector from an existing SUB file. | |||||||
HBMAT | File name [a] | File format:
| (not used) | (not used) | Import a matrix from an existing Harwell-Boeing format file. | |||||||
EMAT | File name [a] | Matrix type:
| Element number | (not used) | Import an element matrix or load vector from an existing EMAT file. | |||||||
MAT | File name [a] | (not used) | (not used) | (not used) | Restore from a previous *EXPORT (FORMAT =
MAT) command. | |||||||
APDL | Array parameter name | (not used) | (not used) | (not used) | Import an existing array parameter. | |||||||
MMF | File name [a] | (not used) | (not used) | (not used) | Import a dense matrix from an existing Matrix Market file. | |||||||
DMIG | File name [a] | File Format:
(see "Notes" for examples) | Delimiter character (only for FREE field format):
| Matrix name (default is the first matrix of the DMIG file) | Import a matrix from an existing Nastran DMIG file. |
[a] File name is case-sensitive with a 32-character maximum.
Notes
This command allows you to create a dense matrix. To create a sparse matrix, use the *SMAT command. *SMAT is recommended for large matrices obtained from the .FULL or .HBMAT file. Refer to the HBMAT command documentation for more information about .FULL file contents.
Use the *VEC command to create a vector.
For very large matrices, use the OUTOFCORE option (Method
= ALLOC or COPY) to keep some of the matrix
on disk if there is insufficient memory.
When importing a dense matrix from a DMIG file, you can define the formatting of the file using the Val3
and Val4
fields. Here
are a few different example of formats:
A LARGE field format file (using
Val3
= ’LARGE’):... DMIG* KAAX 21 2 * 21 1-2.261491337E+08 ...
A FREE field format file with blank separators (using
Val4
= ’S’):... DMIG stiff 1 2 1 2 29988. 1 6 149940. 2 2 -29988. 2 6 149940. ...
A FREE field format file with a comma separator (using
Val4
= ’,’):... DMIG,KF,22321,3,,22321,2,-5.00E+6 DMIG,KF,22320,3,,22320,2,-5.00E+6 ...
Requirement when importing matrices from a Nastran DMIG file: To ensure that the .sub file is properly generated from matrices imported from Nastran DMIG file, the generalized coordinates for a CMS superelement (SPOINTS in Nastran) must appear last (have highest ID number).