Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Referenceabstract

Interface for all Ifpack2 preconditioners. More...

#include <Ifpack2_Preconditioner.hpp>

Inheritance diagram for Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

Public Types

typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
magnitude_type
 The type of the magnitude (absolute value) of a matrix entry. More...
 

Public Member Functions

virtual ~Preconditioner ()
 Destructor. More...
 
virtual void setParameters (const Teuchos::ParameterList &List)=0
 Set this preconditioner's parameters. More...
 
virtual void setZeroStartingSolution (bool zeroStartingSolution)
 Set this preconditioner's parameters. More...
 
virtual void initialize ()=0
 Set up the graph structure of this preconditioner. More...
 
virtual bool isInitialized () const =0
 True if the preconditioner has been successfully initialized, else false. More...
 
virtual void compute ()=0
 Set up the numerical values in this preconditioner. More...
 
virtual bool isComputed () const =0
 True if the preconditioner has been successfully computed, else false. More...
 
virtual Teuchos::RCP< const
Tpetra::RowMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getMatrix () const =0
 The input matrix given to the constructor. More...
 
virtual int getNumInitialize () const =0
 The number of calls to initialize(). More...
 
virtual int getNumCompute () const =0
 The number of calls to compute(). More...
 
virtual int getNumApply () const =0
 The number of calls to apply(). More...
 
virtual double getInitializeTime () const =0
 The time (in seconds) spent in initialize(). More...
 
virtual double getComputeTime () const =0
 The time (in seconds) spent in compute(). More...
 
virtual double getApplyTime () const =0
 The time (in seconds) spent in apply(). More...
 
Methods implementing Tpetra::Operator.
virtual Teuchos::RCP< const
Tpetra::Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getDomainMap () const =0
 The domain Map of this operator. More...
 
virtual Teuchos::RCP< const
Tpetra::Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getRangeMap () const =0
 The range Map of this operator. 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 =0
 Apply the preconditioner to X, putting the result in Y. More...
 

Detailed Description

template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
class Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Interface for all Ifpack2 preconditioners.

Template Parameters
ScalarType of the matrix's entries; same as the first template parameter of Tpetra::RowMatrix
LocalOrdinalType of the matrix's local indices; same as the second template parameter of Tpetra::RowMatrix
GlobalOrdinalType of the matrix's global indices; same as the third template parameter of Tpetra::RowMatrix
NodeThe matrix's Node type; same as the fourth template parameter of Tpetra::RowMatrix

The Preconditioner class defines the interface that all Ifpack2 preconditioners must implement. Preconditioner inherits from Tpetra::Operator. Its apply() method applies the preconditioner.

If you are familiar with the IFPACK package, please be aware that this is different from IFPACK. In IFPACK, the ApplyInverse() method applies or "solves with" the preconditioner \(M^{-1}\), and the Apply() method "applies" the preconditioner \(M\). In Ifpack2, the apply() method applies or "solves with" the preconditioner \(M^{-1}\). Ifpack2 has no method comparable to IFPACK's Apply().

Preconditioner provides the following methods

Implementations of compute() must internally call initialize() if isInitialized() returns false. The preconditioner is applied by apply() (which returns if isComputed() is false). Every time that initialize() is called, the object destroys all the previously allocated information, and reinitializes the preconditioner. Every time compute() is called, the object recomputes the actual values of the preconditioner.

Member Typedef Documentation

template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::magnitude_type

The type of the magnitude (absolute value) of a matrix entry.

Constructor & Destructor Documentation

template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~Preconditioner ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual Teuchos::RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> > Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual Teuchos::RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> > Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual void Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual void Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setParameters ( const Teuchos::ParameterList List)
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual void Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setZeroStartingSolution ( bool  zeroStartingSolution)
inlinevirtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual void Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::initialize ( )
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual bool Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isInitialized ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual void Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::compute ( )
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual bool Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isComputed ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual Teuchos::RCP<const Tpetra::RowMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> > Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMatrix ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual int Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumInitialize ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual int Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumCompute ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual int Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumApply ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual double Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getInitializeTime ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual double Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getComputeTime ( ) const
pure virtual
template<class Scalar = Tpetra::Operator<>::scalar_type, class LocalOrdinal = typename Tpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
virtual double Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getApplyTime ( ) const
pure virtual

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