Reference documentation for deal.II version Git c24181c 2014-12-22 23:43:19 +0100
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
RelaxationBlock< MATRIX, inverse_type > Class Template Reference

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

Inheritance diagram for RelaxationBlock< MATRIX, inverse_type >:
[legend]

Classes

class  AdditionalData
 

Public Types

typedef types::global_dof_index size_type
 

Public Member Functions

void initialize (const MATRIX &A, const AdditionalData &parameters)
 
void clear ()
 
bool empty () const
 
value_type el (size_type i, size_type j) const
 
void invert_diagblocks ()
 

Protected Member Functions

template<typename number2 >
void do_step (Vector< number2 > &dst, const Vector< number2 > &prev, const Vector< number2 > &src, const bool backward) const
 
- Protected Member Functions inherited from PreconditionBlockBase< inverse_type >
 PreconditionBlockBase (bool store_diagonals=false, Inversion method=gauss_jordan)
 
 ~PreconditionBlockBase ()
 
void clear ()
 
void reinit (unsigned int nblocks, size_type blocksize, bool compress, Inversion method=gauss_jordan)
 
void inverses_computed (bool are_they)
 
void set_same_diagonal ()
 
bool same_diagonal () const
 
bool store_diagonals () const
 
bool inverses_ready () const
 
bool empty () const
 
unsigned int size () const
 
inverse_type el (size_type i, size_type j) const
 
void inverse_vmult (size_type i, Vector< number2 > &dst, const Vector< number2 > &src) const
 
void inverse_Tvmult (size_type i, Vector< number2 > &dst, const Vector< number2 > &src) const
 
FullMatrix< inverse_type > & inverse (size_type i)
 
const FullMatrix< inverse_type > & inverse (size_type i) const
 
Householder< inverse_type > & inverse_householder (size_type i)
 
const Householder< inverse_type > & inverse_householder (size_type i) const
 
LAPACKFullMatrix< inverse_type > & inverse_svd (size_type i)
 
const LAPACKFullMatrix
< inverse_type > & 
inverse_svd (size_type i) const
 
FullMatrix< inverse_type > & diagonal (size_type i)
 
const FullMatrix< inverse_type > & diagonal (size_type i) const
 
void log_statistics () const
 
std::size_t memory_consumption () const
 
 DeclException0 (ExcDiagonalsNotStored)
 
 DeclException0 (ExcInverseNotAvailable)
 

Protected Attributes

SmartPointer< const MATRIX,
RelaxationBlock< MATRIX,
inverse_type > > 
A
 
SmartPointer< const
AdditionalData,
RelaxationBlock< MATRIX,
inverse_type > > 
additional_data
 
- Protected Attributes inherited from PreconditionBlockBase< inverse_type >
Inversion inversion
 

Private Types

typedef MATRIX::value_type number
 
typedef inverse_type value_type
 

Additional Inherited Members

- Protected Types inherited from PreconditionBlockBase< inverse_type >
enum  Inversion
 
typedef types::global_dof_index size_type
 

Detailed Description

template<class MATRIX, typename inverse_type = typename MATRIX::value_type>
class RelaxationBlock< MATRIX, inverse_type >

Warning
The part of the interface based on BlockList may change in a future release.

Base class for the implementation of overlapping, multiplicative Schwarz relaxation methods and smoothers.

This class uses the infrastructure provided by PreconditionBlockBase. It adds functions to initialize with a block list and to do the relaxation step. The actual relaxation method with the interface expected by SolverRelaxation and MGSmootherRelaxation is in the derived classes.

This class allows for more general relaxation methods than PreconditionBlock, since the index sets may be arbitrary and overlapping, while there only contiguous, disjoint sets of equal size are allowed. As a drawback, this class cannot be used as a preconditioner, since its implementation relies on a straight forward implementation of the Gauss- Seidel process.

Author
Guido Kanschat
Date
2010

Definition at line 54 of file relaxation_block.h.

Member Typedef Documentation

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
typedef MATRIX::value_type RelaxationBlock< MATRIX, inverse_type >::number
private

Define number type of matrix.

Definition at line 61 of file relaxation_block.h.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
typedef inverse_type RelaxationBlock< MATRIX, inverse_type >::value_type
private

Value type for inverse matrices.

Definition at line 66 of file relaxation_block.h.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
typedef types::global_dof_index RelaxationBlock< MATRIX, inverse_type >::size_type

Declare type for container size.

Definition at line 72 of file relaxation_block.h.

Member Function Documentation

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
void RelaxationBlock< MATRIX, inverse_type >::initialize ( const MATRIX A,
const AdditionalData parameters 
)

Initialize matrix and block size. We store the matrix and the block size in the preconditioner object. In a second step, the inverses of the diagonal blocks may be computed.

Additionally, a relaxation parameter for derived classes may be provided.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
void RelaxationBlock< MATRIX, inverse_type >::clear ( )

Deletes the inverse diagonal block matrices if existent, sets the blocksize to 0, hence leaves the class in the state that it had directly after calling the constructor.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
bool RelaxationBlock< MATRIX, inverse_type >::empty ( ) const

Checks whether the object is empty.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
value_type RelaxationBlock< MATRIX, inverse_type >::el ( size_type  i,
size_type  j 
) const

Read-only access to entries. This function is only possible if the inverse diagonal blocks are stored.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
void RelaxationBlock< MATRIX, inverse_type >::invert_diagblocks ( )

Stores the inverse of the diagonal blocks in inverse. This costs some additional memory - for DG methods about 1/3 (for double inverses) or 1/6 (for float inverses) of that used for the matrix - but it makes the preconditioning much faster.

It is not allowed to call this function twice (will produce an error) before a call of clear(...) because at the second time there already exist the inverse matrices.

After this function is called, the lock on the matrix given through the use_matrix function is released, i.e. you may overwrite of delete it. You may want to do this in case you use this matrix to precondition another matrix.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
template<typename number2 >
void RelaxationBlock< MATRIX, inverse_type >::do_step ( Vector< number2 > &  dst,
const Vector< number2 > &  prev,
const Vector< number2 > &  src,
const bool  backward 
) const
protected

Perform one block relaxation step.

Depending on the arguments dst and pref, this performs an SOR step (both reference the same vector) of a Jacobi step (both are different vectors). For the Jacobi step, the calling function must copy dst to pref after this.

Member Data Documentation

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
SmartPointer<const MATRIX,RelaxationBlock<MATRIX,inverse_type> > RelaxationBlock< MATRIX, inverse_type >::A
protected

Pointer to the matrix. Make sure that the matrix exists as long as this class needs it, i.e. until calling invert_diagblocks, or (if the inverse matrices should not be stored) until the last call of the preconditoining vmult function of the derived classes.

Definition at line 212 of file relaxation_block.h.

template<class MATRIX , typename inverse_type = typename MATRIX::value_type>
SmartPointer<const AdditionalData, RelaxationBlock<MATRIX,inverse_type> > RelaxationBlock< MATRIX, inverse_type >::additional_data
protected

Control information.

Definition at line 217 of file relaxation_block.h.


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