![]() |
Reference documentation for deal.II version 8.1.0
|
#include <precondition.h>
Public Types | |
typedef void(MATRIX::* | function_ptr) (VECTOR &, const VECTOR &) const |
Public Member Functions | |
PreconditionUseMatrix (const MATRIX &M, const function_ptr method) | |
void | vmult (VECTOR &dst, const VECTOR &src) const |
![]() | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (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"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.") | |
DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1) | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
const MATRIX & | matrix |
const function_ptr | precondition |
Preconditioner using a matrix-builtin function. This class forms a preconditioner suitable for the LAC solver classes. Since many preconditioning methods are based on matrix entries, these have to be implemented as member functions of the underlying matrix implementation. This class now is intended to allow easy access to these member functions from LAC solver classes.
It seems that all builtin preconditioners have a relaxation parameter, so please use PreconditionRelaxation for these.
You will usually not want to create a named object of this type, although possible. The most common use is like this:
This creates an unnamed object to be passed as the fourth parameter to the solver function of the SolverGMRES class. It assumes that the SparseMatrix class has a function precondition_Jacobi
taking two vectors (source and destination) as parameters (Actually, there is no function like that, the existing function takes a third parameter, denoting the relaxation parameter; this example is therefore only meant to illustrate the general idea).
Note that due to the default template parameters, the above example could be written shorter as follows:
Definition at line 300 of file precondition.h.
typedef void( MATRIX::* PreconditionUseMatrix< MATRIX, VECTOR >::function_ptr) (VECTOR &, const VECTOR &) const |
Type of the preconditioning function of the matrix.
Definition at line 307 of file precondition.h.
PreconditionUseMatrix< MATRIX, VECTOR >::PreconditionUseMatrix | ( | const MATRIX & | M, |
const function_ptr | method | ||
) |
Constructor. This constructor stores a reference to the matrix object for later use and selects a preconditioning method, which must be a member function of that matrix.
void PreconditionUseMatrix< MATRIX, VECTOR >::vmult | ( | VECTOR & | dst, |
const VECTOR & | src | ||
) | const |
Execute preconditioning. Calls the function passed to the constructor of this object with the two arguments given here.
|
private |
Pointer to the matrix in use.
Definition at line 334 of file precondition.h.
|
private |
Pointer to the preconditioning function.
Definition at line 340 of file precondition.h.