Reference documentation for deal.II version 8.5.1
Public Member Functions | Private Attributes | List of all members
InverseMatrixRichardson< VectorType > Class Template Reference

#include <deal.II/lac/matrix_lib.h>

Inheritance diagram for InverseMatrixRichardson< VectorType >:
[legend]

Public Member Functions

 InverseMatrixRichardson (SolverControl &control, VectorMemory< VectorType > &mem)
 
 ~InverseMatrixRichardson ()
 
template<typename MatrixType , typename PreconditionerType >
void initialize (const MatrixType &, const PreconditionerType &)
 
SolverControlcontrol () 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 ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (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 ::ExceptionBaseExcInUse (int arg1, char *arg2, std::string &arg3)
 
static ::ExceptionBaseExcNoSubscriber (char *arg1, char *arg2)
 

Detailed Description

template<typename VectorType>
class InverseMatrixRichardson< VectorType >

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.

Note
A more powerful version of this class is provided by the IterativeInverse class.
Instantiations for this template are provided for <float> and <double>; others can be generated in application programs (see the section on Template instantiations in the manual).
Deprecated:
If deal.II was configured with C++11 support, use the LinearOperator class instead, see the module on linear operators for further details.
Author
Guido Kanschat, 2005

Definition at line 440 of file matrix_lib.h.

Constructor & Destructor Documentation

◆ InverseMatrixRichardson()

template<typename VectorType >
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()

template<typename VectorType >
InverseMatrixRichardson< VectorType >::~InverseMatrixRichardson ( )

Since we use two pointers, we must implement a destructor.

Member Function Documentation

◆ initialize()

template<typename VectorType >
template<typename MatrixType , typename PreconditionerType >
void InverseMatrixRichardson< VectorType >::initialize ( const MatrixType &  m,
const PreconditionerType &  p 
)
inline

Initialization function. Provide a solver object, a matrix, and another preconditioner for this.

Definition at line 747 of file matrix_lib.h.

◆ control()

template<typename VectorType >
SolverControl& InverseMatrixRichardson< VectorType >::control ( ) const

Access to the SolverControl object used by the solver.

◆ vmult()

template<typename VectorType >
void InverseMatrixRichardson< VectorType >::vmult ( VectorType &  ,
const VectorType &   
) const

Execute solver.

◆ vmult_add()

template<typename VectorType >
void InverseMatrixRichardson< VectorType >::vmult_add ( VectorType &  ,
const VectorType &   
) const

Execute solver.

◆ Tvmult()

template<typename VectorType >
void InverseMatrixRichardson< VectorType >::Tvmult ( VectorType &  ,
const VectorType &   
) const

Execute transpose solver.

◆ Tvmult_add()

template<typename VectorType >
void InverseMatrixRichardson< VectorType >::Tvmult_add ( VectorType &  ,
const VectorType &   
) const

Execute transpose solver.

Member Data Documentation

◆ mem

template<typename VectorType >
VectorMemory<VectorType>& InverseMatrixRichardson< VectorType >::mem
private

A reference to the provided VectorMemory object.

Definition at line 490 of file matrix_lib.h.

◆ solver

template<typename VectorType >
SolverRichardson<VectorType> InverseMatrixRichardson< VectorType >::solver
mutableprivate

The solver object.

Definition at line 495 of file matrix_lib.h.

◆ matrix

template<typename VectorType >
PointerMatrixBase<VectorType>* InverseMatrixRichardson< VectorType >::matrix
private

The matrix in use.

Definition at line 500 of file matrix_lib.h.

◆ precondition

template<typename VectorType >
PointerMatrixBase<VectorType>* InverseMatrixRichardson< VectorType >::precondition
private

The preconditioner to use.

Definition at line 505 of file matrix_lib.h.


The documentation for this class was generated from the following file: