Ifpack2 Templated Preconditioning Package Version 1.0
Public Member Functions
Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType > Class Template Reference

Additive Schwarz domain decomposition for Tpetra::RowMatrix objects. More...

#include <Ifpack2_AdditiveSchwarz_decl.hpp>

Inheritance diagram for Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void setParameters (const Teuchos::ParameterList &List)
 Sets all parameters for the preconditioner.
virtual void initialize ()
 Computes all (graph-related) data necessary to initialize the preconditioner.
virtual bool isInitialized () const
 Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual void compute ()
 Computes all (coefficient) data necessary to apply the preconditioner.
virtual bool isComputed () const
 Returns true if the preconditioner has been successfully computed, false otherwise.
virtual magnitudeType computeCondEst (CondestType CT=Ifpack2::Cheap, LocalOrdinal MaxIters=1550, magnitudeType Tol=1e-9, const Teuchos::Ptr< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &Matrix=Teuchos::null)
 Computes the condition number estimate and returns its value.
virtual magnitudeType getCondEst () const
 Returns the computed condition number estimate, or -1.0 if not computed.
virtual int getNumInitialize () const
 Returns the number of calls to initialize().
virtual int getNumCompute () const
 Returns the number of calls to compute().
virtual int getNumApply () const
 Returns the number of calls to apply().
virtual double getInitializeTime () const
 Returns the time spent in initialize().
virtual double getComputeTime () const
 Returns the time spent in compute().
virtual double getApplyTime () const
 Returns the time spent in apply().
virtual std::ostream & print (std::ostream &os) const
 Prints basic information on iostream. This function is used by operator<<.
virtual int getOverlapLevel () const
 Returns the level of overlap.
 AdditiveSchwarz (const Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &Matrix_in, int OverlapLevel_in=0)
 Ifpack2::AdditiveSchwarz constructor with given Tpetra::RowMatrix.
virtual ~AdditiveSchwarz ()
 Destructor.
Methods implementing Tpetra::Operator.
virtual const Teuchos::RCP
< const Tpetra::Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getDomainMap () const
 Returns the Map associated with the domain of this operator, which must be compatible with X.getMap().
virtual const Teuchos::RCP
< const Tpetra::Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getRangeMap () const
 Returns the Map associated with the range of this operator, which must be compatible with Y.getMap().
virtual Teuchos::RCP< const
Tpetra::RowMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getMatrix () const
 Returns a pointer to the input matrix.
