Reference documentation for deal.II version Git cd4c9c4 2014-11-26 12:07:54 -0600
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Attributes | List of all members
PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION > Class Template Reference

#include <deal.II/lac/precondition.h>

Inheritance diagram for PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >:
[legend]

Public Member Functions

 PreconditionLACSolver ()
 
void initialize (SOLVER &, const MATRIX &, const PRECONDITION &)
 
template<class VECTOR >
void vmult (VECTOR &, const VECTOR &) 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"<< "(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

SmartPointer< SOLVER,
PreconditionLACSolver< SOLVER,
MATRIX, PRECONDITION > > 
solver
 
SmartPointer< const MATRIX,
PreconditionLACSolver< SOLVER,
MATRIX, PRECONDITION > > 
matrix
 
SmartPointer< const
PRECONDITION,
PreconditionLACSolver< SOLVER,
MATRIX, PRECONDITION > > 
precondition
 

Detailed Description

template<class SOLVER, class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
class PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >

Deprecated:
This class has been superseded by IterativeInverse, which is more flexible and easier to use.

Preconditioner using an iterative solver. This preconditioner uses a fully initialized LAC iterative solver for the approximate inverse of the matrix. Naturally, this solver needs another preconditionig method.

Usually, the use of ReductionControl is preferred over the use of the basic SolverControl in defining this solver.

Krylov space methods like SolverCG or SolverBicgstab become inefficient if soution down to machine accuracy is needed. This is due to the fact, that round-off errors spoil the orthogonality of the vector sequences. Therefore, a nested iteration of two methods is proposed: The outer method is SolverRichardson, since it is robust with respect to round-of errors. The inner loop is an appropriate Krylov space method, since it is fast.

// Declare related objects
ReductionControl inner_control (10, 1.e-30, 1.e-2)
SolverCG<Vector<double> > inner_iteration (inner_control, mem);
PreconditionSSOR <SparseMatrix<double> > inner_precondition;
inner_precondition.initialize (A, 1.2);
PreconditionLACSolver precondition;
precondition.initialize (inner_iteration, A, inner_precondition);
SolverControl outer_control(100, 1.e-16);
SolverRichardson<Vector<double> > outer_iteration;
outer_iteration.solve (A, x, b, precondition);

Each time we call the inner loop, reduction of the residual by a factor 1.e-2 is attempted. Since the right hand side vector of the inner iteration is the residual of the outer loop, the relative errors are far from machine accuracy, even if the errors of the outer loop are in the range of machine accuracy.

Author
Guido Kanschat, 1999

Definition at line 704 of file precondition.h.

Constructor & Destructor Documentation

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::PreconditionLACSolver ( )

Constructor. All work is done in initialize.

Member Function Documentation

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
void PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::initialize ( SOLVER ,
const MATRIX ,
const PRECONDITION &   
)

Initialization function. Provide a solver object, a matrix, and another preconditioner for this.

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
template<class VECTOR >
void PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::vmult ( VECTOR &  ,
const VECTOR &   
) const

Execute preconditioning.

Member Data Documentation

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
SmartPointer<SOLVER,PreconditionLACSolver<SOLVER,MATRIX,PRECONDITION> > PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::solver
private

The solver object to use.

Definition at line 730 of file precondition.h.

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
SmartPointer<const MATRIX,PreconditionLACSolver<SOLVER,MATRIX,PRECONDITION> > PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::matrix
private

The matrix in use.

Definition at line 735 of file precondition.h.

template<class SOLVER , class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
SmartPointer<const PRECONDITION,PreconditionLACSolver<SOLVER,MATRIX,PRECONDITION> > PreconditionLACSolver< SOLVER, MATRIX, PRECONDITION >::precondition
private

The preconditioner to use.

Definition at line 740 of file precondition.h.


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