Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IncompleteLUT< _Scalar > Class Template Reference

Incomplete LU factorization with dual-threshold strategy During the numerical factorization, two dropping rules are used : 1) any element whose magnitude is less than some tolerance is dropped. This tolerance is obtained by multiplying the input tolerance droptol by the average magnitude of all the original elements in the current row. 2) After the elimination of the row, only the fill largest elements in the L part and the fill largest elements in the U part are kept (in addition to the diagonal element ). Note that fill is computed from the input parameter fillfactor which is used the ratio to control the fill_in relatively to the initial number of nonzero elements. More...

#include <IncompleteLUT.h>

Inherits noncopyable.

Classes

struct  keep_diag

Public Types

typedef Matrix< Scalar,
Dynamic, Dynamic
MatrixType

Public Member Functions

template<typename Rhs , typename Dest >
void _solve (const Rhs &b, Dest &x) const
template<typename MatrixType >
void analyzePattern (const MatrixType &amat)
template<typename _MatrixType >
void analyzePattern (const _MatrixType &amat)
Index cols () const
template<typename MatrixType >
IncompleteLUT< Scalar > & compute (const MatrixType &amat)
template<typename MatrixType >
void factorize (const MatrixType &amat)
template<typename _MatrixType >
void factorize (const _MatrixType &amat)
 IncompleteLUT ()
template<typename MatrixType >
 IncompleteLUT (const MatrixType &mat, RealScalar droptol=NumTraits< Scalar >::dummy_precision(), int fillfactor=10)
ComputationInfo info () const
 Reports whether previous computation was successful.
Index rows () const
void setDroptol (RealScalar droptol)
void setFillfactor (int fillfactor)
template<typename Rhs >
const internal::solve_retval
< IncompleteLUT, Rhs > 
solve (const MatrixBase< Rhs > &b) const

Protected Member Functions

template<typename VectorV , typename VectorI >
int QuickSplit (VectorV &row, VectorI &ind, int ncut)

Protected Attributes

bool m_analysisIsOk
RealScalar m_droptol
bool m_factorizationIsOk
int m_fillfactor
ComputationInfo m_info
bool m_isInitialized
FactorType m_lu
PermutationMatrix< Dynamic,
Dynamic, Index > 
m_P
PermutationMatrix< Dynamic,
Dynamic, Index > 
m_Pinv

Detailed Description

template<typename _Scalar>
class Eigen::IncompleteLUT< _Scalar >

Incomplete LU factorization with dual-threshold strategy During the numerical factorization, two dropping rules are used : 1) any element whose magnitude is less than some tolerance is dropped. This tolerance is obtained by multiplying the input tolerance droptol by the average magnitude of all the original elements in the current row. 2) After the elimination of the row, only the fill largest elements in the L part and the fill largest elements in the U part are kept (in addition to the diagonal element ). Note that fill is computed from the input parameter fillfactor which is used the ratio to control the fill_in relatively to the initial number of nonzero elements.

The two extreme cases are when droptol=0 (to keep all the fill*2 largest elements) and when fill=n/2 with droptol being different to zero.

References : Yousef Saad, ILUT: A dual threshold incomplete LU factorization, Numerical Linear Algebra with Applications, 1(4), pp 387-402, 1994.

NOTE : The following implementation is derived from the ILUT implementation in the SPARSKIT package, Copyright (C) 2005, the Regents of the University of Minnesota released under the terms of the GNU LGPL; see http://www-users.cs.umn.edu/~saad/software/SPARSKIT/README for more details.

Member Typedef Documentation

typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType

Constructor & Destructor Documentation

IncompleteLUT ( )
inline
IncompleteLUT ( const MatrixType mat,
RealScalar  droptol = NumTraits<Scalar>::dummy_precision(),
int  fillfactor = 10 
)
inline

Member Function Documentation

void _solve ( const Rhs &  b,
Dest &  x 
) const
inline
void analyzePattern ( const MatrixType amat)
void analyzePattern ( const _MatrixType &  amat)
Index cols ( void  ) const
inline
IncompleteLUT<Scalar>& compute ( const MatrixType amat)
inline

Compute an incomplete LU factorization with dual threshold on the matrix mat No pivoting is done in this version

References IncompleteLUT< _Scalar >::analyzePattern(), eigen_assert, IncompleteLUT< _Scalar >::factorize(), IncompleteLUT< _Scalar >::m_factorizationIsOk, and IncompleteLUT< _Scalar >::m_isInitialized.

Referenced by IncompleteLUT< _Scalar >::IncompleteLUT().

void factorize ( const MatrixType amat)
void factorize ( const _MatrixType &  amat)
ComputationInfo info ( ) const
inline

Reports whether previous computation was successful.

Returns
Success if computation was succesful, NumericalIssue if the matrix.appears to be negative.

References eigen_assert, IncompleteLUT< _Scalar >::m_info, and IncompleteLUT< _Scalar >::m_isInitialized.

int QuickSplit ( VectorV &  row,
VectorI &  ind,
int  ncut 
)
protected

Compute a quick-sort split of a vector On output, the vector row is permuted such that its elements satisfy abs(row(i)) >= abs(row(ncut)) if i<ncut abs(row(i)) <= abs(row(ncut)) if i>ncut

Parameters
rowThe vector of values
indThe array of index for the elements in row
ncutThe number of largest elements to keep

References abs(), and row().

Index rows ( void  ) const
inline
void setDroptol ( RealScalar  droptol)

Set control parameter droptol

Parameters
droptolDrop any element whose magnitude is less than this tolerance
void setFillfactor ( int  fillfactor)

Set control parameter fillfactor

Parameters
fillfactorThis is used to compute the number fill_in of largest elements to keep on each row.
const internal::solve_retval<IncompleteLUT, Rhs> solve ( const MatrixBase< Rhs > &  b) const
inline

Member Data Documentation

bool m_analysisIsOk
protected
RealScalar m_droptol
protected
bool m_factorizationIsOk
protected
int m_fillfactor
protected
ComputationInfo m_info
protected
bool m_isInitialized
protected
FactorType m_lu
protected
PermutationMatrix<Dynamic,Dynamic,Index> m_P
protected
PermutationMatrix<Dynamic,Dynamic,Index> m_Pinv
protected

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