ansys.mapdl.core.Mapdl.vec#

Mapdl.vec(vector='', type_='', method='', val1='', val2='', val3='', val4='', **kwargs)#

Creates a vector.

Mechanical APDL Command: *VEC

Parameters:
vectorstr

Name used to identify the vector. Must be specified.

type_str

Vector type:

  • D - Double precision real values (default).

  • Z - Complex double precision values.

  • I - Integer values.

methodstr

Method used to create the vector:

  • ALLOC - Allocate space for a vector (default).

  • RESIZE - Resize an existing vector to a new length. Values are kept from the original vector. If the length specified by Val1 is greater than the original vector length, the additional rows are assigned a value of zero.

  • COPY - Copy an existing vector.

  • IMPORT - Import the vector from a file.

  • LINK - Link to a column of an existing dense dmat matrix and use it in subsequent vector calculations. Any changes to the vector are also made to the corresponding matrix column (memory is shared).

val1str

Name of the dmat matrix.

val2str

Column number of the matrix to link to.

val3str

Additional input. The meaning of Val1 through Val5 will vary depending on the specified Method. See details below.

val4str

Additional input. The meaning of Val1 through Val5 will vary depending on the specified Method. See details below.

Notes

Warning

This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.

Argument Descriptions

  • vector : str - Name used to identify the vector. Must be specified.

  • type_ : str - Vector type:

    • D - Double precision real values (default).

    • Z - Complex double precision values.

    • I - Integer values.

  • method : str - Method used to create the vector:

    • ALLOC - Allocate space for a vector (default).

    • RESIZE - Resize an existing vector to a new length. Values are kept from the original vector. If the length specified by Val1 is greater than the original vector length, the additional rows are assigned a value of zero.

    • COPY - Copy an existing vector.

    • IMPORT - Import the vector from a file.

    • LINK - Link to a column of an existing dense dmat matrix and use it in subsequent vector calculations. Any changes to the vector are also made to the corresponding matrix column (memory is shared).

  • val1, val2, val3, val4, val5 : str - Additional input. The meaning of Val1 through Val5 will vary depending on the specified Method. See details below.

The following Valx field is used with Method = ALLOC or Method = RESIZE:

  • val1 : str - Number of rows in the vector.

The following Valx field is used with Method = COPY:

  • val1 : str - Name of the vector to copy.

  • val2 : str - Optional argument to specify either the real or the imaginary part of the values

to be copied. This

option only applies when copying a complex value vector to a real value vector.

  • REAL - Copy the real part of the vector to the output vector.

  • IMAG - Copy the imaginary part of the vector to the output vector.

The following table describes the Valx fields used with Method = IMPORT.

This command contains some tables and extra information which can be inspected in the original documentation pointed above.

The following Valx fields are used with Method = LINK:

  • val1 : str - Name of the dmat matrix.

  • val2 : str - Column number of the matrix to link to.

Use the dmat command to create a matrix.

For more information on the BACK and FORWARD nodal mapping vectors, see in the Ansys Parametric Design Language Guide.