Reference documentation for deal.II version 8.5.1
|
#include <deal.II/lac/matrix_lib.h>
Public Member Functions | |
InverseMatrixRichardson (SolverControl &control, VectorMemory< VectorType > &mem) | |
~InverseMatrixRichardson () | |
template<typename MatrixType , typename PreconditionerType > | |
void | initialize (const MatrixType &, const PreconditionerType &) |
SolverControl & | control () const |
void | vmult (VectorType &, const VectorType &) const |
void | vmult_add (VectorType &, const VectorType &) const |
void | Tvmult (VectorType &, const VectorType &) const |
void | Tvmult_add (VectorType &, const VectorType &) const |
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 | |
VectorMemory< VectorType > & | mem |
SolverRichardson< VectorType > | solver |
PointerMatrixBase< VectorType > * | matrix |
PointerMatrixBase< VectorType > * | precondition |
Additional Inherited Members | |
Static Public Member Functions inherited from Subscriptor | |
static ::ExceptionBase & | ExcInUse (int arg1, char *arg2, std::string &arg3) |
static ::ExceptionBase & | ExcNoSubscriber (char *arg1, char *arg2) |
Objects of this type represent the inverse of a matrix as computed approximately by using the SolverRichardson iterative solver. In other words, if you set up an object of the current type for a matrix \(A\), then calling the vmult() function with arguments \(v,w\) amounts to setting \(w=A^{-1}v\) by solving the linear system \(Aw=v\) using the Richardson solver with a preconditioner that can be chosen. Similarly, this class allows to also multiple with the transpose of the inverse (i.e., the inverse of the transpose) using the function SolverRichardson::Tsolve().
The functions vmult() and Tvmult() approximate the inverse iteratively starting with the vector dst
. Functions vmult_add() and Tvmult_add() start the iteration with a zero vector. All of the matrix- vector multiplication functions expect that the Richardson solver with the given preconditioner actually converge. If the Richardson solver does not converge within the specified number of iterations, the exception that will result in the solver will simply be propagated to the caller of the member function of the current class.
<float> and <double>
; others can be generated in application programs (see the section on Template instantiations in the manual).Definition at line 440 of file matrix_lib.h.
InverseMatrixRichardson< VectorType >::InverseMatrixRichardson | ( | SolverControl & | control, |
VectorMemory< VectorType > & | mem | ||
) |
Constructor, initializing the solver with a control and memory object. The inverted matrix and the preconditioner are added in initialize().
InverseMatrixRichardson< VectorType >::~InverseMatrixRichardson | ( | ) |
Since we use two pointers, we must implement a destructor.
|
inline |
Initialization function. Provide a solver object, a matrix, and another preconditioner for this.
Definition at line 747 of file matrix_lib.h.
SolverControl& InverseMatrixRichardson< VectorType >::control | ( | ) | const |
Access to the SolverControl object used by the solver.
void InverseMatrixRichardson< VectorType >::vmult | ( | VectorType & | , |
const VectorType & | |||
) | const |
Execute solver.
void InverseMatrixRichardson< VectorType >::vmult_add | ( | VectorType & | , |
const VectorType & | |||
) | const |
Execute solver.
void InverseMatrixRichardson< VectorType >::Tvmult | ( | VectorType & | , |
const VectorType & | |||
) | const |
Execute transpose solver.
void InverseMatrixRichardson< VectorType >::Tvmult_add | ( | VectorType & | , |
const VectorType & | |||
) | const |
Execute transpose solver.
|
private |
A reference to the provided VectorMemory object.
Definition at line 490 of file matrix_lib.h.
|
mutableprivate |
The solver object.
Definition at line 495 of file matrix_lib.h.
|
private |
The matrix in use.
Definition at line 500 of file matrix_lib.h.
|
private |
The preconditioner to use.
Definition at line 505 of file matrix_lib.h.