load_matrix_from_file

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

Import a matrix from an existing FULL file.

Parameters
dtypenumpy.dtype, optional

Numpy data type to store the vector as. You can use double (“DOUBLE” or “D”), or complex numbers (“COMPLEX” or “Z”). Alternatively you can also supply a numpy data type. Defaults to np.double.

fnamestr, optional

Filename to read the matrix from. Defaults to "file.full".

mat_idstr, optional

Matrix type. Defaults to "STIFF".

  • "STIFF" - Stiffness matrix

  • "MASS" - Mass matrix

  • "DAMP" - Damping matrix

  • "GMAT" - Constraint equation matrix

  • "K_RE" - Real part of the stiffness matrix

  • "K_IM" - Imaginary part of the stiffness matrix

asarraybool, optional

Return a scipy array rather than an APDLMath matrix.

Returns
scipy.sparse.csr.csr_matrix or AnsMat

Scipy sparse matrix or APDLMath matrix depending on asarray.