factorize#
- MapdlMath.factorize(mat, algo=None, inplace=True)[source]#
Factorize a matrix.
- Parameters:
- mat
ansys.mapdl.math.AnsMat
An APDLMath matrix
- algo
str
,optional
Factorization algorithm. Either
"LAPACK"
(default for dense matrices) or"DSP"
(default for sparse matrices).- inplacebool,
optional
If
False
, the factorization is performed on a copy of the input matrix (mat
argument), hence this input matrix (mat
) is not changed. Default isTrue
.
- mat
- Returns:
ansys.mapdl.core.math.AnsSolver
An Ansys Solver object.
Examples
Factorize a random matrix.
>>> mm = mapdl.math >>> dim = 1000 >>> m2 = mm.rand(dim, dim) >>> m3 = m2.copy() >>> mat = mm.factorize(m2)