ug4
Small Algebra

Classes

class  ug::DenseMatrix< TStorage >
 
class  ug::DenseVector< TStorage >
 
struct  ug::matrix_algebra_type_traits< T >
 
struct  ug::matrix_algebra_type_traits< DenseMatrix< T > >
 
class  ug::TE_TRANSPOSED< T >
 

Functions

template<typename T >
double ug::GetDet2 (const DenseMatrix< T > &mat)
 
template<typename T >
double ug::GetDet3 (const DenseMatrix< T > &mat)
 
bool ug::GetInverse (DenseMatrix< FixedArray2< double, 1, 1 > > &inv, const DenseMatrix< FixedArray2< double, 1, 1 > > &mat)
 
bool ug::GetInverse (DenseMatrix< FixedArray2< double, 2, 2 > > &inv, const DenseMatrix< FixedArray2< double, 2, 2 > > &mat)
 
bool ug::GetInverse (DenseMatrix< FixedArray2< double, 3, 3 > > &inv, const DenseMatrix< FixedArray2< double, 3, 3 > > &mat)
 
template<typename T , size_t TBlockSize, eMatrixOrdering TOrdering>
bool ug::GetInverse (DenseMatrixInverse< FixedArray2< T, TBlockSize, TBlockSize, TOrdering > > &inv, const DenseMatrix< FixedArray2< T, TBlockSize, TBlockSize, TOrdering > > &mat)
 
template<typename T , eMatrixOrdering TOrdering>
bool ug::GetInverse (DenseMatrixInverse< VariableArray2< T, TOrdering > > &inv, const DenseMatrix< VariableArray2< T, TOrdering > > &mat)
 
template<typename T >
bool ug::GetInverse1 (DenseMatrix< T > &inv, const DenseMatrix< T > &mat)
 
template<typename T >
bool ug::GetInverse2 (DenseMatrix< T > &inv, const DenseMatrix< T > &mat)
 
template<typename T >
bool ug::GetInverse3 (DenseMatrix< T > &inv, const DenseMatrix< T > &mat)
 
bool ug::InverseMatMult (DenseVector< FixedArray1< double, 1 > > &dest, double beta1, const DenseMatrix< FixedArray2< double, 1, 1 > > &A1, const DenseVector< FixedArray1< double, 1 > > &w1)
 
template<typename T >
bool ug::InverseMatMult (DenseVector< FixedArray1< double, 2 > > &dest, double beta, const DenseMatrix< FixedArray2< double, 2, 2 > > &mat, const DenseVector< FixedArray1< double, 2 > > &vec)
 
template<typename T >
bool ug::InverseMatMult (DenseVector< FixedArray1< double, 3 > > &dest, double beta, const DenseMatrix< FixedArray2< double, 3, 3 > > &mat, const DenseVector< FixedArray1< double, 3 > > &vec)
 
template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult (DenseVector< vector_t > &dest, double beta, const DenseMatrix< matrix_t > &mat, const DenseVector< vector_t > &vec)
 
template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult1 (DenseVector< vector_t > &dest, double beta1, const DenseMatrix< matrix_t > &A1, const DenseVector< vector_t > &w1)
 
template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult2 (DenseVector< vector_t > &dest, double beta, const DenseMatrix< matrix_t > &mat, const DenseVector< vector_t > &vec)
 
template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult3 (DenseVector< vector_t > &dest, double beta, const DenseMatrix< matrix_t > &mat, const DenseVector< vector_t > &vec)
 
template<typename vector_t , typename matrix_t >
bool ug::InverseMatMultN (DenseVector< vector_t > &dest, double beta, const DenseMatrix< matrix_t > &mat, const DenseVector< vector_t > &vec)
 
bool ug::Invert (DenseMatrix< FixedArray2< double, 1, 1 > > &mat)
 
bool ug::Invert (DenseMatrix< FixedArray2< double, 2, 2 > > &mat)
 
bool ug::Invert (DenseMatrix< FixedArray2< double, 3, 3 > > &mat)
 
template<typename T >
bool ug::Invert (DenseMatrix< T > &mat)
 
template<typename T >
bool ug::Invert1 (DenseMatrix< T > &mat)
 
template<typename T >
bool ug::Invert2 (DenseMatrix< T > &mat)
 
bool ug::Invert3 (DenseMatrix< FixedArray2< double, 3, 3 > > &mat)
 
bool ug::Invert3 (DenseMatrix< VariableArray2< double > > &mat)
 
template<typename vector_t , typename matrix_t >
void ug::MatMult (DenseVector< vector_t > &dest, const number &beta1, const DenseMatrix< matrix_t > &A1, const DenseVector< vector_t > &w1)
 calculates dest = beta1 * A1 * w1; More...
 
template<typename vector_t , typename matrix_t >
void ug::MatMult (DenseVector< vector_t > &dest, const number &beta1, const DenseMatrixInverse< matrix_t > &A1, const DenseVector< vector_t > &w1)
 calculates dest = beta1 * A1; More...
 
template<typename vector_t , typename matrix_t >
void ug::MatMultAdd (DenseVector< vector_t > &dest, const number &alpha1, const DenseVector< vector_t > &v1, const number &beta1, const DenseMatrix< matrix_t > &A1, const DenseVector< vector_t > &w1)
 calculates dest = alpha1*v1 + beta1 * A1 *w1; More...
 
template<typename vector_t , typename matrix_t >
void ug::MatMultAdd (DenseVector< vector_t > &dest, const number &alpha1, const DenseVector< vector_t > &v1, const number &beta1, const DenseMatrixInverse< matrix_t > &A1, const DenseVector< vector_t > &w1)
 calculates dest = alpha1*v1 + beta1 * A1 *w1; More...
 
template<typename vector_t , typename matrix_t >
void ug::MatMultTransposedAdd (DenseVector< vector_t > &dest, const number &alpha1, const DenseVector< vector_t > &v1, const number &beta1, const DenseMatrix< matrix_t > &A1, const DenseVector< vector_t > &w1)
 calculates dest = alpha1*v1 + beta1 * A1^T *w1; More...
 
template<typename TStorage >
DenseMatrix< TStorage > ug::MatrixTranspose (const DenseMatrix< TStorage > &A)
 
double ug::MatrixTranspose (const double &b)
 
template<typename TStorage >
DenseVector< TStorage > ug::operator* (double alpha, const DenseVector< TStorage > &vec)
 
template<typename TStorage >
DenseMatrix< TStorage > ug::operator* (number a, const DenseMatrix< TStorage > &b)
 
template<typename TStorage >
bool ug::operator< (double alpha, const DenseVector< TStorage > &vec)
 
template<typename TStorage >
bool ug::operator<= (double alpha, const DenseVector< TStorage > &vec)
 
template<typename TStorage >
bool ug::operator> (double alpha, const DenseVector< TStorage > &vec)
 
template<typename TStorage >
bool ug::operator>= (double alpha, const DenseVector< TStorage > &vec)
 
const double & ug::te_transpose (const double &t)
 
template<typename T >
TE_TRANSPOSED< T > ug::te_transpose (const T &t)
 
double & ug::te_transpose (double &t)
 

Detailed Description

Function Documentation

◆ GetDet2()

template<typename T >
double ug::GetDet2 ( const DenseMatrix< T > &  mat)
inline

◆ GetDet3()

template<typename T >
double ug::GetDet3 ( const DenseMatrix< T > &  mat)
inline

References UG_ASSERT.

Referenced by ug::GetInverse3(), and ug::InverseMatMult3().

◆ GetInverse() [1/5]

bool ug::GetInverse ( DenseMatrix< FixedArray2< double, 1, 1 > > &  inv,
const DenseMatrix< FixedArray2< double, 1, 1 > > &  mat 
)
inline

References ug::GetInverse1().

◆ GetInverse() [2/5]

bool ug::GetInverse ( DenseMatrix< FixedArray2< double, 2, 2 > > &  inv,
const DenseMatrix< FixedArray2< double, 2, 2 > > &  mat 
)
inline

References ug::GetInverse2().

◆ GetInverse() [3/5]

bool ug::GetInverse ( DenseMatrix< FixedArray2< double, 3, 3 > > &  inv,
const DenseMatrix< FixedArray2< double, 3, 3 > > &  mat 
)
inline

References ug::GetInverse3().

◆ GetInverse() [4/5]

template<typename T , size_t TBlockSize, eMatrixOrdering TOrdering>
bool ug::GetInverse ( DenseMatrixInverse< FixedArray2< T, TBlockSize, TBlockSize, TOrdering > > &  inv,
const DenseMatrix< FixedArray2< T, TBlockSize, TBlockSize, TOrdering > > &  mat 
)
inline

◆ GetInverse() [5/5]

template<typename T , eMatrixOrdering TOrdering>
bool ug::GetInverse ( DenseMatrixInverse< VariableArray2< T, TOrdering > > &  inv,
const DenseMatrix< VariableArray2< T, TOrdering > > &  mat 
)
inline

◆ GetInverse1()

template<typename T >
bool ug::GetInverse1 ( DenseMatrix< T > &  inv,
const DenseMatrix< T > &  mat 
)
inline

Referenced by ug::GetInverse().

◆ GetInverse2()

template<typename T >
bool ug::GetInverse2 ( DenseMatrix< T > &  inv,
const DenseMatrix< T > &  mat 
)
inline

References ug::GetDet2(), and UG_ASSERT.

Referenced by ug::GetInverse().

◆ GetInverse3()

template<typename T >
bool ug::GetInverse3 ( DenseMatrix< T > &  inv,
const DenseMatrix< T > &  mat 
)
inline

References ug::GetDet3(), and UG_ASSERT.

Referenced by ug::GetInverse(), and ug::Invert3().

◆ InverseMatMult() [1/4]

bool ug::InverseMatMult ( DenseVector< FixedArray1< double, 1 > > &  dest,
double  beta1,
const DenseMatrix< FixedArray2< double, 1, 1 > > &  A1,
const DenseVector< FixedArray1< double, 1 > > &  w1 
)
inline

References ug::InverseMatMult1().

◆ InverseMatMult() [2/4]

template<typename T >
bool ug::InverseMatMult ( DenseVector< FixedArray1< double, 2 > > &  dest,
double  beta,
const DenseMatrix< FixedArray2< double, 2, 2 > > &  mat,
const DenseVector< FixedArray1< double, 2 > > &  vec 
)
inline

References ug::InverseMatMult2().

◆ InverseMatMult() [3/4]

template<typename T >
bool ug::InverseMatMult ( DenseVector< FixedArray1< double, 3 > > &  dest,
double  beta,
const DenseMatrix< FixedArray2< double, 3, 3 > > &  mat,
const DenseVector< FixedArray1< double, 3 > > &  vec 
)
inline

References ug::InverseMatMult3().

◆ InverseMatMult() [4/4]

template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult ( DenseVector< vector_t > &  dest,
double  beta,
const DenseMatrix< matrix_t > &  mat,
const DenseVector< vector_t > &  vec 
)
inline

◆ InverseMatMult1()

