dune-common  2.3.1
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
void eigenValuesLapackCall (const char *jobz, const char *uplo, const long int *n, double *a, const long int *lda, double *w, double *work, const long int *lwork, long int *info)
void eigenValuesNonsymLapackCall (const char *jobvl, const char *jobvr, const long int *n, double *a, const long int *lda, double *wr, double *wi, double *vl, const long int *ldvl, double *vr, const long int *ldvr, double *work, const long int *lwork, const long int *info)
template<typename K >
static void eigenValues (const FieldMatrix< K, 1, 1 > &matrix, FieldVector< K, 1 > &eigenvalues)
 calculates the eigenvalues of a symmetric field matrix
template<typename K >
static void eigenValues (const FieldMatrix< K, 2, 2 > &matrix, FieldVector< K, 2 > &eigenvalues)
 calculates the eigenvalues of a symmetric field matrix
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 , class C >
static void eigenValuesNonSym (const FieldMatrix< K, dim, dim > &matrix, FieldVector< C, dim > &eigenValues)
 calculates the eigenvalues of a symmetric field matrix

Function Documentation

template<typename K >
static void Dune::FMatrixHelp::eigenValues ( const FieldMatrix< K, 1, 1 > &  matrix,
FieldVector< K, 1 > &  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
template<typename K >
static void Dune::FMatrixHelp::eigenValues ( const FieldMatrix< K, 2, 2 > &  matrix,
FieldVector< K, 2 > &  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
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
LAPACK::dsyev is used to calculate the eigenvalues

References DUNE_THROW, and eigenValuesLapackCall().

void Dune::FMatrixHelp::eigenValuesLapackCall ( const char *  jobz,
const char *  uplo,
const long int *  n,
double *  a,
const long int *  lda,
double *  w,
double *  work,
const long int *  lwork,
long int *  info 
)

References DUNE_THROW.

Referenced by eigenValues().

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 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 eigen values

References DUNE_THROW, and eigenValuesNonsymLapackCall().

void Dune::FMatrixHelp::eigenValuesNonsymLapackCall ( const char *  jobvl,
const char *  jobvr,
const long int *  n,
double *  a,
const long int *  lda,
double *  wr,
double *  wi,
double *  vl,
const long int *  ldvl,
double *  vr,
const long int *  ldvr,
double *  work,
const long int *  lwork,
const long int *  info 
)

References DUNE_THROW.

Referenced by eigenValuesNonSym().

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

Referenced by invertMatrix_retTransposed().

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

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

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

References invertMatrix().

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

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

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

References Dune::DenseMatrixHelp::multAssign().

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

Referenced by multTransposed().

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

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

References multAssignTransposed().

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