vread#
- Mapdl.vread(parr='', fname='', ext='', label='', n1='', n2='', n3='', nskip='', **kwargs)#
Reads data and produces an array parameter vector or matrix.
APDL Command:
*VREAD
- Parameters:
- parr
The name of the resulting array parameter vector. See
*SET
for name restrictions. The parameter must exist as a dimensioned array [*DIM
]. String arrays are limited to a maximum of 8 characters.- fname
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.
- ext
Filename extension (eight-character maximum).
- label
Can take a value of IJK, IKJ, JIK, JKI, KIJ, KJI, or blank (IJK).
- n1, n2, n3
Read as (((ParR (i,j,k), k = 1,n1), i = 1, n2), j = 1, n3) for Label = KIJ. n2 and n3 default to 1.
- nskip
Number of lines at the beginning of the file being read that will be skipped during the reading. Default = 0.
Notes
Reads data from a file and fills in an array parameter vector or matrix. Data are read from a formatted file or, if the menu is off [/MENU,OFF] and Fname is blank, from the next input lines. The format of the data to be read must be input immediately following the
*VREAD
command. The format specifies the number of fields to be read per record, the field width, and the placement of the decimal point (if none specified in the value). The read operation follows the available FORTRAN FORMAT conventions of the system (see your system FORTRAN manual). Any standard FORTRAN real format (such as (4F6.0), (E10.3,2X,D8.2), etc.) or alphanumeric format (A) may be used. Alphanumeric strings are limited to a maximum of 8 characters for any field (A8). For storage of string arrays greater than 8 characters, the*SREAD
command can be used. Integer (I) and list-directed (*) descriptors may not be used. The parentheses must be included in the format and the format must not exceed 80 characters (including parentheses). The input line length is limited to 128 characters.A starting array element number must be defined for the result array parameter vector (numeric or character). For example, entering these two lines:
will read two values from each line of file ARRAYVAL and assign the values to A(1), A(2), A(3), etc. Reading continues until successive row elements [
*VLEN
,*VMASK
,*DIM
] are filled.For an array parameter matrix, a starting array element row and column number must be defined. For example, entering these two lines:
will read two values from each line of file ARRAYVAL and assign the values to A(1,1), A(2,1), A(3,1), etc. Reading continues until n1 (10) successive row elements are filled. Once the maximum row number is reached, subsequent data will be read into the next column (e.g., A(1,2), A(2,2), A(3,2), etc.)
For numerical parameters, absolute values and scale factors may be applied to the result parameter [
*VABS
,*VFACT
]. Results may be cumulative [*VCUM
]. See the*VOPER
command for details. If you are in the GUI the*VREAD
command must be contained in an externally prepared file read into the ANSYS program (i.e.,*USE
, /INPUT, etc.).This command is not applicable to 4- or 5-D arrays.
This command is valid in any processor.