get_vec#
- MapdlMath.get_vec(dtype=None, name=None, fname='file.full', mat_id='RHS', asarray=False)[source]#
Load a vector from a file.
- Parameters:
- dtype
numpy.dtype
,optional
Numpy data type to store the vector as. Defaults to
np.double
.- name
str
,optional
APDLMath matrix name. Optional and defaults to a random name.
- fname
str
,optional
Filename to read the vector from.
- mat_id
str
,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 defaultdtype
isnp.int32
."FORWARD"
- nodal mapping vector (user to internal) If this is used, the defaultdtype
isnp.int32
.
- asarraybool,
optional
Return a scipy array rather than an APDLMath matrix.
- dtype
- Returns:
numpy.ndarray
orAnsVec
Numpy array or APDLMath vector depending on
asarray
.
Examples
>>> vec = mm.get_vec(fname='PRSMEMB.full', mat_id="RHS") >>> vec APDLMath Vector Size 126