dune-common 2.9.0
Loading...
Searching...
No Matches
Functions
Dune::FMatrixHelp Namespace Reference

Functions

template<typename K >
static K invertMatrix (const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
 invert scalar without changing the original matrix
 
template<typename K >
static K invertMatrix_retTransposed (const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
 invert scalar without changing the original matrix
 
template<typename K >
static K invertMatrix (const FieldMatrix< K, 2, 2 > &matrix, FieldMatrix< K, 2, 2 > &inverse)
 invert 2x2 Matrix without changing the original matrix
 
template<typename K >
static K invertMatrix_retTransposed (const FieldMatrix< K, 2, 2 > &matrix, FieldMatrix< K, 2, 2 > &inverse)
 
template<typename K >
static K invertMatrix (const FieldMatrix< K, 3, 3 > &matrix, FieldMatrix< K, 3, 3 > &inverse)
 invert 3x3 Matrix without changing the original matrix
 
template<typename K >
static K invertMatrix_retTransposed (const FieldMatrix< K, 3, 3 > &matrix, FieldMatrix< K, 3, 3 > &inverse)
 invert 3x3 Matrix without changing the original matrix
 
template<class K , int m, int n, int p>
static void multMatrix (const FieldMatrix< K, m, n > &A, const FieldMatrix< K, n, p > &B, FieldMatrix< K, m, p > &ret)
 calculates ret = A * B
 
template<typename K , int rows, int cols>
static void multTransposedMatrix (const FieldMatrix< K, rows, cols > &matrix, FieldMatrix< K, cols, cols > &ret)
 calculates ret= A_t*A
 
template<typename K , int rows, int cols>
static void multAssignTransposed (const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, rows > &x, FieldVector< K, cols > &ret)
 calculates ret = matrix^T * x
 
template<typename K , int rows, int cols>
static FieldVector< K, rows > mult (const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, cols > &x)
 calculates ret = matrix * x
 
template<typename K , int rows, int cols>
static FieldVector< K, cols > multTransposed (const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, rows > &x)
 calculates ret = matrix^T * x
 
template<int dim, typename K >
static void eigenValues (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues)
 calculates the eigenvalues of a symmetric field matrix
 
template<int dim, typename K >
static void 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
 
template<int dim, typename K >
static void eigenValuesLapack (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues)
 calculates the eigenvalues of a symmetric field matrix
 
template<int dim, typename K >
static void eigenValuesVectorsLapack (const FieldMatrix< K, dim, dim > &matrix, FieldVector< K, dim > &eigenValues, FieldMatrix< K, dim, dim > &eigenVectors)
 calculates the eigenvalues and -vectors of a symmetric field matrix
 
template<int dim, typename K , class C >
static void eigenValuesNonSym (const FieldMatrix< K, dim, dim > &matrix, FieldVector< C, dim > &eigenValues)
 calculates the eigenvalues of a non-symmetric field matrix
 

Function Documentation

◆ eigenValues()

template<int dim, typename K >
static void Dune::FMatrixHelp::eigenValues ( const FieldMatrix< K, dim, dim > &  matrix,
FieldVector< K, dim > &  eigenValues 
)
static

calculates the eigenvalues of a symmetric field matrix

Parameters
[in]matrixmatrix eigenvalues are calculated for
[out]eigenValuesFieldVector that contains eigenvalues in ascending order
Note
specializations for dim=1,2,3 exist, for dim>3 LAPACK::dsyev is used

◆ eigenValuesLapack()

template<int dim, typename K >
static void Dune::FMatrixHelp::eigenValuesLapack ( const FieldMatrix< K, dim, dim > &  matrix,
FieldVector< K, dim > &  eigenValues 
)
static

calculates the eigenvalues of a symmetric field matrix

Parameters
[in]matrixmatrix eigenvalues are calculated for
[out]eigenValuesFieldVector that contains eigenvalues in ascending order
Note
LAPACK::dsyev is used to calculate the eigenvalues

◆ eigenValuesNonSym()

template<int dim, typename K , class C >
static void Dune::FMatrixHelp::eigenValuesNonSym ( const FieldMatrix< K, dim, dim > &  matrix,
FieldVector< C, dim > &  eigenValues 
)
static

calculates the eigenvalues of a non-symmetric field matrix

Parameters
[in]matrixmatrix eigenvalues are calculated for
[out]eigenValuesFieldVector that contains eigenvalues in ascending order
Note
LAPACK::dgeev is used to calculate the eigenvalues

◆ eigenValuesVectors()

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 
)
static

calculates the eigenvalues and eigenvectors of a symmetric field matrix

Parameters
[in]matrixmatrix eigenvalues are calculated for
[out]eigenValuesFieldVector that contains eigenvalues in ascending order
[out]eigenVectorsFieldMatrix that contains the eigenvectors
Note
specializations for dim=1,2,3 exist, for dim>3 LAPACK::dsyev is used

◆ eigenValuesVectorsLapack()

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 
)
static

