12#ifndef IFPACK2_PRECONDITIONER_HPP
13#define IFPACK2_PRECONDITIONER_HPP
15#include "Ifpack2_ConfigDefs.hpp"
16#include "Tpetra_Operator.hpp"
17#include "Tpetra_RowMatrix.hpp"
18#include "Teuchos_ParameterList.hpp"
19#include "Teuchos_ScalarTraits.hpp"
66template<
class Scalar =
67 Tpetra::Operator<>::scalar_type,
69 typename Tpetra::Operator<Scalar>::local_ordinal_type,
71 typename Tpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type,
73 typename Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
75 virtual public Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
78 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType
magnitude_type;
90 virtual Teuchos::RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >
97 virtual Teuchos::RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >
106 apply (
const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
107 Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
108 Teuchos::ETransp mode = Teuchos::NO_TRANS,
109 Scalar alpha = Teuchos::ScalarTraits<Scalar>::one(),
110 Scalar beta = Teuchos::ScalarTraits<Scalar>::zero())
const = 0;
116 virtual bool supportsZeroStartingSolution () {
return false; };
150 virtual Teuchos::RCP<const Tpetra::RowMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
getMatrix()
const = 0;
Interface for all Ifpack2 preconditioners.
Definition Ifpack2_Preconditioner.hpp:75
virtual double getComputeTime() const =0
The time (in seconds) spent in compute().
virtual void setZeroStartingSolution(bool zeroStartingSolution)
Set this preconditioner's parameters.
Definition Ifpack2_Preconditioner.hpp:119
virtual bool isInitialized() const =0
True if the preconditioner has been successfully initialized, else false.
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
Definition Ifpack2_Preconditioner.hpp:78
virtual void compute()=0
Set up the numerical values in this preconditioner.
virtual int getNumCompute() const =0
The number of calls to compute().
virtual Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getMatrix() const =0
The input matrix given to the constructor.
virtual int getNumApply() const =0
The number of calls to apply().
virtual double getApplyTime() const =0
The time (in seconds) spent in apply().
virtual void setParameters(const Teuchos::ParameterList &List)=0
Set this preconditioner's parameters.
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.
virtual ~Preconditioner()
Destructor.
Definition Ifpack2_Preconditioner.hpp:81
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const =0
The range Map of this operator.
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const =0
The domain Map of this operator.
virtual bool isComputed() const =0
True if the preconditioner has been successfully computed, else false.
virtual void initialize()=0
Set up the graph structure of this preconditioner.
virtual double getInitializeTime() const =0
The time (in seconds) spent in initialize().
virtual int getNumInitialize() const =0
The number of calls to initialize().
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41