Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

MatrixEigenSym Class Reference

Last update: 16.07.2025

Eigen decomposition of symmetric matrices. More...

Public Types

typedef Eigen::Matrix< TScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Base
 the Eigen matrix type we refer to
 
typedef Eigen::Matrix< TScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Base2
 the Eigen matrix type which is used by the Eigen solvers
 
typedef int TIndex
 index type of Eigen matrices
 
typedef number TScalar
 the scalar tyta type of matrix elements
 
typedef Eigen::SelfAdjointEigenSolver< Base2TSolver
 the solver type for standard eigenvalue problem
 
typedef Eigen::GeneralizedSelfAdjointEigenSolver< Base2TSolverGeneralized
 the solver type for generalized eigenvalue problem
 

Public Member Functions

Matrix __pow__ (TScalar exponent) const
 operator ^(scalar) in scripting languages by SWIG More...
 
Matrix Eigenvalues () const
 
Matrix Eigenvectors () const
 
bool EigenvectorsAvailable () const
 
Matrix Exp ()
 
bool IsGeneralEigenproblem () const
 
Matrix Log ()
 
 MatrixEigenSym (Matrix _object, bool computevectors=true)
 destructor More...
 
 MatrixEigenSym (Matrix _object, Matrix mass, bool computevectors=true)
 constructor of a generalized eigenvalue problem More...
 
Matrix OperatorInverseSqrt () const
 
Matrix OperatorSqrt () const
 
Matrix Pow (TScalar exponent)
 

Detailed Description

Eigen decomposition of symmetric matrices.

This class provides an Eigen decomposition of symmetric matrices. At construction, it factorizes the given matrix and stores eigenvalues and (if asked for) eigenvectors. The constructor accepts either the standard eigenvalues problem (of a single symmetric matrix) or the generalized eigenvalue problem (of 2 symmetric matrices).

The class is equipped with methods and arithmetic operators which provide the

  • matrix exponential
  • matrix power
  • matrix logarithm
  • matrix square root using the full decomposition.

Constructor & Destructor Documentation

◆ MatrixEigenSym() [1/2]

MatrixEigenSym ( Matrix  _object,
bool  computevectors = true 
)

destructor

constructor of a standard eigenvalue problem

Parameters
_objectthe matrix to be decomposed
computevectorsif true, then also the eigenvectors are computed. else only eigenvalues

◆ MatrixEigenSym() [2/2]

MatrixEigenSym ( Matrix  _object,
Matrix  mass,
bool  computevectors = true 
)

constructor of a generalized eigenvalue problem

Parameters
_objectthe matrix to be decomposed, eg. the stiffness matrix
massthe second matrix, eg. the mass matrix
computevectorsif true, then also the eigenvectors are computed. else only eigenvalues

Member Function Documentation

◆ __pow__()

Matrix __pow__ ( TScalar  exponent) const

operator ^(scalar) in scripting languages by SWIG

Returns
the power of the matrix, i.e. $ A^n$ $
Parameters
exponentthe exponent $ n $

◆ Eigenvalues()

Matrix Eigenvalues ( ) const
Returns
the eigenvalues as vector

◆ Eigenvectors()

Matrix Eigenvectors ( ) const
Returns
the normalized complex eigenvectors as a matrix of column vectors.

◆ EigenvectorsAvailable()

bool EigenvectorsAvailable ( ) const
Returns
m_eigenvectorsAvailable

◆ Exp()

Matrix Exp ( )
Returns
the exponential of the matrix

◆ IsGeneralEigenproblem()

bool IsGeneralEigenproblem ( ) const
Returns
m_isGeneralEigenproblem

◆ Log()

Matrix Log ( )
Returns
the logarithm of the matrix

◆ OperatorInverseSqrt()

Matrix OperatorInverseSqrt ( ) const
Returns
the positive inverse square root of the matrix (if positive definite)

◆ OperatorSqrt()

Matrix OperatorSqrt ( ) const
Returns
the positive square root of the matrix (if positive definite)

◆ Pow()

Matrix Pow ( TScalar  exponent)
Returns
the power of the matrix, i.e. $ A^n$ $
Parameters
exponentthe exponent $ n $

Connect with Ansys