calculates the eigenvalues and -vectors of a symmetric field matrix

Parameters
[in]matrixmatrix eigenvalues are calculated for
[out]eigenValuesFieldVector that contains eigenvalues in ascending order
[out]eigenVectorsFieldMatrix that contains the eigenvectors
Note
LAPACK::dsyev is used to calculate the eigenvalues and -vectors

◆ invertMatrix() [1/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix ( const FieldMatrix< K, 1, 1 > &  matrix,
FieldMatrix< K, 1, 1 > &  inverse 
)
inlinestatic

invert scalar without changing the original matrix

◆ invertMatrix() [2/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix ( const FieldMatrix< K, 2, 2 > &  matrix,
FieldMatrix< K, 2, 2 > &  inverse 
)
inlinestatic

invert 2x2 Matrix without changing the original matrix

◆ invertMatrix() [3/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix ( const FieldMatrix< K, 3, 3 > &  matrix,
FieldMatrix< K, 3, 3 > &  inverse 
)
inlinestatic

invert 3x3 Matrix without changing the original matrix

◆ invertMatrix_retTransposed() [1/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix_retTransposed ( const FieldMatrix< K, 1, 1 > &  matrix,
FieldMatrix< K, 1, 1 > &  inverse 
)
inlinestatic

invert scalar without changing the original matrix

◆ invertMatrix_retTransposed() [2/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix_retTransposed ( const FieldMatrix< K, 2, 2 > &  matrix,
FieldMatrix< K, 2, 2 > &  inverse 
)
inlinestatic

invert 2x2 Matrix without changing the original matrix return transposed matrix

◆ invertMatrix_retTransposed() [3/3]

template<typename K >
static K Dune::FMatrixHelp::invertMatrix_retTransposed ( const FieldMatrix< K, 3, 3 > &  matrix,
FieldMatrix< K, 3, 3 > &  inverse 
)
inlinestatic

invert 3x3 Matrix without changing the original matrix

◆ mult()

template<typename K , int rows, int cols>
static FieldVector< K, rows > Dune::FMatrixHelp::mult ( const FieldMatrix< K, rows, cols > &  matrix,
const FieldVector< K, cols > &  x 
)
inlinestatic

calculates ret = matrix * x

◆ multAssignTransposed()

template<typename K , int rows, int cols>
static void Dune::FMatrixHelp::multAssignTransposed ( const FieldMatrix< K, rows, cols > &  matrix,
const FieldVector< K, rows > &  x,
FieldVector< K, cols > &  ret 
)
inlinestatic

calculates ret = matrix^T * x

◆ multMatrix()

template<class K , int m, int n, int p>
static void Dune::FMatrixHelp::multMatrix ( const FieldMatrix< K, m, n > &  A,
const FieldMatrix< K, n, p > &  B,
FieldMatrix< K, m, p > &  ret 
)
inlinestatic

calculates ret = A * B

◆ multTransposed()

template<typename K , int rows, int cols>
static FieldVector< K, cols > Dune::FMatrixHelp::multTransposed ( const FieldMatrix< K, rows, cols > &  matrix,
const FieldVector< K, rows > &  x 
)
inlinestatic

calculates ret = matrix^T * x

◆ multTransposedMatrix()

template<typename K , int rows, int cols>
static void Dune::FMatrixHelp::multTransposedMatrix ( const FieldMatrix< K, rows, cols > &  matrix,
FieldMatrix< K, cols, cols > &  ret 
)
inlinestatic

calculates ret= A_t*A