ansys.mapdl.core.Mapdl.nrm#

Mapdl.nrm(name='', normtype='', parr='', normalize='', **kwargs)#

Computes the norm of the specified matrix or vector.

Mechanical APDL Command: *NRM

Parameters:
namestr

Matrix or vector for which the norm will be computed. This can be a dense matrix (created by the dmat command), a sparse matrix (created by the smat command) or a vector (created by the vec command)

normtypestr

Mathematical norm to use:

  • NRM2 - L2 (Euclidian or SRSS) norm (default).

  • NRM1 - L1 (absolute sum) norm (vectors and dense matrices only).

  • NRMINF - Maximum norm.

parrstr

Parameter name that contains the result.

normalizestr

Normalization key; to be used only for vectors created by vec :

  • YES - Normalize the vector such that the norm is 1.0.

  • NO - Do not normalize the vector (default).

Notes

Warning

This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.

Argument Descriptions

  • name : str - Matrix or vector for which the norm will be computed. This can be a dense matrix (created by the dmat command), a sparse matrix (created by the smat command) or a vector (created by the vec command)

  • normtype : str - Mathematical norm to use:

    • NRM2 - L2 (Euclidian or SRSS) norm (default).

    • NRM1 - L1 (absolute sum) norm (vectors and dense matrices only).

    • NRMINF - Maximum norm.

  • parr : str - Parameter name that contains the result.

  • normalize : str - Normalization key; to be used only for vectors created by vec :

    • YES - Normalize the vector such that the norm is 1.0.

    • NO - Do not normalize the vector (default).

The NRM2 option corresponds to the Euclidian or L2 norm and is applicable to either vectors or matrices:

equationnotavailable, equationnotavailable

equationnotavailable, equationnotavailable where equationnotavailable is the complex conjugate of equationnotavailable

equationnotavailable, equationnotavailable = largest eigenvalue of equationnotavailable

The NRM1 option corresponds to the L1 norm and is applicable to vectors and dense matrices:

equationnotavailable or equationnotavailable, equationnotavailable

equationnotavailable or equationnotavailable, equationnotavailable

The NRMINF option is the maximum norm and is applicable to either vectors or matrices:

equationnotavailable or equationnotavailable, equationnotavailable

equationnotavailable or equationnotavailable, equationnotavailable