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. 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

  • "NOD2BCS" - Mapping vector relating the full set of nodal DOFs to the subset that the solver uses

  • "USR2BCS" - Mapping vector relating the full set of external nodal DOFs to the subset that the solver uses

  • "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.