Reference documentation for deal.II version 9.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members

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

Inheritance diagram for SparseILU< number >:
[legend]

Public Types

typedef SparseLUDecomposition< number >::size_type size_type
 
typedef SparseLUDecomposition< number >::AdditionalData AdditionalData
 
- Public Types inherited from SparseLUDecomposition< number >
typedef SparseMatrix< number >::size_type size_type
 

Public Member Functions

 SparseILU ()=default
 
template<typename somenumber >
void initialize (const SparseMatrix< somenumber > &matrix, const AdditionalData &parameters=AdditionalData())
 
template<typename somenumber >
void vmult (Vector< somenumber > &dst, const Vector< somenumber > &src) const
 
template<typename somenumber >
void Tvmult (Vector< somenumber > &dst, const Vector< somenumber > &src) const
 
std::size_t memory_consumption () const
 
- Public Member Functions inherited from SparseLUDecomposition< number >
virtual ~SparseLUDecomposition ()=0
 
virtual void clear ()
 
template<typename somenumber >
void initialize (const SparseMatrix< somenumber > &matrix, const AdditionalData parameters)
 
bool empty () const
 
size_type m () const
 
size_type n () const
 
template<class OutVector , class InVector >
void vmult_add (OutVector &dst, const InVector &src) const
 
template<class OutVector , class InVector >
void Tvmult_add (OutVector &dst, const InVector &src) const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (const char *identifier=nullptr) const
 
void unsubscribe (const char *identifier=nullptr) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Static Public Member Functions

static ::ExceptionBaseExcInvalidStrengthening (double arg1)
 
static ::ExceptionBaseExcZeroPivot (size_type arg1)
 
- Static Public Member Functions inherited from SparseLUDecomposition< number >
static ::ExceptionBaseExcInvalidStrengthening (double arg1)
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Additional Inherited Members

- Protected Types inherited from SparseMatrix< number >
typedef types::global_dof_index size_type
 
typedef number value_type
 
typedef numbers::NumberTraits< number >::real_type real_type
 
typedef SparseMatrixIterators::Iterator< number, true > const_iterator
 
typedef SparseMatrixIterators::Iterator< number, false > iterator
 
- Protected Member Functions inherited from SparseLUDecomposition< number >
 SparseLUDecomposition ()
 
template<typename somenumber >
void copy_from (const SparseMatrix< somenumber > &matrix)
 
virtual void strengthen_diagonal_impl ()
 
virtual number get_strengthen_diagonal (const number rowsum, const size_type row) const
 
void prebuild_lower_bound ()
 
- Protected Member Functions inherited from SparseMatrix< number >
void prepare_add ()
 
void prepare_set ()
 
 SparseMatrix ()
 
 SparseMatrix (const SparseMatrix &)
 
 SparseMatrix (SparseMatrix< number > &&m) noexcept
 
 SparseMatrix (const SparsityPattern &sparsity)
 
 SparseMatrix (const SparsityPattern &sparsity, const IdentityMatrix &id)
 
virtual ~SparseMatrix ()
 
SparseMatrix< number > & operator= (const SparseMatrix< number > &)
 
SparseMatrix< number > & operator= (SparseMatrix< number > &&m) noexcept
 
SparseMatrix< number > & operator= (const IdentityMatrix &id)
 
SparseMatrixoperator= (const double d)
 
virtual void reinit (const SparsityPattern &sparsity)
 
bool empty () const
 
size_type m () const
 
size_type n () const
 
size_type get_row_length (const size_type row) const
 
std::size_t n_nonzero_elements () const
 
std::size_t n_actually_nonzero_elements (const double threshold=0.) const
 
const SparsityPatternget_sparsity_pattern () const
 
std::size_t memory_consumption () const
 
void compress (::VectorOperation::values)
 
void set (const size_type i, const size_type j, const number value)
 
template<typename number2 >
void set (const std::vector< size_type > &indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=false)
 
template<typename number2 >
void set (const std::vector< size_type > &row_indices, const std::vector< size_type > &col_indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=false)
 
template<typename number2 >
void set (const size_type row, const std::vector< size_type > &col_indices, const std::vector< number2 > &values, const bool elide_zero_values=false)
 
template<typename number2 >
void set (const size_type row, const size_type n_cols, const size_type *col_indices, const number2 *values, const bool elide_zero_values=false)
 
void add (const size_type i, const size_type j, const number value)
 
template<typename number2 >
void add (const std::vector< size_type > &indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=true)
 
template<typename number2 >
void add (const std::vector< size_type > &row_indices, const std::vector< size_type > &col_indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=true)
 
template<typename number2 >
void add (const size_type row, const std::vector< size_type > &col_indices, const std::vector< number2 > &values, const bool elide_zero_values=true)
 
template<typename number2 >
void add (const size_type row, const size_type n_cols, const size_type *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false)
 
SparseMatrixoperator*= (const number factor)
 
SparseMatrixoperator/= (const number factor)
 
void symmetrize ()
 
template<typename somenumber >
SparseMatrix< number > & copy_from (const SparseMatrix< somenumber > &source)
 
template<typename ForwardIterator >
void copy_from (const ForwardIterator begin, const ForwardIterator end)
 
template<typename somenumber >
void copy_from (const FullMatrix< somenumber > &matrix)
 
SparseMatrix< number > & copy_from (const TrilinosWrappers::SparseMatrix &matrix)
 
template<typename somenumber >
void add (const number factor, const SparseMatrix< somenumber > &matrix)
 
const number & operator() (const size_type i, const size_type j) const
 
number & operator() (const size_type i, const size_type j)
 
number el (const size_type i, const size_type j) const
 
number diag_element (const size_type i) const
 
number & diag_element (const size_type i)
 
template<class OutVector , class InVector >
void vmult (OutVector &dst, const InVector &src) const
 
template<class OutVector , class InVector >
void Tvmult (OutVector &dst, const InVector &src) const
 
template<class OutVector , class InVector >
void vmult_add (OutVector &dst, const InVector &src) const
 
template<class OutVector , class InVector >
void Tvmult_add (OutVector &dst, const InVector &src) const
 
template<typename somenumber >
somenumber matrix_norm_square (const Vector< somenumber > &v) const
 
template<typename somenumber >
somenumber matrix_scalar_product (const Vector< somenumber > &u, const Vector< somenumber > &v) const
 
template<typename somenumber >
somenumber residual (Vector< somenumber > &dst, const Vector< somenumber > &x, const Vector< somenumber > &b) const
 
template<typename numberB , typename numberC >
void mmult (SparseMatrix< numberC > &C, const SparseMatrix< numberB > &B, const Vector< number > &V=Vector< number >(), const bool rebuild_sparsity_pattern=true) const
 
template<typename numberB , typename numberC >
void Tmmult (SparseMatrix< numberC > &C, const SparseMatrix< numberB > &B, const Vector< number > &V=Vector< number >(), const bool rebuild_sparsity_pattern=true) const
 
real_type l1_norm () const
 
real_type linfty_norm () const
 
real_type frobenius_norm () const
 
template<typename somenumber >
void precondition_Jacobi (Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1.) const
 
template<typename somenumber >
void precondition_SSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1., const std::vector< std::size_t > &pos_right_of_diagonal=std::vector< std::size_t >()) const
 
template<typename somenumber >
void precondition_SOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const
 
template<typename somenumber >
void precondition_TSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const
 
template<typename somenumber >
void SSOR (Vector< somenumber > &v, const number omega=1.) const
 
template<typename somenumber >
void SOR (Vector< somenumber > &v, const number om=1.) const
 
template<typename somenumber >
void TSOR (Vector< somenumber > &v, const number om=1.) const
 
template<typename somenumber >
void PSOR (Vector< somenumber > &v, const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation, const number om=1.) const
 
template<typename somenumber >
void TPSOR (Vector< somenumber > &v, const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation, const number om=1.) const
 
template<typename somenumber >
void Jacobi_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const
 
template<typename somenumber >
void SOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const
 
template<typename somenumber >
void TSOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const
 
template<typename somenumber >
void SSOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
const_iterator begin (const size_type r) const
 
iterator begin (const size_type r)
 
const_iterator end (const size_type r) const
 
iterator end (const size_type r)
 
