All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SparseMIC< number > Class Template Reference
Inheritance diagram for SparseMIC< number >:
Inheritance graph
[legend]

Public Types

typedef SparseLUDecomposition
< number >::AdditionalData 
AdditionalData
 

Public Member Functions

 SparseMIC ()
 
 SparseMIC (const SparsityPattern &sparsity) DEAL_II_DEPRECATED
 
virtual ~SparseMIC ()
 
virtual void clear ()
 
void reinit (const SparsityPattern &sparsity) DEAL_II_DEPRECATED
 
template<typename somenumber >
void initialize (const SparseMatrix< somenumber > &matrix, const AdditionalData &parameters=AdditionalData())
 
template<typename somenumber >
void decompose (const SparseMatrix< somenumber > &matrix, const double strengthen_diagonal=0.) DEAL_II_DEPRECATED
 
template<typename somenumber >
void vmult (Vector< somenumber > &dst, const Vector< somenumber > &src) const
 
std::size_t memory_consumption () const
 
 DeclException0 (ExcStrengthenDiagonalTooSmall)
 
 DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 DeclException2 (ExcDecompositionNotStable, int, double,<< "The diagonal element ("<< arg1<<","<< arg1<<") is "<< arg2<<", but must be positive")
 
- Public Member Functions inherited from SparseLUDecomposition< number >
virtual ~SparseLUDecomposition ()=0
 
template<typename somenumber >
void initialize (const SparseMatrix< somenumber > &matrix, const AdditionalData parameters)
 
void reinit (const SparsityPattern &sparsity) DEAL_II_DEPRECATED
 
template<typename somenumber >
void decompose (const SparseMatrix< somenumber > &matrix, const double strengthen_diagonal=0.) DEAL_II_DEPRECATED
 
virtual bool is_decomposed () const DEAL_II_DEPRECATED
 
bool empty () const
 
 DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
- 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 Member Functions

number get_rowsum (const unsigned int row) const
 

Private Attributes

std::vector< number > diag
 
std::vector< number > inv_diag
 
std::vector< number > inner_sums
 

Additional Inherited Members

- Protected Types inherited from SparseMatrix< number >
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 ()
 
 SparseLUDecomposition (const SparsityPattern &sparsity) DEAL_II_DEPRECATED
 
template<typename somenumber >
void copy_from (const SparseMatrix< somenumber > &matrix)
 
virtual void strengthen_diagonal_impl ()
 
virtual number get_strengthen_diagonal (const number rowsum, const unsigned int row) const
 
- Protected Attributes inherited from SparseLUDecomposition< number >
bool decomposed
 
double strengthen_diagonal
 
std::vector< const unsigned int * > prebuilt_lower_bound
 

Detailed Description

template<typename number>
class SparseMIC< number >

Modified incomplete Cholesky (MIC(0)) preconditioner. This class conforms to the state and usage specification in SparseLUDecomposition.

The decomposition

Let a sparse matrix $A$ be in the form $A = - L - U + D$, where $-L$ and $-U$ are strictly lower and upper triangular matrices. The MIC(0) decomposition of the matrix $A$ is defined by $B = (X-L)X^(-1)(X-U)$, where $X$ is a diagonal matrix, defined by the condition $\text{rowsum}(A) = \text{rowsum}(B)$.

Author
Stephen "Cheffo" Kolaroff, 2002, unified interface: Ralf Hartmann 2003.

Definition at line 41 of file sparse_mic.h.

Member Typedef Documentation

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

Make the AdditionalData type in the base class accessible to this class as well.

Definition at line 80 of file sparse_mic.h.

Constructor & Destructor Documentation

template<typename number >
DEAL_II_NAMESPACE_OPEN SparseMIC< number >::SparseMIC ( )

Constructor. Does nothing, so you have to call decompose sometimes afterwards.

Definition at line 22 of file sparse_mic.templates.h.

template<typename number >
SparseMIC< number >::SparseMIC ( const SparsityPattern sparsity)
Deprecated:
This method is deprecated, and left for backward compatibility. It will be removed in later versions. Instead, pass the sparsity pattern that you want used for the decomposition in the AdditionalData structure.

Definition at line 32 of file sparse_mic.templates.h.

References SparseMatrix< number >::reinit().

template<typename number >
SparseMIC< number >::~SparseMIC ( )
virtual

Destructor.

Definition at line 43 of file sparse_mic.templates.h.

Member Function Documentation

template<typename number >
void SparseMIC< number >::clear ( )
virtual

Deletes all member variables. Leaves the class in the state that it had directly after calling the constructor

Reimplemented from SparseLUDecomposition< number >.

Definition at line 50 of file sparse_mic.templates.h.

References SparseLUDecomposition< number >::clear().

template<typename number >
void SparseMIC< number >::reinit ( const SparsityPattern sparsity)
virtual
Deprecated:
This method is deprecated, and left for backward compatibility. It will be removed in later versions.

Reimplemented from SparseMatrix< number >.

Definition at line 83 of file sparse_mic.templates.h.

References SparseMatrix< number >::reinit().

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

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 MIC decomposition.

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

Definition at line 72 of file sparse_mic.templates.h.

References SparseLUDecomposition< number >::initialize(), and SparseLUDecomposition< number >::AdditionalData::strengthen_diagonal.

template<typename number >
template<typename somenumber >
void SparseMIC< number >::decompose ( const SparseMatrix< somenumber > &  matrix,
const double  strengthen_diagonal = 0. 
)
Deprecated:
This method is deprecated, and left for backward compability. It will be removed in later versions. Use initialize() instead.

Definition at line 106 of file sparse_mic.templates.h.

References Assert, SparseMatrix< number >::begin(), SparseLUDecomposition< number >::decompose(), SparseMatrix< number >::end(), StandardExceptions::ExcDimensionMismatch(), SparseMatrix< number >::m(), and SparseMatrix< number >::n().

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

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

Call initialize before calling this function.

Definition at line 180 of file sparse_mic.templates.h.

References Assert, StandardExceptions::ExcDimensionMismatch(), Vector< number >::size(), and SparseMatrix< number >::vmult().

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

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

Reimplemented from SparseLUDecomposition< number >.

Definition at line 231 of file sparse_mic.templates.h.

References MemoryConsumption::memory_consumption().

template<typename number >
number SparseMIC< number >::get_rowsum ( const unsigned int  row) const
inlineprivate

Compute the row-th "inner sum".

Definition at line 161 of file sparse_mic.templates.h.

References Assert.

Member Data Documentation

template<typename number >
std::vector<number> SparseMIC< number >::diag
private

Values of the computed diagonal.

Definition at line 180 of file sparse_mic.h.

template<typename number >
std::vector<number> SparseMIC< number >::inv_diag
private

Inverses of the the diagonal: precomputed for faster vmult.

Definition at line 186 of file sparse_mic.h.

template<typename number >
std::vector<number> SparseMIC< number >::inner_sums
private

Values of the computed "inner sums", i.e. per-row sums of the elements laying on the right side of the diagonal.

Definition at line 194 of file sparse_mic.h.


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

deal.II
generated on Sat May 25 2013 23:44:15 by doxygen 1.8.3.1.
Hosting by IWR Universität Heidelberg