![]() |
Reference documentation for deal.II version 8.4.2
|
#include <deal.II/lac/precondition_selector.h>
Public Types | |
| typedef MatrixType::size_type | size_type |
Public Member Functions | |
| PreconditionSelector (const std::string &preconditioning, const typename VectorType::value_type &omega=1.) | |
| virtual | ~PreconditionSelector () |
| void | use_matrix (const MatrixType &M) |
| size_type | m () const |
| size_type | n () const |
| virtual void | vmult (VectorType &dst, const VectorType &src) const |
| virtual void | Tvmult (VectorType &dst, const VectorType &src) const |
| DeclException0 (ExcNoMatrixGivenToUse) | |
Public Member Functions inherited from Subscriptor | |
| 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."<< "\"<< "(Additional information: "<< arg3<< ")\"<< "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) |
Static Public Member Functions | |
| static std::string | get_precondition_names () |
Protected Attributes | |
| std::string | preconditioning |
Private Attributes | |
| SmartPointer< const MatrixType, PreconditionSelector< MatrixType, VectorType > > | A |
| const VectorType::value_type | omega |
Selects the preconditioner. The constructor of this class takes the name of the preconditioning and the damping parameter omega of the preconditioning and the use_matrix function takes the matrix that is used by the matrix-builtin precondition functions. Each time, the operator() function is called, this preselected preconditioner, this matrix and this omega is used for the preconditioning. This class is designed for being used as argument of the solve function of a Solver and it covers the selection of all matrix-builtin precondition functions. The selection of other preconditioners, like BlockSOR or ILU should be handled in derived classes by the user.
The simplest use of this class is the following:
The same example where also the SolverSelector class is used reads
Now the use of the SolverSelector in combination with the PreconditionSelector allows the user to select both, the solver and the preconditioner, at the beginning of his program and each time the solver is started (that is several times e.g. in a nonlinear iteration) this preselected solver and preconditioner is called.
Definition at line 95 of file precondition_selector.h.
| typedef MatrixType::size_type PreconditionSelector< MatrixType, VectorType >::size_type |
Declare type for container size.
Definition at line 101 of file precondition_selector.h.
| PreconditionSelector< MatrixType, VectorType >::PreconditionSelector | ( | const std::string & | preconditioning, |
| const typename VectorType::value_type & | omega = 1. |
||
| ) |
Constructor. omega denotes the damping parameter of the preconditioning.
Definition at line 188 of file precondition_selector.h.
|
virtual |
Destructor.
Definition at line 195 of file precondition_selector.h.
| void PreconditionSelector< MatrixType, VectorType >::use_matrix | ( | const MatrixType & | M | ) |
Takes the matrix that is needed for preconditionings that involves a matrix. e.g. for precondition_jacobi, ~_sor, ~_ssor.
Definition at line 203 of file precondition_selector.h.
|
inline |
Return the dimension of the codomain (or range) space. To remember: the matrix is of dimension
.
Definition at line 211 of file precondition_selector.h.
|
inline |
Return the dimension of the domain space. To remember: the matrix is of dimension
.
Definition at line 220 of file precondition_selector.h.
|
virtual |
Precondition procedure. Calls the preconditioning that was specified in the constructor.
Definition at line 229 of file precondition_selector.h.
|
virtual |
Transpose precondition procedure. Calls the preconditioning that was specified in the constructor.
Definition at line 259 of file precondition_selector.h.
|
static |
Get the names of all implemented preconditionings.
Definition at line 289 of file precondition_selector.h.
|
protected |
Stores the name of the preconditioning.
Definition at line 167 of file precondition_selector.h.
|
private |
Matrix that is used for the matrix-builtin preconditioning function. cf. also PreconditionUseMatrix.
Definition at line 174 of file precondition_selector.h.
|
private |
Stores the damping parameter of the preconditioner.
Definition at line 179 of file precondition_selector.h.
1.8.12