Ifpack2 Templated Preconditioning Package  Version 1.0
Public Member Functions | List of all members
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]

Public Member Functions

template<class DomainScalar , class RangeScalar >
void applyTempl (const Tpetra::MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, RangeScalar alpha=Teuchos::ScalarTraits< Scalar >::one(), RangeScalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
 Applies the effect of the preconditioner. More...
 
virtual void setParameters (const Teuchos::ParameterList &List)
 Sets all parameters for the preconditioner. More...
 
virtual void initialize ()
 Computes all (graph-related) data necessary to initialize the preconditioner. More...
 
virtual bool isInitialized () const
 Returns true if the preconditioner has been successfully initialized, false otherwise. More...
 
virtual void compute ()
 Computes all (coefficient) data necessary to apply the preconditioner. More...
 
virtual bool isComputed () const
 Returns true if the preconditioner has been successfully computed, false otherwise. More...
 
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. More...
 
virtual magnitudeType getCondEst () const
 Returns the computed condition number estimate, or -1.0 if not computed. More...
 
virtual int getNumInitialize () const
 Returns the number of calls to initialize(). More...
 
virtual int getNumCompute () const
 Returns the number of calls to compute(). More...
 
virtual int getNumApply () const
 Returns the number of calls to apply(). More...
 
virtual double getInitializeTime () const
 Returns the time spent in initialize(). More...
 
virtual double getComputeTime () const
 Returns the time spent in compute(). More...
 
virtual double getApplyTime () const
 Returns the time spent in apply(). More...
 
virtual std::ostream & print (std::ostream &os) const
 Prints basic information on iostream. This function is used by operator<<. More...
 
virtual int getOverlapLevel () const
 Returns the level of overlap. More...
 
 AdditiveSchwarz (const Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &Matrix_in, int OverlapLevel_in=0)
 Ifpack2::AdditiveSchwarz constructor with given Tpetra::RowMatrix. More...
 
virtual ~AdditiveSchwarz ()
 Destructor. More...
 
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(). More...
 
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(). More...
 
virtual Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getMatrix () const
 Returns a pointer to the input matrix. More...
 
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. More...
 
Overridden from Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object. More...
 
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. More...
 
- Public Member Functions inherited from Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >
virtual ~Preconditioner ()
 Destructor. More...
 
virtual magnitudeType computeCondEst (CondestType CT=Ifpack2::Cheap, MatrixType::local_ordinal_type MaxIters=1550, magnitudeType Tol=1e-9, const Teuchos::Ptr< const Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > &Matrix=Teuchos::null)=0
 Computes the condition number estimate and returns its value. More...
 

Protected Member Functions

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

Protected Attributes

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

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 >
template<class DomainScalar , class RangeScalar >
void Ifpack2::AdditiveSchwarz< MatrixType, LocalInverseType >::applyTempl ( const Tpetra::MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
Tpetra::MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
RangeScalar  alpha = Teuchos::ScalarTraits<Scalar>::one(),
RangeScalar  beta = Teuchos::ScalarTraits<Scalar>::zero() 
) const

Applies the effect of the preconditioner.

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

Computes the condition number estimate and returns its value.

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_
mutableprotected

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_
mutableprotected

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_
mutableprotected

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: