Matrix.hpp File Reference
#include <algorithm>
#include <ostream>
#include <vector>
#include <boost/bind.hpp>
#include <dune/common/fvector.hh>
#include <opm/common/ErrorMacros.hpp>
#include <opm/porsol/common/fortran.hpp>
#include <opm/porsol/common/blas_lapack.hpp>
Include dependency graph for Matrix.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Opm::OwnData< T >
 FullMatrix StoragePolicy which provides object owning semantics. More...
 
class  Opm::SharedData< T >
 FullMatrix StoragePolicy which provides object sharing semantics. More...
 
class  Opm::ImmutableSharedData< T >
 FullMatrix StoragePolicy which provides immutable object sharing semantics. More...
 

Namespaces

namespace  Opm
 

Typedefs

typedef FullMatrix< double, OwnData, COrdering > Opm::OwnCMatrix
 Convenience typedefs for C-ordered. More...
 
typedef FullMatrix< double, SharedData, COrdering > Opm::SharedCMatrix
 
typedef const FullMatrix< double, ImmutableSharedData, COrdering > Opm::ImmutableCMatrix
 
typedef FullMatrix< double, OwnData, FortranOrdering > Opm::OwnFortranMatrix
 Convenience typedefs for Fortran-ordered. More...
 
typedef FullMatrix< double, SharedData, FortranOrdering > Opm::SharedFortranMatrix
 
typedef const FullMatrix< double, ImmutableSharedData, FortranOrdering > Opm::ImmutableFortranMatrix
 

Functions

template<class Matrix >
void Opm::zero (Matrix &A)
 Zero-fill a. More...
 
template<class Matrix >
void Opm::eye (Matrix &A)
 Make an identity. More...
 
template<class Matrix >
Matrix::value_type Opm::trace (const Matrix &A)
 Compute matrix trace (i.e., sum(diag(A))). More...
 
template<class Matrix , int rows>
Dune::FieldVector< typename Matrix::value_type, rows > Opm::prod (const Matrix &A, const Dune::FieldVector< typename Matrix::value_type, rows > &x)
 Matrix applied to a vector. More...
 
template<class Matrix1 , class Matrix2 , class MutableMatrix >
void Opm::prod (const Matrix1 &A, const Matrix2 &B, MutableMatrix &C)
 Compute C = AB. C must not overlap with A or B. More...
 
template<typename T , template< typename > class StoragePolicy>
int Opm::orthogonalizeColumns (FullMatrix< T, StoragePolicy, FortranOrdering > &A)
 Construct orthonormal basis for matrix range (i.e., column space). Based on a QR factorization of the matrix. More...
 
template<typename T , template< typename > class StoragePolicy, class OrderingPolicy >
int Opm::invert (FullMatrix< T, StoragePolicy, OrderingPolicy > &A)
 Matrix inversion, $A \leftarrow A^{-1} $. More...
 
template<typename T , template< typename > class StoragePolicy>
void Opm::symmetricUpdate (const T &a1, const FullMatrix< T, StoragePolicy, FortranOrdering > &A, const T &a2, FullMatrix< T, StoragePolicy, FortranOrdering > &C)
 Symmetric, rank $ k $ update of symmetric matrix. Specifically, $ C \leftarrow a_1 AA^{\mathsf{T}} + a_2 C
   $. More...
 
template<typename T , template< typename > class StoragePolicy>
void Opm::symmetricUpdate (const FullMatrix< T, StoragePolicy, FortranOrdering > &A, FullMatrix< T, StoragePolicy, FortranOrdering > &B)
 
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const std::vector< T > &x, const T &a2, std::vector< T > &y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_T (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const std::vector< T > &x, const T &a2, std::vector< T > &y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y
   $. More...
 
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_T (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y
   $. More...
 
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N (const T &a1, const FullMatrix< T, SP, COrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. Overload for C-ordered FullMatrix type. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NT (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB^{\mathsf{T}} + a_2C
   $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_TN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1A^{\mathsf{T}}B + a_2C
   $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, COrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $. Overload for C-ordered matrix $ B $. More...
 
template<class charT , class traits , typename T , template< typename > class SP, class OP >
std::basic_ostream< charT, traits > & Opm::operator<< (std::basic_ostream< charT, traits > &os, const FullMatrix< T, SP, OP > &A)
 Stream output operator for. More...