MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
Functions
/home/dorival/mechsys/lib/linalg/jacobirot.h File Reference
#include <cmath>
#include "mechsys/linalg/matvec.h"

Go to the source code of this file.

Functions

template<typename MatrixType , typename VectorType >
int _jacobi_rot (int N, MatrixType &A, MatrixType &Q, VectorType &v, double errTol=DBL_EPSILON)
int JacobiRot (Mat_t &A, Mat_t &Q, Vec_t &v, double errTol=DBL_EPSILON)
int JacobiRot (Mat3_t &A, Mat3_t &Q, Vec3_t &v, double errTol=DBL_EPSILON)
int JacobiRot (Vec_t const &TenA, Mat3_t &Q, Vec3_t &v, double errTol=DBL_EPSILON)

Function Documentation

template<typename MatrixType , typename VectorType >
int _jacobi_rot ( int  N,
MatrixType &  A,
MatrixType &  Q,
VectorType &  v,
double  errTol = DBL_EPSILON 
) [inline]

Jacobi Transformation of a Symmetric Matrix<double>. The Jacobi method consists of a sequence of orthogonal similarity transformations. Each transformation (a Jacobi rotation) is just a plane rotation designed to annihilate one of the off-diagonal matrix elements. Successive transformations undo previously set zeros, but the off-diagonal elements nevertheless get smaller and smaller. Accumulating the product of the transformations as you go gives the matrix of eigenvectors (Q), while the elements of the final diagonal matrix (A) are the eigenvalues. The Jacobi method is absolutely foolproof for all real symmetric matrices. For matrices of order greater than about 10, say, the algorithm is slower, by a significant constant factor, than the QR method.

A = Q * L * Q.T

Parameters:
AIn/Out: is the matrix we seek for the eigenvalues (SYMMETRIC and square, i.e. Rows=Cols)
QOut: is a matrix which columns are the eigenvectors
vOut: is a vector with the eigenvalues
Returns:
The number of iterations
int JacobiRot ( Mat_t A,
Mat_t Q,
Vec_t v,
double  errTol = DBL_EPSILON 
) [inline]

Eigenvalues and Eigenvectors (columns of Q) of Matrix.

int JacobiRot ( Mat3_t A,
Mat3_t Q,
Vec3_t v,
double  errTol = DBL_EPSILON 
) [inline]

Eigenvalues and Eigenvectors (columns of Q) of TinyMatrix.

int JacobiRot ( Vec_t const &  TenA,
Mat3_t Q,
Vec3_t v,
double  errTol = DBL_EPSILON 
) [inline]

Eigenvalues and Eigenvectors (columns of Q) of 2nd order tensor in Mandel's basis.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines