ansys.mapdl.core.Mapdl.mwrite#
- Mapdl.mwrite(parr='', fname='', ext='', label='', n1='', n2='', n3='', **kwargs)#
Writes a matrix to a file in a formatted sequence.
Mechanical APDL Command: *MWRITE
Warning
This command must be run using
non_interactive
. Please visit Unsupported Interactive Commands for further information.- Parameters:
- parr
str
The name of the array parameter. See starset for name restrictions.
- fname
str
File name and directory path (248 characters maximum, including the characters needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name. If the file name fields are left blank, the default file is the current output file.
- ext
str
Filename extension (eight-character maximum).
- label
str
Can use a value of IJK, IKJ, JIK, JKI, KIJ, KJI, or blank (JIK).
- n1
str
Write as (((
ParR
(i,j,k), k = 1,n1), i = 1, n2), j = 1, n3) forLabel
= KIJ.n1,
n2,
andn3
default to the corresponding dimensions of the array parameter ParR.- n2
str
Write as (((
ParR
(i,j,k), k = 1,n1), i = 1, n2), j = 1, n3) forLabel
= KIJ.n1,
n2,
andn3
default to the corresponding dimensions of the array parameter ParR.- n3
str
Write as (((
ParR
(i,j,k), k = 1,n1), i = 1, n2), j = 1, n3) forLabel
= KIJ.n1,
n2,
andn3
default to the corresponding dimensions of the array parameter ParR.
- parr
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
parr : str
- The name of the array parameter. See starset for name restrictions.fname : str
- File name and directory path (248 characters maximum, including the characters
needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name. If the file name fields are left blank, the default file is the
current output file.
ext : str
- Filename extension (eight-character maximum).label : str
- Can use a value of IJK, IKJ, JIK, JKI, KIJ, KJI, or blank (JIK).n1, n2, n3 : str
- Write as (((ParR
(i,j,k), k = 1,n1), i = 1, n2), j = 1, n3) forLabel
= KIJ.n1,
n2,
andn3
default to the corresponding dimensions of the array parameter ParR.
Writes a matrix or vector to a specified file in a formatted sequence. You can also use the vwrite command to write data to a specified file. Both commands contain format descriptors on the line immediately following the command. The format descriptors can be in either FORTRAN or C format.
FORTRAN format descriptors are enclosed in parentheses. They must immediately follow the mwrite command on a separate line of the same input file. The word FORMAT should not be included. The format must specify the number of fields to be written per line, the field width, the placement of the decimal point, etc. There should be one field descriptor for each data item written. The write operation uses the available system FORTRAN FORMAT conventions (see your system FORTRAN manual). Any standard FORTRAN real format (such as (4F6.0), (E10.3,2X,D8.2), etc.) and character format (A) may be used. Integer (I) and list-directed (2) descriptors may not be used. Text may be included in the format as a quoted string. The FORTRAN descriptor must be enclosed in parentheses and the format must not exceed 80 characters (including parentheses).
The “C” format descriptors are used if the first character of the format descriptor line is not a left parenthesis. “C” format descriptors may be up to 80 characters long, consisting of text strings and predefined “data descriptors” between the strings where numeric or alphanumeric character data are to be inserted. The normal descriptors are %I for integer data, %G for double precision data, %C for alphanumeric character data, and %/ for a line break. There must be one data descriptor for each specified value in the order of the specified values. The enhanced formats described in msg can also be used.
The starting array element number must be defined. Looping continues in the directions indicated by the Label argument. The number of loops and loop skipping may also be controlled via vlen and vmask, which work in the
n2
direction (by row on the output file), and by vcol, which works in then1
direction (by column in the output file). The vector specifications vabs and vfact apply to this command, while vcum does not apply to this command. See voper for details. If you are in the GUI, the mwrite command must be contained in an externally prepared file and read into Mechanical APDL (that is, use, input, etc.).This command is valid in any processor.