mass#
- MapdlMath.mass(dtype=<class 'numpy.float64'>, name=None, fname='file.full', asarray=False)[source]#
Load the mass matrix from a full file.
- Parameters:
- dtype
numpy.dtype
,optional
Numpy data type to store the vector as. Only applicable if
asarray=True
, otherwise the returned matrix contains double float numbers. Defaults tonp.double
- name
str
,optional
APDLMath matrix name. Optional and defaults to a random name.
- fname
str
,optional
Filename to read the matrix from.
- asarraybool,
optional
Return a scipy array rather than an APDLMath matrix.
- dtype
- Returns:
scipy.sparse.csr.csr_matrix
orAnsMat
Scipy sparse matrix or APDLMath matrix depending on
asarray
.
Examples
>>> mass = mapdl.math.mass() >>> mass APDLMATH Matrix 60 x 60
Convert to a scipy array
>>> mat = mass.asarray() >>> mat <60x60 sparse matrix of type '<class 'numpy.float64'>' with 1734 stored elements in Compressed Sparse Row format>