- Home
- About DUNE
- Download
- Documentation
- Community
- Development
Matrix and Vector classes that support a block recursive structure capable of representing the natural structure from Finite Element discretisations. More...
![]() |
Classes | |
class | Dune::BCRSMatrix< B, A > |
A sparse block matrix with compressed row storage. More... | |
class | Dune::BDMatrix< B, A > |
A block-diagonal matrix. More... | |
class | Dune::BTDMatrix< B, A > |
A block-tridiagonal matrix. More... | |
class | Dune::BlockVector< B, A > |
A vector of blocks with memory management. More... | |
class | Dune::Matrix< T, A > |
A generic dynamic dense matrix. More... | |
struct | Dune::MatMultMatResult< M1, M2 > |
Helper TMP to get the result type of a sparse matrix matrix multiplication ( ![]() | |
struct | Dune::MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > > |
struct | Dune::MatMultMatResult< BCRSMatrix< FieldMatrix< T, n, k >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > > |
struct | Dune::CheckIfDiagonalPresent< Matrix, blocklevel, l > |
Check whether the a matrix has diagonal values on blocklevel recursion levels. More... | |
struct | Dune::CheckIfDiagonalPresent< Matrix, 0, l > |
struct | Dune::CheckIfDiagonalPresent< MultiTypeBlockMatrix< T1, T2, T3, T4, T5, T6, T7, T8, T9 >, blocklevel, l > |
class | Dune::VariableBlockVector< B, A > |
A Vector of blocks with different blocksizes. More... | |
Modules | |
Block Recursive Iterative Kernels | |
Files | |
file | io.hh |
Some generic functions for pretty printing vectors and matrices. | |
file | matrixmatrix.hh |
provides functions for sparse matrix matrix multiplication. | |
file | matrixutils.hh |
Some handy generic functions for ISTL matrices. | |
Typedefs | |
typedef BCRSMatrix < FieldMatrix< T, n, m >, A > ::CreateIterator | Dune::@22::SparsityPatternInitializer::CreateIterator |
typedef BCRSMatrix < FieldMatrix< T, n, m >, A > ::size_type | Dune::@22::SparsityPatternInitializer::size_type |
typedef Dune::BCRSMatrix < FieldMatrix< T, n, m >, TA > | Dune::@22::MatrixInitializer::Matrix |
typedef Matrix::CreateIterator | Dune::@22::MatrixInitializer::CreateIterator |
typedef Matrix::size_type | Dune::@22::MatrixInitializer::size_type |
typedef Dune::BCRSMatrix < Dune::FieldMatrix< T, n, m > , TA > | Dune::@22::MatrixInitializer< 1, T, TA, n, m >::Matrix |
typedef Matrix::CreateIterator | Dune::@22::MatrixInitializer< 1, T, TA, n, m >::CreateIterator |
typedef Matrix::size_type | Dune::@22::MatrixInitializer< 1, T, TA, n, m >::size_type |
typedef BCRSMatrix < FieldMatrix< T, n, m >, A > | Dune::@22::EntryAccumulatorFather::Matrix |
typedef Matrix::RowIterator | Dune::@22::EntryAccumulatorFather::Row |
typedef Matrix::ColIterator | Dune::@22::EntryAccumulatorFather::Col |
typedef Matrix::size_type | Dune::@22::EntryAccumulator::size_type |
typedef Matrix::size_type | Dune::@22::EntryAccumulator< T, A, n, m, 0 >::size_type |
typedef Matrix::size_type | Dune::@22::EntryAccumulator< T, A, n, m, 1 >::size_type |
typedef Matrix::size_type | Dune::@22::EntryAccumulator< T, A, n, m, 2 >::size_type |
Functions | |
template<class V > | |
void | Dune::recursive_printvector (std::ostream &s, const V &v, std::string rowtext, int &counter, int columns, int width, int precision) |
template<class K , int n> | |
void | Dune::recursive_printvector (std::ostream &s, const FieldVector< K, n > &v, std::string rowtext, int &counter, int columns, int width, int precision) |
template<class V > | |
void | Dune::printvector (std::ostream &s, const V &v, std::string title, std::string rowtext, int columns=1, int width=10, int precision=2) |
print an ISTL vector | |
void | Dune::fill_row (std::ostream &s, int m, int width, int precision) |
print a row of zeros for a non-existing block | |
template<class M > | |
void | Dune::print_row (std::ostream &s, const M &A, typename M::size_type I, typename M::size_type J, typename M::size_type therow, int width, int precision) |
print one row of a matrix | |
template<class K , int n, int m> | |
void | Dune::print_row (std::ostream &s, const FieldMatrix< K, n, m > &A, typename FieldMatrix< K, n, m >::size_type I, typename FieldMatrix< K, n, m >::size_type J, typename FieldMatrix< K, n, m >::size_type therow, int width, int precision) |
print one row of a matrix, specialization for FieldMatrix | |
template<class K > | |
void | Dune::print_row (std::ostream &s, const FieldMatrix< K, 1, 1 > &A, typename FieldMatrix< K, 1, 1 >::size_type I, typename FieldMatrix< K, 1, 1 >::size_type J, typename FieldMatrix< K, 1, 1 >::size_type therow, int width, int precision) |
print one row of a matrix, specialization for FieldMatrix<K,1,1> | |
template<class M > | |
void | Dune::printmatrix (std::ostream &s, const M &A, std::string title, std::string rowtext, int width=10, int precision=2) |
Prints a generic block matrix. | |
template<class B , int n, int m, class A > | |
void | Dune::printSparseMatrix (std::ostream &s, const BCRSMatrix< FieldMatrix< B, n, m >, A > &mat, std::string title, std::string rowtext, int width=3, int precision=2) |
Prints a BCRSMatrix with fixed sized blocks. | |
template<class FieldType , int rows, int cols> | |
void | Dune::writeMatrixToMatlabHelper (const FieldMatrix< FieldType, rows, cols > &matrix, int rowOffset, int colOffset, std::ostream &s) |
Helper method for the writeMatrixToMatlab routine. | |
template<class MatrixType > | |
void | Dune::writeMatrixToMatlabHelper (const MatrixType &matrix, int externalRowOffset, int externalColOffset, std::ostream &s) |
Helper method for the writeMatrixToMatlab routine. | |
template<class MatrixType > | |
void | Dune::writeMatrixToMatlab (const MatrixType &matrix, const std::string &filename) |
Writes sparse matrix in a Matlab-readable format. | |
template<class T , class A , class A1 , class A2 , int n, int m, int k> | |
void | Dune::matMultTransposeMat (BCRSMatrix< FieldMatrix< T, n, k >, A > &res, const BCRSMatrix< FieldMatrix< T, n, m >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool tryHard=false) |
Calculate product of a sparse matrix with a transposed sparse matrices ( ![]() | |
template<class T , class A , class A1 , class A2 , int n, int m, int k> | |
void | Dune::matMultMat (BCRSMatrix< FieldMatrix< T, n, m >, A > &res, const BCRSMatrix< FieldMatrix< T, n, k >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool tryHard=false) |
Calculate product of two sparse matrices ( ![]() | |
template<class T , class A , class A1 , class A2 , int n, int m, int k> | |
void | Dune::transposeMatMultMat (BCRSMatrix< FieldMatrix< T, n, m >, A > &res, const BCRSMatrix< FieldMatrix< T, k, n >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool tryHard=false) |
Calculate product of a transposed sparse matrix with another sparse matrices ( ![]() | |
template<class M > | |
int | Dune::countNonZeros (const M &matrix) |
Get the number of nonzero fields in the matrix. | |
Variables | |
Matrix & mat | |
Col col |
Matrix and Vector classes that support a block recursive structure capable of representing the natural structure from Finite Element discretisations.
The interface of our matrices is designed according to what they represent from a mathematical point of view. The vector classes are representations of vector spaces:
The matrix classes represent linear maps from vector space
to vector space
the recursive block structure of the matrix rows and columns immediately follows from the recursive block structure of the vectors representing the domain and range of the mapping, respectively:
typedef Matrix::ColIterator Dune::EntryAccumulatorFather< T, A, n, m >::Col [inherited] |
typedef BCRSMatrix<FieldMatrix<T,n,m>,A>::CreateIterator Dune::SparsityPatternInitializer< T, A, n, m >::CreateIterator [inherited] |
typedef Matrix::CreateIterator Dune::MatrixInitializer< transpose, T, TA, n, m >::CreateIterator [inherited] |
typedef Matrix::CreateIterator Dune::MatrixInitializer< 1, T, TA, n, m >::CreateIterator [inherited] |
typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulatorFather< T, A, n, m >::Matrix [inherited] |
typedef Dune::BCRSMatrix<Dune::FieldMatrix<T,n,m>,TA> Dune::MatrixInitializer< 1, T, TA, n, m >::Matrix [inherited] |
typedef Dune::BCRSMatrix<FieldMatrix<T,n,m>,TA> Dune::MatrixInitializer< transpose, T, TA, n, m >::Matrix [inherited] |
typedef Matrix::RowIterator Dune::EntryAccumulatorFather< T, A, n, m >::Row [inherited] |
typedef Matrix::size_type Dune::MatrixInitializer< 1, T, TA, n, m >::size_type [inherited] |
typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 2 >::size_type [inherited] |
typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 0 >::size_type [inherited] |
typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, transpose >::size_type [inherited] |
typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 1 >::size_type [inherited] |
typedef Matrix::size_type Dune::MatrixInitializer< transpose, T, TA, n, m >::size_type [inherited] |
typedef BCRSMatrix<FieldMatrix<T,n,m>,A>::size_type Dune::SparsityPatternInitializer< T, A, n, m >::size_type [inherited] |
int Dune::countNonZeros | ( | const M & | matrix | ) | [inline] |
Get the number of nonzero fields in the matrix.
This is not the number of nonzero blocks, but the number of non zero scalar entries (on blocklevel 1) if the matrix is viewed as a flat matrix.
For FieldMatrix this is simply the number of columns times the number of rows, for a BCRSMatrix<FieldMatrix<K,n,m>> this is the number of nonzero blocks time n*m.
References count.
Referenced by Dune::Amg::MatrixHierarchy< M, PI, A >::build().
void Dune::fill_row | ( | std::ostream & | s, | |
int | m, | |||
int | width, | |||
int | precision | |||
) | [inline] |
print a row of zeros for a non-existing block
#include <dune/istl/io.hh>
Referenced by Dune::print_row().
void Dune::matMultMat | ( | BCRSMatrix< FieldMatrix< T, n, m >, A > & | res, | |
const BCRSMatrix< FieldMatrix< T, n, k >, A1 > & | mat, | |||
const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt, | |||
bool | tryHard = false | |||
) |
void Dune::matMultTransposeMat | ( | BCRSMatrix< FieldMatrix< T, n, k >, A > & | res, | |
const BCRSMatrix< FieldMatrix< T, n, m >, A1 > & | mat, | |||
const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt, | |||
bool | tryHard = false | |||
) |
void Dune::print_row | ( | std::ostream & | s, | |
const M & | A, | |||
typename M::size_type | I, | |||
typename M::size_type | J, | |||
typename M::size_type | therow, | |||
int | width, | |||
int | precision | |||
) |
print one row of a matrix
#include <dune/istl/io.hh>
References Dune::fill_row().
Referenced by Dune::printmatrix().
void Dune::print_row | ( | std::ostream & | s, | |
const FieldMatrix< K, n, m > & | A, | |||
typename FieldMatrix< K, n, m >::size_type | I, | |||
typename FieldMatrix< K, n, m >::size_type | J, | |||
typename FieldMatrix< K, n, m >::size_type | therow, | |||
int | width, | |||
int | precision | |||
) |
print one row of a matrix, specialization for FieldMatrix
#include <dune/istl/io.hh>
void Dune::print_row | ( | std::ostream & | s, | |
const FieldMatrix< K, 1, 1 > & | A, | |||
typename FieldMatrix< K, 1, 1 >::size_type | I, | |||
typename FieldMatrix< K, 1, 1 >::size_type | J, | |||
typename FieldMatrix< K, 1, 1 >::size_type | therow, | |||
int | width, | |||
int | precision | |||
) |
print one row of a matrix, specialization for FieldMatrix<K,1,1>
#include <dune/istl/io.hh>
void Dune::printmatrix | ( | std::ostream & | s, | |
const M & | A, | |||
std::string | title, | |||
std::string | rowtext, | |||
int | width = 10 , |
|||
int | precision = 2 | |||
) |
Prints a generic block matrix.
#include <dune/istl/io.hh>
References Dune::print_row().
Referenced by Dune::redistributeMatrixEntries(), and test_IO().
void Dune::printSparseMatrix | ( | std::ostream & | s, | |
const BCRSMatrix< FieldMatrix< B, n, m >, A > & | mat, | |||
std::string | title, | |||
std::string | rowtext, | |||
int | width = 3 , |
|||
int | precision = 2 | |||
) |
Prints a BCRSMatrix with fixed sized blocks.
#include <dune/istl/io.hh>
Only the nonzero entries will be printed as matrix blocks together with their corresponding column index and all others will be omitted.
This might be preferable over printmatrix in the case of big sparse matrices with nonscalar blocks.
s | The ostream to print to. | |
mat | The matrix to print. | |
title | The title for the matrix. | |
rowtext | The text to prepend to each print out of a matrix row. | |
width | The number of nonzero blocks to print in one line. | |
precision | The precision to use when printing the numbers. |
References A, Dune::Matrix< T, A >::begin(), col, count, Dune::Matrix< T, A >::end(), Dune::Matrix< T, A >::M(), mat, Dune::Matrix< T, A >::N(), and row.
void Dune::printvector | ( | std::ostream & | s, | |
const V & | v, | |||
std::string | title, | |||
std::string | rowtext, | |||
int | columns = 1 , |
|||
int | width = 10 , |
|||
int | precision = 2 | |||
) |
print an ISTL vector
#include <dune/istl/io.hh>
References Dune::recursive_printvector().
Referenced by test_IO().
void Dune::recursive_printvector | ( | std::ostream & | s, | |
const FieldVector< K, n > & | v, | |||
std::string | rowtext, | |||
int & | counter, | |||
int | columns, | |||
int | width, | |||
int | precision | |||
) |
#include <dune/istl/io.hh>
void Dune::recursive_printvector | ( | std::ostream & | s, | |
const V & | v, | |||
std::string | rowtext, | |||
int & | counter, | |||
int | columns, | |||
int | width, | |||
int | precision | |||
) |
#include <dune/istl/io.hh>
Referenced by Dune::printvector().
void Dune::transposeMatMultMat | ( | BCRSMatrix< FieldMatrix< T, n, m >, A > & | res, | |
const BCRSMatrix< FieldMatrix< T, k, n >, A1 > & | mat, | |||
const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt, | |||
bool | tryHard = false | |||
) |
void Dune::writeMatrixToMatlab | ( | const MatrixType & | matrix, | |
const std::string & | filename | |||
) |
Writes sparse matrix in a Matlab-readable format.
#include <dune/istl/io.hh>
This routine writes the argument BCRSMatrix to a file with the name given by the filename argument. The file format is ASCII, with no header, and three data columns. Each row describes a scalar matrix entry and consists of the matrix row and column numbers (both counted starting from 1), and the matrix entry. Such a file can be read from Matlab using the command
new_mat = spconvert(load('filename'));
References Dune::writeMatrixToMatlabHelper().
void Dune::writeMatrixToMatlabHelper | ( | const MatrixType & | matrix, | |
int | externalRowOffset, | |||
int | externalColOffset, | |||
std::ostream & | s | |||
) |
Helper method for the writeMatrixToMatlab routine.
#include <dune/istl/io.hh>
References row, and Dune::writeMatrixToMatlabHelper().
void Dune::writeMatrixToMatlabHelper | ( | const FieldMatrix< FieldType, rows, cols > & | matrix, | |
int | rowOffset, | |||
int | colOffset, | |||
std::ostream & | s | |||
) |
Helper method for the writeMatrixToMatlab routine.
#include <dune/istl/io.hh>
This specialization for FieldMatrices ends the recursion
Referenced by Dune::writeMatrixToMatlab(), and Dune::writeMatrixToMatlabHelper().
Matrix& A |
Referenced by Dune::DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix< K, n, n >, Al >, X, Y >::apply(), Dune::SuperLUMatrix< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::operator const SuperMatrix &(), Dune::SuperLUMatrix< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::operator SuperMatrix &(), Dune::printSparseMatrix(), Dune::readMatrixMarket(), Dune::DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix< K, n, n >, Al >, X, Y >::setSubMatrix(), test_FieldMatrix(), test_Interface(), test_IO(), and test_Iter().
Col col |
Referenced by Dune::Amg::BaseGalerkinProduct::calculate(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::ILUSubdomainSolver< M, X, Y >::copyToLocalMatrix(), Dune::copyToSuperMatrix(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::copyValue(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::countEntries(), Dune::OverlappingAssignerILUBase< M, X, Y >::operator()(), Dune::OverlappingAssigner< SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > > >::operator()(), Dune::OverlappingAssigner< DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix< K, n, n >, Al >, X, Y > >::operator()(), Dune::printSparseMatrix(), Dune::redistributeSparsityPattern(), Dune::Amg::DirichletBoundarySetter< T >::set(), test_Interface(), and Dune::writeCompColMatrixToMatlab().
Col Dune::EntryAccumulatorFather< T, A, n, m >::col [protected, inherited] |
std::size_t count |
Matrix& mat |
Referenced by Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::addRowNnz(), Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::apply(), Dune::SeqOverlappingSchwarzAssembler< SuperLU< T > >::assembleLocalProblems(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::calcColstart(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::copyValue(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::createMatrix(), Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::free(), Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::nnz(), Dune::OverlappingAssigner< SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > > >::operator()(), Dune::OverlappingAssigner< DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix< K, n, n >, Al >, X, Y > >::operator()(), Dune::printSparseMatrix(), Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::setMatrix(), Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::setSubMatrix(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::SuperMatrixInitializer(), Dune::writeCompColMatrixToMatlab(), and Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >::~SuperLU().
Matrix& Dune::EntryAccumulatorFather< T, A, n, m >::mat [protected, inherited] |
Row row |
Referenced by Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::addRowNnz(), Dune::Amg::BaseGalerkinProduct::calculate(), Dune::CheckIfDiagonalPresent< Matrix, 0, l >::check(), Dune::CheckIfDiagonalPresent< Matrix, blocklevel, l >::check(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::copyToSuperMatrix(), Dune::SuperMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A > >::copyValue(), Dune::MatrixIndexSet::import(), Dune::OverlappingSchwarzInitializer< I, S, D >::IndexMap::insert(), Dune::printSparseMatrix(), Dune::redistributeSparsityPattern(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::rowdim(), Dune::SeqOverlappingSchwarz< M, X, TM, TD, TA >::SeqOverlappingSchwarz(), Dune::Amg::DirichletBoundarySetter< T >::set(), test_Interface(), Dune::writeCompColMatrixToMatlab(), and Dune::writeMatrixToMatlabHelper().
CreateIterator rowiter |
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].