MapdlMath.mgs(mat, thresh='', **kwargs)

Apply Modified Gram-Schmidt algorithm to a matrix.

The MGS algorithm is only applicable to dense matrices. Columns that are linearly dependent on others are removed, leaving the independent or basis vectors. The matrix is resized according to the new size determined by the algorithm.

  • mat (ansys.mapdl.core.math.AnsMat) – The array to apply Modified Gram-Schmidt algorithm to.

  • thresh (float, optional) – Numerical threshold value used to manage the compression. The default value is 1E-14 for MGS.


Apply MGS on an existing Dense Rectangular Matrix, using default threshold. The mat matrix is modified in-situ.

>>> mm.mgs(mat)