get_vec

MapdlMath.get_vec(dtype=<class 'numpy.float64'>, fname='file.full', mat_id='RHS', asarray=False)

Load a vector from a file.

Parameters
dtypenumpy.dtype, optional

Numpy data type to store the vector as. Defaults to np.double.

fnamestr, optional

Filename to read the vector from.

mat_idstr, optional

Vector ID to load. If loading from a "*.full" file, can be one of the following:

  • "RHS" - Load vector

  • "GVEC" - Constraint equation constant terms

  • "BACK" - nodal mapping vector (internal to user)

  • "FORWARD" - nodal mapping vector (user to internal)

asarraybool, optional

Return a scipy array rather than an APDLMath matrix.

Returns
numpy.ndarray or AnsVec

Numpy array or APDLMath vector depending on asarray.

Examples

>>> vec = mm.get_vec(fname='PRSMEMB.full', mat_id="RHS")
>>> vec
APDLMath Vector Size 126