ansys.mapdl.core.Mapdl.export#
- Mapdl.export(matrix='', format_='', fname='', val1='', val2='', val3='', **kwargs)#
Exports a matrix to a file in the specified format.
Mechanical APDL Command: *EXPORT
- Parameters:
- matrix
str
Name of the matrix to export (must be a matrix previously created with dmat or smat, or a vector previously created with vec ).
- format_
str
Format of the output file:
MMF
- Export the matrix in the Matrix Market Format.SUB
- Export the matrix in theSUB
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 existingEMAT
file.APDL
- Export the matrix to an APDL array parameter.PS
- Export the matrix profile to a Postscript file.DMIG
- Export the matrix in theDMIG
file format.CSV
- Export the matrix to an ASCII CSV (comma-separated values) file.
- fname
str
Name of the file (case-sensitive, 32-character maximum), or name of the array parameter if
Format
= APDL (no default).- val1
str
Additional input. The meaning of
Val1
throughVal3
will vary depending on the specifiedFormat
. See table below for details.- val2
str
Additional input. The meaning of
Val1
throughVal3
will vary depending on the specifiedFormat
. See table below for details.- val3
str
Additional input. The meaning of
Val1
throughVal3
will vary depending on the specifiedFormat
. See table below for details.
- matrix
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
matrix : str
- Name of the matrix to export (must be a matrix previously created with dmat or smat, or a vector previously created with vec ).format : str
- Format of the output file:MMF
- Export the matrix in the Matrix Market Format.SUB
- Export the matrix in theSUB
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 existingEMAT
file.APDL
- Export the matrix to an APDL array parameter.PS
- Export the matrix profile to a Postscript file.DMIG
- Export the matrix in theDMIG
file format.CSV
- Export the matrix to an ASCII CSV (comma-separated values) file.
fname : str
- Name of the file (case-sensitive, 32-character maximum), or name of the array parameter ifFormat
= APDL (no default).val1, val2, val3 : str
- Additional input. The meaning ofVal1
throughVal3
will vary depending on the specifiedFormat
. See table below for details.
This command contains some tables and extra information which can be inspected in the original documentation pointed above.
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 setVal3
= WAIT for all matrices but the last, andVal3
= 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 theVal2
field for.SUB
or in theVal1
field for.DMIG
.) This must be anm
x 2 array, wherem
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 ifVal2
is empty. IfVal1
= 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.