*EXPORT
*EXPORT, Matrix
, Format
, Fname
, Val1
, Val2
, Val3
Exports a matrix to a file in the specified format.
Argument Descriptions
Matrix
Name of the matrix to export (must be a matrix previously created with *DMAT or *SMAT, or a vector previously created with *VEC).
Format
Format of the output file:
- MMF --
Export the matrix in the Matrix Market Format.
- SUB --
Export the matrix in the SUB file format.
- HBMAT --
Export the matrix in the Harwell-Boeing file format.
- MAT --
Export the matrix in a native format, to be re-imported using the *DMAT or *SMAT command.
- EMAT --
Export the matrix to an existing EMAT file.
- APDL --
Export the matrix to an APDL array parameter.
- PS --
Export the matrix profile to a Postscript file.
- DMIG --
Export the matrix in the DMIG file format.
- CSV --
Export the matrix to an ASCII CSV (comma-separated values) file.
Fname
Name of the file (case-sensitive, 32-character maximum), or name of the array parameter if
Format
= APDL (no default).Val1
,Val2
,Val3
Additional input. The meaning of
Val1
throughVal3
will vary depending on the specifiedFormat
. See table below for details.
Additional
input for Format = SUB, HBMAT, EMAT, APDL, PS, DMIG, and
CSV | ||||||||||
Format | Val1 | Val2 | Val3 | Description | ||||||
SUB | Matrix type:
| Matrix containing the row information (see Notes). Not needed if the matrix was imported from an existing SUB or DMIG file. |
| Identify matrix type to write and specify when to perform the export (see Notes). | ||||||
HBMAT | File format:
| Matrix type (optional; see Notes):
| (not used) | Identify the output format and matrix type to write (see Notes). | ||||||
EMAT | Matrix type:
| Element number | (not used) | Identify the matrix type and the element number. | ||||||
APDL | First column | Last column | (not used) | Block of columns to export. | ||||||
PS | Color key:
| (not used) | (not used) | Identify the output format. | ||||||
DMIG | Matrix containing the row information (see Notes). Not needed if the matrix was imported from an existing SUB or DMIG file. | File format:
| (not used) | The row information vector specifies the mapping between row number, node, and DOF number. | ||||||
CSV | Number of decimal places (default = 10) | Delimiter character ( default=’,’). Use ‘S’ for space, ‘T’ for tab delimiter. | (not used) | Identify the accuracy and formatting. |
Notes
Only sparse matrices can be exported to Postscript files. This option plots the matrix profile as a series of dots.
If you want to create a .sub file from several matrices, you need to set
Val3
= WAIT for all matrices but the last, and
Val3
= DONE for the last one. The export will be effective at the
last *EXPORT command.
To create a .sub file or .dmig file from scratch,
you must supply the row information array. (Specify this array in the
Val2
field for .sub or in the
Val1
field for .dmig.) This must be an
m
x 2 array, where m
is the size of
the matrix. The first column is the node number and the second column is the DOF number
corresponding to each row of the matrix.
When exporting an HBMAT file in ASCII format, you can include the
matrix type in the header of the file by specifying the matrix type in the
Val2
field. The matrix type is not included in the header if
Val2
is empty. If Val1
= BINARY,
Val2
is not used.
The *EXPORT command is not applicable to sparse matrices initialized from .full files by means of the NOD2SOLV option on the *SMAT command (that is, *SMAT,,,IMPORT,FULL,,NOD2SOLV).
The .csv file format does not support sparse matrices.