Dune Core Modules (2.7.1)
Eigenvalue computations for the FieldMatrix class. More...
#include <iostream>
#include <cmath>
#include <cassert>
#include <dune/common/exceptions.hh>
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/math.hh>
Go to the source code of this file.
Namespaces | |
namespace | Dune |
Dune namespace. | |
Functions | |
template<typename K > | |
static void | Dune::FMatrixHelp::eigenValues (const FieldMatrix< K, 1, 1 > &matrix, FieldVector< K, 1 > &eigenvalues) |
calculates the eigenvalues of a symmetric field matrix More... | |
template<typename K > | |
static void | Dune::FMatrixHelp::eigenValues (const FieldMatrix< K, 2, 2 > &matrix, FieldVector< K, 2 > &eigenvalues) |
calculates the eigenvalues of a symmetric field matrix More... | |
template<typename K > | |
static void | Dune::FMatrixHelp::eigenValues (const FieldMatrix< K, 3, 3 > &matrix, FieldVector< K, 3 > &eigenvalues) |
Calculates the eigenvalues of a symmetric 3x3 field matrix. More... | |
template<int dim, typename K > | |
static void | Dune::FMatrixHelp::eigenValuesVectorsLapack (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues, FieldMatrix< K, dim, dim > &eigenVectors, const char &jobz) |
calculates the eigenvalues and/or eigenvectors of a symmetric field matrix More... | |
template<int dim, typename K > | |
static void | Dune::FMatrixHelp::eigenValues (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues) |
calculates the eigenvalues of a symmetric field matrix More... | |
template<int dim, typename K > | |
static void | Dune::FMatrixHelp::eigenValuesVectors (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues, FieldMatrix< K, dim, dim > &eigenVectors) |
calculates the eigenvalues and eigenvectors of a symmetric field matrix More... | |
template<int dim, typename K , class C > | |
static void | Dune::FMatrixHelp::eigenValuesNonSym (const FieldMatrix< K, dim, dim > &matrix, FieldVector< C, dim > &eigenValues) |
calculates the eigenvalues of a non-symmetric field matrix More... | |
Detailed Description
Eigenvalue computations for the FieldMatrix class.
Function Documentation
◆ eigenValues() [1/4]
|
static |
calculates the eigenvalues of a symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenvalues FieldVector that contains eigenvalues in ascending order
References Dune::FMatrixHelp::eigenValues().
Referenced by Dune::FMatrixHelp::eigenValues(), and Dune::FMatrixHelp::eigenValuesVectors().
◆ eigenValues() [2/4]
|
static |
calculates the eigenvalues of a symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenvalues FieldVector that contains eigenvalues in ascending order
References DUNE_THROW, and Dune::FMatrixHelp::eigenValues().
◆ eigenValues() [3/4]
|
static |
Calculates the eigenvalues of a symmetric 3x3 field matrix.
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenvalues Eigenvalues in ascending order
- Note
- If the input matrix is not symmetric the behavior of this method is undefined.
This implementation was adapted from the pseudo-code (Python?) implementation found on http://en.wikipedia.org/wiki/Eigenvalue_algorithm (retrieved late August 2014). Wikipedia claims to have taken it from Smith, Oliver K. (April 1961), Eigenvalues of a symmetric 3 × 3 matrix., Communications of the ACM 4 (4): 168, doi:10.1145/355578.366316
References Dune::DenseMatrix< MAT >::determinant(), Dune::FMatrixHelp::eigenValues(), and Dune::StandardMathematicalConstants< Field >::pi().
◆ eigenValues() [4/4]
|
static |
calculates the eigenvalues of a symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenValues FieldVector that contains eigenvalues in ascending order
- Note
- LAPACK::dsyev is used to calculate the eigenvalues
References Dune::FMatrixHelp::eigenValues(), and Dune::FMatrixHelp::eigenValuesVectorsLapack().
◆ eigenValuesNonSym()
|
static |
calculates the eigenvalues of a non-symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenValues FieldVector that contains eigenvalues in ascending order
- Note
- LAPACK::dgeev is used to calculate the eigen values
References Dune::FMatrixHelp::eigenValuesNonSym().
Referenced by Dune::FMatrixHelp::eigenValuesNonSym().
◆ eigenValuesVectors()
|
static |
calculates the eigenvalues and eigenvectors of a symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenValues FieldVector that contains eigenvalues in ascending order [out] eigenVectors FieldMatrix that contains the eigenvectors
- Note
- LAPACK::dsyev is used to calculate the eigenvalues and eigenvectors
References Dune::FMatrixHelp::eigenValues(), Dune::FMatrixHelp::eigenValuesVectors(), and Dune::FMatrixHelp::eigenValuesVectorsLapack().
Referenced by Dune::FMatrixHelp::eigenValuesVectors().
◆ eigenValuesVectorsLapack()
|
static |
calculates the eigenvalues and/or eigenvectors of a symmetric field matrix
- Parameters
-
[in] matrix matrix eigenvalues are calculated for [out] eigenValues FieldVector that contains eigenvalues in ascending order [out] eigenVectors FieldMatrix that contains the eigenvectors [in] jobz jobz=n (only eigenvalues), jobz=v (eigenvalues and eigenvetors)
- Note
- LAPACK::dsyev is used to calculate the eigenvalues and/or eigenvectors
References Dune::FMatrixHelp::eigenValuesVectorsLapack().
Referenced by Dune::FMatrixHelp::eigenValues(), Dune::FMatrixHelp::eigenValuesVectors(), and Dune::FMatrixHelp::eigenValuesVectorsLapack().