MapdlMath.get_vec(dtype=None, name=None, fname='file.full', mat_id='RHS', asarray=False)#

Load a vector from a file.

dtypenumpy.dtype, optional

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

namestr, optional

APDLMath matrix name. Optional and defaults to a random name.

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). If this is used, the default dtype is np.int32.

  • "FORWARD" - nodal mapping vector (user to internal) If this is used, the default dtype is np.int32.

asarraybool, optional

Return a scipy array rather than an APDLMath matrix.

numpy.ndarray or AnsVec

Numpy array or APDLMath vector depending on asarray.


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