Public Types | Public Member Functions | Private Attributes

PreconditionSSOR< MATRIX > Class Template Reference
[Preconditioners and Relaxation Operators]

Inheritance diagram for PreconditionSSOR< MATRIX >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef PreconditionRelaxation
< MATRIX
BaseClass

Public Member Functions

void initialize (const MATRIX &A, const typename BaseClass::AdditionalData &parameters=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

Detailed Description

template<class MATRIX = SparseMatrix<double>>
class PreconditionSSOR< MATRIX >

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);
Author:
Guido Kanschat, 2000

Definition at line 560 of file precondition.h.


Member Typedef Documentation

template<class MATRIX = SparseMatrix<double>>
typedef PreconditionRelaxation<MATRIX> PreconditionSSOR< MATRIX >::BaseClass

A typedef to the base class.

Definition at line 567 of file precondition.h.


Member Function Documentation

template<class MATRIX = SparseMatrix<double>>
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.

template<class MATRIX = SparseMatrix<double>>
template<class VECTOR >
void PreconditionSSOR< MATRIX >::vmult ( VECTOR &  ,
const VECTOR &   
) const

Apply preconditioner.

template<class MATRIX = SparseMatrix<double>>
template<class VECTOR >
void PreconditionSSOR< MATRIX >::Tvmult ( VECTOR &  ,
const VECTOR &   
) const

Apply transpose preconditioner. Since this is a symmetric preconditioner, this function is the same as vmult().

template<class MATRIX = SparseMatrix<double>>
template<class VECTOR >
void PreconditionSSOR< MATRIX >::step ( VECTOR &  x,
const VECTOR &  rhs 
) const

Perform one step of the preconditioned Richardson iteration

template<class MATRIX = SparseMatrix<double>>
template<class VECTOR >
void PreconditionSSOR< MATRIX >::Tstep ( VECTOR &  x,
const VECTOR &  rhs 
) const

Perform one transposed step of the preconditioned Richardson iteration.


Member Data Documentation

template<class MATRIX = SparseMatrix<double>>
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:10 by doxygen 1.7.2