virtual void apply (const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
 Applies the effect of the preconditioner.
Overridden from Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.

Protected Member Functions

 AdditiveSchwarz (const AdditiveSchwarz &RHS)
 Copy constructor (should never be used)
void setup ()
 Sets up the localized matrix and the singleton filter.

Protected Attributes

const Teuchos::RCP< const
Tpetra::RowMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
Matrix_
 Pointers to the matrix to be preconditioned.
Teuchos::RCP
< Ifpack2::OverlappingRowMatrix
< LocalMatrixType > > 
OverlappingMatrix_
 Pointers to the overlapping matrix.
Teuchos::RCP< LocalMatrixType > LocalizedMatrix_
 Localized version of Matrix_ or OverlappingMatrix_.
Teuchos::RCP
< Ifpack2::ReorderFilter
< LocalMatrixType > > 
ReorderedLocalizedMatrix_
 Pointer to the reordered matrix.
bool IsInitialized_
 If true, the preconditioner has been successfully initialized.
bool IsComputed_
 If true, the preconditioner has been successfully computed.
bool IsOverlapping_
 If true, overlapping is used.
int OverlapLevel_
 Level of overlap among the processors.
Teuchos::ParameterList List_
 Stores a copy of the list given in SetParameters()
Tpetra::CombineMode CombineMode_
 Combine mode for off-process elements (only if overlap is used)
magnitudeType Condest_
 Contains the estimated condition number.
bool ComputeCondest_
 If true, compute the condition number estimate each time Compute() is called.
bool UseReordering_
 If true, reorder the local matrix.
bool UseSubdomain_
 If true, subdomain filtering is used.
bool FilterSingletons_
 Filter for singletons.
Teuchos::RCP
< Ifpack2::SingletonFilter
< LocalMatrixType > > 
SingletonMatrix_
 filtering object.
int NumInitialize_
 Contains the number of successful calls to Initialize().
int NumCompute_
 Contains the number of successful call to Compute().
int NumApply_
 Contains the number of successful call to apply().
double InitializeTime_
 Contains the time for all successful calls to initialize().
double ComputeTime_
 Contains the time for all successful calls to compute().
double ApplyTime_
 Contains the time for all successful calls to apply().
double InitializeFlops_
 Contains the number of flops for Initialize().
double ComputeFlops_
 Contains the number of flops for Compute().
double ApplyFlops_
 Contain sthe number of flops for ApplyInverse().
Teuchos::RCP< Teuchos::TimeTime_
 Object used for timing purposes.
Teuchos::RCP< LocalInverseType > Inverse_
 Pointer to the local solver.

Detailed Description

template<class MatrixType, class LocalInverseType>
class Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >

Additive Schwarz domain decomposition for Tpetra::RowMatrix objects.

Summary

This class implements an Additive Schwarz (one-level overlapping domain decomposition) preconditioner. It operates on a given Tpetra::RowMatrix. This class implements Tpetra::Operator, like all other Ifpack2 Preconditioner subclasses. Thus, the apply() method applies the preconditioner to a multivector.

Algorithm

One-level overlapping domain decomposition preconditioners use local solvers of Dirichlet type. This means that the inverse of the local matrix (with minimal or wider overlap) is applied to the residual to be preconditioned.

The preconditioner can be written as:

\[ P_{AS}^{-1} = \sum_{i=1}^M P_i A_i^{-1} R_i, \]

where \(M\) is the number of subdomains (that is, the number of processors in the computation), \(R_i\) is an operator that restricts the global vector to the vector lying on subdomain \(i\), \(P_i\) is the prolongator operator, and

\[ A_i = R_i A P_i. \]

The construction of Schwarz preconditioners is mainly composed by two steps:

The local matrix \(A_i\) can be filtered, to eliminate singletons, and reordered. At the present time, RCM and METIS can be used to reorder the local matrix.

The complete list of supported parameters is reported in page ifp_params.

Date:
Last modified on 05-Sep-12.

Constructor & Destructor Documentation

template<class MatrixType , class LocalInverseType >
Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::AdditiveSchwarz ( const Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &  Matrix_in,
int  OverlapLevel_in = 0 
)

Ifpack2::AdditiveSchwarz constructor with given Tpetra::RowMatrix.

Creates an Ifpack2::AdditiveSchwarz preconditioner with overlap. To use minimal-overlap, OverlappingMatrix is omitted (as defaulted to 0).

Parameters:
Matrix- (In) Pointer to matrix to be preconditioned
OverlappingMatrix- (In) Pointer to the matrix extended with the desired level of overlap.
template<class MatrixType , class LocalInverseType >
Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::~AdditiveSchwarz ( ) [virtual]

Destructor.

template<class MatrixType , class LocalInverseType >
Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::AdditiveSchwarz ( const AdditiveSchwarz< MatrixType, LocalInverseType > &  RHS) [protected]

Copy constructor (should never be used)


Member Function Documentation

template<class MatrixType , class LocalInverseType >
const Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > & Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getDomainMap ( ) const [virtual]

Returns the Map associated with the domain of this operator, which must be compatible with X.getMap().

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType , class LocalInverseType >
const Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > & Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getRangeMap ( ) const [virtual]

Returns the Map associated with the range of this operator, which must be compatible with Y.getMap().

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP< const Tpetra::RowMatrix< typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getMatrix ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::apply ( const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar  alpha = Teuchos::ScalarTraits<Scalar>::one(),
Scalar  beta = Teuchos::ScalarTraits<Scalar>::zero() 
) const [virtual]
template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::setParameters ( const Teuchos::ParameterList List) [virtual]
template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::initialize ( ) [virtual]

Computes all (graph-related) data necessary to initialize the preconditioner.

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::isInitialized ( ) const [virtual]

Returns true if the preconditioner has been successfully initialized, false otherwise.

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::compute ( ) [virtual]
template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::isComputed ( ) const [virtual]

Returns true if the preconditioner has been successfully computed, false otherwise.

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType , class LocalInverseType >
Teuchos::ScalarTraits< typename MatrixType::scalar_type >::magnitudeType Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::computeCondEst ( CondestType  CT = Ifpack2::Cheap,
LocalOrdinal  MaxIters = 1550,
magnitudeType  Tol = 1e-9,
const Teuchos::Ptr< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &  Matrix = Teuchos::null 
) [virtual]
template<class MatrixType , class LocalInverseType >
Teuchos::ScalarTraits< typename MatrixType::scalar_type >::magnitudeType Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getCondEst ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getNumInitialize ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getNumCompute ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getNumApply ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getInitializeTime ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getComputeTime ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getApplyTime ( ) const [virtual]
template<class MatrixType , class LocalInverseType >
std::string Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::description ( ) const

Return a simple one-line description of this object.

template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const

Print the object with some verbosity level to an FancyOStream object.

template<class MatrixType , class LocalInverseType >
std::ostream & Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::print ( std::ostream &  os) const [virtual]

Prints basic information on iostream. This function is used by operator<<.

template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::getOverlapLevel ( ) const [virtual]

Returns the level of overlap.

template<class MatrixType , class LocalInverseType >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::setup ( ) [protected]

Sets up the localized matrix and the singleton filter.


Member Data Documentation

template<class MatrixType , class LocalInverseType >
const Teuchos::RCP<const Tpetra::RowMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::Matrix_ [protected]

Pointers to the matrix to be preconditioned.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<Ifpack2::OverlappingRowMatrix<LocalMatrixType> > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::OverlappingMatrix_ [protected]

Pointers to the overlapping matrix.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<LocalMatrixType > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::LocalizedMatrix_ [protected]

Localized version of Matrix_ or OverlappingMatrix_.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<Ifpack2::ReorderFilter<LocalMatrixType> > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ReorderedLocalizedMatrix_ [protected]

Pointer to the reordered matrix.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::IsInitialized_ [protected]

If true, the preconditioner has been successfully initialized.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::IsComputed_ [protected]

If true, the preconditioner has been successfully computed.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::IsOverlapping_ [protected]

If true, overlapping is used.

template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::OverlapLevel_ [protected]

Level of overlap among the processors.

template<class MatrixType , class LocalInverseType >
Teuchos::ParameterList Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::List_ [protected]

Stores a copy of the list given in SetParameters()

template<class MatrixType , class LocalInverseType >
Tpetra::CombineMode Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::CombineMode_ [protected]

Combine mode for off-process elements (only if overlap is used)

template<class MatrixType , class LocalInverseType >
magnitudeType Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::Condest_ [protected]

Contains the estimated condition number.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ComputeCondest_ [protected]

If true, compute the condition number estimate each time Compute() is called.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::UseReordering_ [protected]

If true, reorder the local matrix.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::UseSubdomain_ [protected]

If true, subdomain filtering is used.

template<class MatrixType , class LocalInverseType >
bool Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::FilterSingletons_ [protected]

Filter for singletons.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<Ifpack2::SingletonFilter<LocalMatrixType> > Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::SingletonMatrix_ [protected]

filtering object.

template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::NumInitialize_ [protected]

Contains the number of successful calls to Initialize().

template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::NumCompute_ [protected]

Contains the number of successful call to Compute().

template<class MatrixType , class LocalInverseType >
int Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::NumApply_ [mutable, protected]

Contains the number of successful call to apply().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::InitializeTime_ [protected]

Contains the time for all successful calls to initialize().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ComputeTime_ [protected]

Contains the time for all successful calls to compute().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ApplyTime_ [mutable, protected]

Contains the time for all successful calls to apply().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::InitializeFlops_ [protected]

Contains the number of flops for Initialize().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ComputeFlops_ [protected]

Contains the number of flops for Compute().

template<class MatrixType , class LocalInverseType >
double Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::ApplyFlops_ [mutable, protected]

Contain sthe number of flops for ApplyInverse().

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<Teuchos::Time> Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::Time_ [protected]

Object used for timing purposes.

template<class MatrixType , class LocalInverseType >
Teuchos::RCP<LocalInverseType> Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::Inverse_ [protected]

Pointer to the local solver.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends