
Public Types | |
| typedef PreconditionRelaxation < MATRIX > | BaseClass |
Public Member Functions | |
| void | initialize (const MATRIX &A, const typename BaseClass::AdditionalData ¶meters=typename BaseClass::AdditionalData()) |
| template<class VECTOR > | |
| void | vmult (VECTOR &, const VECTOR &) const |
| template<class VECTOR > | |
| void | Tvmult (VECTOR &, const VECTOR &) const |
| template<class VECTOR > | |
| void | step (VECTOR &x, const VECTOR &rhs) const |
| template<class VECTOR > | |
| void | Tstep (VECTOR &x, const VECTOR &rhs) const |
Private Attributes | |
| std::vector< unsigned int > | pos_right_of_diagonal |
SSOR preconditioner using matrix built-in function. The MATRIX class used is required to have a function precondition_SSOR(VECTOR&, const VECTOR&, double)
// Declare related objects SparseMatrix<double> A; Vector<double> x; Vector<double> b; SolverCG<> solver(...); //...initialize and build A // Define and initialize preconditioner PreconditionSSOR<SparseMatrix<double> > precondition; precondition.initialize (A, .6); solver.solve (A, x, b, precondition);
Definition at line 560 of file precondition.h.
| typedef PreconditionRelaxation<MATRIX> PreconditionSSOR< MATRIX >::BaseClass |
A typedef to the base class.
Definition at line 567 of file precondition.h.
| void PreconditionSSOR< MATRIX >::initialize | ( | const MATRIX & | A, |
| const typename BaseClass::AdditionalData & | parameters = typename BaseClass::AdditionalData() |
||
| ) |
Initialize matrix and relaxation parameter. The matrix is just stored in the preconditioner object. The relaxation parameter should be larger than zero and smaller than 2 for numerical reasons. It defaults to 1.
| void PreconditionSSOR< MATRIX >::vmult | ( | VECTOR & | , |
| const VECTOR & | |||
| ) | const |
Apply preconditioner.
| void PreconditionSSOR< MATRIX >::Tvmult | ( | VECTOR & | , |
| const VECTOR & | |||
| ) | const |
Apply transpose preconditioner. Since this is a symmetric preconditioner, this function is the same as vmult().
| void PreconditionSSOR< MATRIX >::step | ( | VECTOR & | x, |
| const VECTOR & | rhs | ||
| ) | const |
Perform one step of the preconditioned Richardson iteration
| void PreconditionSSOR< MATRIX >::Tstep | ( | VECTOR & | x, |
| const VECTOR & | rhs | ||
| ) | const |
Perform one transposed step of the preconditioned Richardson iteration.
std::vector<unsigned int> PreconditionSSOR< MATRIX >::pos_right_of_diagonal [private] |
An array that stores for each matrix row where the first position after the diagonal is located.
Definition at line 622 of file precondition.h.
documentation generated on Fri Feb 3 2012 06:04:10 by
doxygen
1.7.2