Reference documentation for deal.II version 8.4.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 &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
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
 

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 434 of file matrix_lib.h.

Constructor & Destructor Documentation

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().

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

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

Member Function Documentation

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 740 of file matrix_lib.h.

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

Access to the SolverControl object used by the solver.

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

Execute solver.

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

Execute solver.

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

Execute transpose solver.

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

Execute transpose solver.

Member Data Documentation

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

A reference to the provided VectorMemory object.

Definition at line 484 of file matrix_lib.h.

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

The solver object.

Definition at line 489 of file matrix_lib.h.

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

The matrix in use.

Definition at line 494 of file matrix_lib.h.

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

The preconditioner to use.

Definition at line 499 of file matrix_lib.h.


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