template<class StreamType >
void print (StreamType &out, const bool across=false, const bool diagonal_first=true) const
 
void print_formatted (std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1.) const
 
void print_pattern (std::ostream &out, const double threshold=0.) const
 
void block_write (std::ostream &out) const
 
void block_read (std::istream &in)
 
- Protected Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (const char *identifier=nullptr) const
 
void unsubscribe (const char *identifier=nullptr) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Static Protected Member Functions inherited from SparseMatrix< number >
static ::ExceptionBaseExcInvalidIndex (int arg1, int arg2)
 
static ::ExceptionBaseExcDifferentSparsityPatterns ()
 
static ::ExceptionBaseExcIteratorRange (int arg1, int arg2)
 
static ::ExceptionBaseExcSourceEqualsDestination ()
 
- Static Protected Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Protected Attributes inherited from SparseLUDecomposition< number >
double strengthen_diagonal
 
std::vector< const size_type * > prebuilt_lower_bound
 

Detailed Description

template<typename number>
class SparseILU< number >

This class computes an Incomplete LU (ILU) decomposition of a sparse matrix, using either the same sparsity pattern or a different one. By incomplete we mean that unlike the exact decomposition, the incomplete one is also computed using sparse factors, and entries in the decomposition that do not fit into the given sparsity structure are discarded.

The algorithm used by this class is essentially a copy of the algorithm given in the book Y. Saad: "Iterative methods for sparse linear systems", second edition, in section 10.3.2.

Usage and state management

Refer to SparseLUDecomposition documentation for suggested usage and state management. This class is used in the step-22 tutorial program.

Note
Instantiations for this template are provided for <float> and <double>; others can be generated in application programs (see the section on Template instantiations in the manual).
Author
Wolfgang Bangerth, 2008, 2009; unified interface: Ralf Hartmann

Definition at line 60 of file sparse_ilu.h.

Member Typedef Documentation

◆ size_type

template<typename number>
typedef SparseLUDecomposition<number>::size_type SparseILU< number >::size_type

Declare type for container size.

Definition at line 66 of file sparse_ilu.h.

◆ AdditionalData

template<typename number>
typedef SparseLUDecomposition<number>::AdditionalData SparseILU< number >::AdditionalData

Make SparseLUDecomposition::AdditionalData accessible to this class as well.

Definition at line 82 of file sparse_ilu.h.

Constructor & Destructor Documentation

◆ SparseILU()

template<typename number>
SparseILU< number >::SparseILU ( )
default

Constructor. Does nothing.

Call the initialize function before using this object as preconditioner.

Member Function Documentation

◆ initialize()

template<typename number>
template<typename somenumber >
template void SparseILU< number >::initialize< float > ( const SparseMatrix< somenumber > &  matrix,
const AdditionalData parameters = AdditionalData() 
)

Perform the incomplete LU factorization of the given matrix.

This function needs to be called before an object of this class is used as preconditioner.

For more details about possible parameters, see the class documentation of SparseLUDecomposition and the documentation of the SparseLUDecomposition::AdditionalData class.

According to the parameters, this function creates a new SparsityPattern or keeps the previous sparsity or takes the sparsity given by the user to data. Then, this function performs the LU decomposition.

After this function is called the preconditioner is ready to be used.

◆ vmult()

template<typename number>
template<typename somenumber >
template void SparseILU< number >::vmult< float > ( Vector< somenumber > &  dst,
const Vector< somenumber > &  src 
) const

Apply the incomplete decomposition, i.e. do one forward-backward step \(dst=(LU)^{-1}src\).

The initialize() function needs to be called before.

◆ Tvmult()

template<typename number>
template<typename somenumber >
template void SparseILU< number >::Tvmult< float > ( Vector< somenumber > &  dst,
const Vector< somenumber > &  src 
) const

Apply the transpose of the incomplete decomposition, i.e. do one forward- backward step \(dst=(LU)^{-T}src\).

The initialize() function needs to be called before.

◆ memory_consumption()

template<typename number>
std::size_t SparseILU< number >::memory_consumption ( ) const
virtual

Determine an estimate for the memory consumption (in bytes) of this object.

Reimplemented from SparseLUDecomposition< number >.


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