template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult1 ( DenseVector< vector_t > &  dest,
double  beta1,
const DenseMatrix< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

References UG_ASSERT.

Referenced by ug::InverseMatMult().

◆ InverseMatMult2()

template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult2 ( DenseVector< vector_t > &  dest,
double  beta,
const DenseMatrix< matrix_t > &  mat,
const DenseVector< vector_t > &  vec 
)
inline

References ug::GetDet2(), and UG_ASSERT.

Referenced by ug::InverseMatMult().

◆ InverseMatMult3()

template<typename vector_t , typename matrix_t >
bool ug::InverseMatMult3 ( DenseVector< vector_t > &  dest,
double  beta,
const DenseMatrix< matrix_t > &  mat,
const DenseVector< vector_t > &  vec 
)
inline

References ug::GetDet3(), and UG_ASSERT.

Referenced by ug::InverseMatMult().

◆ InverseMatMultN()

template<typename vector_t , typename matrix_t >
bool ug::InverseMatMultN ( DenseVector< vector_t > &  dest,
double  beta,
const DenseMatrix< matrix_t > &  mat,
const DenseVector< vector_t > &  vec 
)
inline

References ug::GetInverse(), and ug::MatMult().

Referenced by ug::InverseMatMult().

◆ Invert() [1/4]

bool ug::Invert ( DenseMatrix< FixedArray2< double, 1, 1 > > &  mat)
inline

References ug::Invert1().

◆ Invert() [2/4]

bool ug::Invert ( DenseMatrix< FixedArray2< double, 2, 2 > > &  mat)
inline

References ug::Invert2().

◆ Invert() [3/4]

bool ug::Invert ( DenseMatrix< FixedArray2< double, 3, 3 > > &  mat)
inline

References ug::Invert3().

◆ Invert() [4/4]

template<typename T >
bool ug::Invert ( DenseMatrix< T > &  mat)
inline

◆ Invert1()

template<typename T >
bool ug::Invert1 ( DenseMatrix< T > &  mat)

Referenced by ug::Invert().

◆ Invert2()

template<typename T >
bool ug::Invert2 ( DenseMatrix< T > &  mat)

References ug::GetDet2().

Referenced by ug::Invert().

◆ Invert3() [1/2]

bool ug::Invert3 ( DenseMatrix< FixedArray2< double, 3, 3 > > &  mat)
inline

References ug::GetInverse3().

Referenced by ug::Invert().

◆ Invert3() [2/2]

bool ug::Invert3 ( DenseMatrix< VariableArray2< double > > &  mat)
inline

References ug::GetInverse3().

◆ MatMult() [1/2]

template<typename vector_t , typename matrix_t >
void ug::MatMult ( DenseVector< vector_t > &  dest,
const number beta1,
const DenseMatrix< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

calculates dest = beta1 * A1 * w1;

References ug::MatMult(), and ug::MatMultAdd().

◆ MatMult() [2/2]

template<typename vector_t , typename matrix_t >
void ug::MatMult ( DenseVector< vector_t > &  dest,
const number beta1,
const DenseMatrixInverse< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

calculates dest = beta1 * A1;

References ug::DenseMatrixInverse< TStorage >::apply(), and ug::VecScaleAssign().

◆ MatMultAdd() [1/2]

template<typename vector_t , typename matrix_t >
void ug::MatMultAdd ( DenseVector< vector_t > &  dest,
const number alpha1,
const DenseVector< vector_t > &  v1,
const number beta1,
const DenseMatrix< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

calculates dest = alpha1*v1 + beta1 * A1 *w1;

References ug::MatMultAdd(), and ug::VecScaleAssign().

◆ MatMultAdd() [2/2]

template<typename vector_t , typename matrix_t >
void ug::MatMultAdd ( DenseVector< vector_t > &  dest,
const number alpha1,
const DenseVector< vector_t > &  v1,
const number beta1,
const DenseMatrixInverse< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

calculates dest = alpha1*v1 + beta1 * A1 *w1;

References ug::DenseMatrixInverse< TStorage >::apply(), and ug::VecScaleAdd().

◆ MatMultTransposedAdd()

template<typename vector_t , typename matrix_t >
void ug::MatMultTransposedAdd ( DenseVector< vector_t > &  dest,
const number alpha1,
const DenseVector< vector_t > &  v1,
const number beta1,
const DenseMatrix< matrix_t > &  A1,
const DenseVector< vector_t > &  w1 
)
inline

calculates dest = alpha1*v1 + beta1 * A1^T *w1;

References ug::MatMultTransposedAdd(), and ug::VecScaleAssign().

◆ MatrixTranspose() [1/2]

template<typename TStorage >
DenseMatrix<TStorage> ug::MatrixTranspose ( const DenseMatrix< TStorage > &  A)

Referenced by ug::checksub().

◆ MatrixTranspose() [2/2]

double ug::MatrixTranspose ( const double &  b)
inline

◆ operator*() [1/2]

template<typename TStorage >
DenseVector<TStorage> ug::operator* ( double  alpha,
const DenseVector< TStorage > &  vec 
)
inline

References alpha.

◆ operator*() [2/2]

template<typename TStorage >
DenseMatrix<TStorage> ug::operator* ( number  a,
const DenseMatrix< TStorage > &  b 
)

◆ operator<()

template<typename TStorage >
bool ug::operator< ( double  alpha,
const DenseVector< TStorage > &  vec 
)
inline

References alpha.

◆ operator<=()

template<typename TStorage >
bool ug::operator<= ( double  alpha,
const DenseVector< TStorage > &  vec 
)
inline

References alpha.

◆ operator>()

template<typename TStorage >
bool ug::operator> ( double  alpha,
const DenseVector< TStorage > &  vec 
)
inline

References alpha.

◆ operator>=()

template<typename TStorage >
bool ug::operator>= ( double  alpha,
const DenseVector< TStorage > &  vec 
)
inline

References alpha.

◆ te_transpose() [1/3]

const double& ug::te_transpose ( const double &  t)
inline

◆ te_transpose() [2/3]

template<typename T >
TE_TRANSPOSED<T> ug::te_transpose ( const T &  t)
inline

◆ te_transpose() [3/3]

double& ug::te_transpose ( double &  t)
inline