Reference documentation for deal.II version 9.2.0
|
#include <deal.II/lac/relaxation_block.h>
Classes | |
class | AdditionalData |
Public Types | |
using | size_type = types::global_dof_index |
Public Member Functions | |
void | initialize (const MatrixType &A, const AdditionalData ¶meters) |
void | clear () |
void | invert_diagblocks () |
Protected Member Functions | |
void | do_step (VectorType &dst, const VectorType &prev, const VectorType &src, const bool backward) const |
Protected Member Functions inherited from PreconditionBlockBase< typename MatrixType::value_type > | |
PreconditionBlockBase (bool store_diagonals=false, Inversion method=gauss_jordan) | |
~PreconditionBlockBase ()=default | |
void | clear () |
void | reinit (unsigned int nblocks, size_type blocksize, bool compress, Inversion method=gauss_jordan) |
void | inverses_computed (bool are_they) |
bool | same_diagonal () const |
bool | store_diagonals () const |
bool | inverses_ready () const |
unsigned int | size () 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< typename MatrixType::value_type > & | inverse (size_type i) |
const FullMatrix< typename MatrixType::value_type > & | inverse (size_type i) const |
Householder< typename MatrixType::value_type > & | inverse_householder (size_type i) |
const Householder< typename MatrixType::value_type > & | inverse_householder (size_type i) const |
LAPACKFullMatrix< typename MatrixType::value_type > & | inverse_svd (size_type i) |
const LAPACKFullMatrix< typename MatrixType::value_type > & | inverse_svd (size_type i) const |
FullMatrix< typename MatrixType::value_type > & | diagonal (size_type i) |
const FullMatrix< typename MatrixType::value_type > & | diagonal (size_type i) const |
void | log_statistics () const |
std::size_t | memory_consumption () const |
Protected Attributes | |
SmartPointer< const MatrixType, RelaxationBlock< MatrixType, InverseNumberType, VectorType > > | A |
SmartPointer< const AdditionalData, RelaxationBlock< MatrixType, InverseNumberType, VectorType > > | additional_data |
Protected Attributes inherited from PreconditionBlockBase< typename MatrixType::value_type > | |
Inversion | inversion |
Private Types | |
using | number = typename MatrixType::value_type |
using | value_type = InverseNumberType |
Private Member Functions | |
void | block_kernel (const size_type block_begin, const size_type block_end) |
Additional Inherited Members | |
Protected Types inherited from PreconditionBlockBase< typename MatrixType::value_type > | |
enum | Inversion |
using | size_type = types::global_dof_index |
Static Protected Member Functions inherited from PreconditionBlockBase< typename MatrixType::value_type > | |
static ::ExceptionBase & | ExcDiagonalsNotStored () |
static ::ExceptionBase & | ExcInverseNotAvailable () |
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.
Parallel computations require you to specify an initialized ghost vector in AdditionalData::temp_ghost_vector.
Definition at line 59 of file relaxation_block.h.
|
private |
Define number type of matrix.
Definition at line 65 of file relaxation_block.h.
|
private |
Value type for inverse matrices.
Definition at line 70 of file relaxation_block.h.
using RelaxationBlock< MatrixType, InverseNumberType, VectorType >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 76 of file relaxation_block.h.
void RelaxationBlock< MatrixType, InverseNumberType, VectorType >::initialize | ( | const MatrixType & | A, |
const AdditionalData & | parameters | ||
) |
Initialize matrix and additional information. In a second step, the inverses of the diagonal blocks may be computed.
Note that AdditionalData, different from other preconditioners, defines quite large objects, and that therefore the object is not copied, but rather a pointer is stored. Thus, the lifetime of additional_data
hast to exceed the lifetime of this object.
void RelaxationBlock< MatrixType, InverseNumberType, VectorType >::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.
void RelaxationBlock< MatrixType, InverseNumberType, VectorType >::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.
|
protected |
Perform one block relaxation step.
Depending on the arguments dst
and pref
, this performs an SOR step (both reference the same vector) or a Jacobi step (both are different vectors). For the Jacobi step, the calling function must copy dst
to prev
after this.
|
private |
Computes (the inverse of) a range of blocks.
|
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 preconditioning vmult
function of the derived classes.
Definition at line 255 of file relaxation_block.h.
|
protected |
Control information.
Definition at line 262 of file relaxation_block.h.