Reference documentation for deal.II version 8.5.1
|
#include <deal.II/lac/matrix_lib.h>
Public Member Functions | |
ProductMatrix () | |
ProductMatrix (VectorMemory< VectorType > &mem) | |
template<typename MatrixType1 , typename MatrixType2 > | |
ProductMatrix (const MatrixType1 &m1, const MatrixType2 &m2, VectorMemory< VectorType > &mem) | |
~ProductMatrix () | |
template<typename MatrixType1 , typename MatrixType2 > | |
void | reinit (const MatrixType1 &m1, const MatrixType2 &m2) |
template<typename MatrixType1 , typename MatrixType2 > | |
void | initialize (const MatrixType1 &m1, const MatrixType2 &m2, VectorMemory< VectorType > &mem) |
void | clear () |
virtual void | vmult (VectorType &w, const VectorType &v) const |
virtual void | Tvmult (VectorType &w, const VectorType &v) const |
virtual void | vmult_add (VectorType &w, const VectorType &v) const |
virtual void | Tvmult_add (VectorType &w, const VectorType &v) const |
Public Member Functions inherited from PointerMatrixBase< VectorType > | |
virtual | ~PointerMatrixBase () |
Public Member Functions inherited from Subscriptor | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (Subscriptor &&) |
void | subscribe (const char *identifier=0) const |
void | unsubscribe (const char *identifier=0) const |
unsigned int | n_subscriptions () const |
void | list_subscribers () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
PointerMatrixBase< VectorType > * | m1 |
PointerMatrixBase< VectorType > * | m2 |
SmartPointer< VectorMemory< VectorType >, ProductMatrix< VectorType > > | mem |
Additional Inherited Members | |
Public Types inherited from PointerMatrixBase< VectorType > | |
typedef VectorType::value_type | value_type |
Static Public Member Functions inherited from Subscriptor | |
static ::ExceptionBase & | ExcInUse (int arg1, char *arg2, std::string &arg3) |
static ::ExceptionBase & | ExcNoSubscriber (char *arg1, char *arg2) |
Poor man's matrix product of two quadratic matrices. Stores two quadratic matrices m1 and m2 of arbitrary types and implements matrix-vector multiplications for the product M1M2 by performing multiplication with both factors consecutively. Because the types of the matrices are opaque (i.e., they can be arbitrary), you can stack products of three or more matrices by making one of the two matrices an object of the current type handles be a ProductMatrix itself.
Here is an example multiplying two different FullMatrix objects:
Definition at line 55 of file matrix_lib.h.
ProductMatrix< VectorType >::ProductMatrix | ( | ) |
Standard constructor. Matrices and the memory pool must be added later using initialize().
Definition at line 591 of file matrix_lib.h.
ProductMatrix< VectorType >::ProductMatrix | ( | VectorMemory< VectorType > & | mem | ) |
Constructor only assigning the memory pool. Matrices must be added by reinit() later.
Definition at line 597 of file matrix_lib.h.
ProductMatrix< VectorType >::ProductMatrix | ( | const MatrixType1 & | m1, |
const MatrixType2 & | m2, | ||
VectorMemory< VectorType > & | mem | ||
) |
Constructor. Additionally to the two constituting matrices, a memory pool for the auxiliary vector must be provided.
Definition at line 604 of file matrix_lib.h.
ProductMatrix< VectorType >::~ProductMatrix | ( | ) |
Destructor.
Definition at line 642 of file matrix_lib.h.
void ProductMatrix< VectorType >::reinit | ( | const MatrixType1 & | m1, |
const MatrixType2 & | m2 | ||
) |
Change the matrices.
Definition at line 617 of file matrix_lib.h.
void ProductMatrix< VectorType >::initialize | ( | const MatrixType1 & | m1, |
const MatrixType2 & | m2, | ||
VectorMemory< VectorType > & | mem | ||
) |
Change the matrices and memory pool.
Definition at line 629 of file matrix_lib.h.
|
virtual |
Reset the object to its original state.
Implements PointerMatrixBase< VectorType >.
Definition at line 651 of file matrix_lib.h.
|
virtual |
Matrix-vector product w = m1 * m2 * v.
Implements PointerMatrixBase< VectorType >.
Definition at line 662 of file matrix_lib.h.
|
virtual |
Transposed matrix-vector product w = m2T * m1T * v.
Implements PointerMatrixBase< VectorType >.
Definition at line 694 of file matrix_lib.h.
|
virtual |
Adding matrix-vector product w += m1 * m2 * v
Implements PointerMatrixBase< VectorType >.
Definition at line 678 of file matrix_lib.h.
|
virtual |
Adding, transposed matrix-vector product w += m2T * m1T * v.
Implements PointerMatrixBase< VectorType >.
Definition at line 710 of file matrix_lib.h.
|
private |
The left matrix of the product.
Definition at line 131 of file matrix_lib.h.
|
private |
The right matrix of the product.
Definition at line 136 of file matrix_lib.h.
|
private |
Memory for auxiliary vector.
Definition at line 141 of file matrix_lib.h.