43 #ifndef IFPACK2_PRECONDITIONER_HPP
44 #define IFPACK2_PRECONDITIONER_HPP
46 #include "Ifpack2_ConfigDefs.hpp"
47 #include "Ifpack2_CondestType.hpp"
48 #include "Kokkos_DefaultNode.hpp"
49 #include "Tpetra_Operator.hpp"
50 #include "Tpetra_RowMatrix.hpp"
129 template<
class Scalar,
class LocalOrdinal =
int,
class GlobalOrdinal = LocalOrdinal,
class Node = Kokkos::DefaultNode::DefaultNodeType>
130 class Preconditioner :
virtual public Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> {
148 virtual void apply(
const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
149 Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
173 LocalOrdinal MaxIters = 1550,
174 magnitudeType Tol = 1e-9,
175 const Teuchos::Ptr<
const Tpetra::RowMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &Matrix = Teuchos::null) = 0;
205 #endif // IFPACK2_PRECONDITIONER_HPP
CondestType
Ifpack2::CondestType: enum to define the type of condition number estimate.
Definition: Ifpack2_CondestType.hpp:50
virtual int getNumApply() const =0
Returns the number of calls to apply().
virtual Teuchos::RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getMatrix() const =0
Returns a pointer to the input matrix.
virtual magnitudeType getCondEst() const =0
Returns the computed condition number estimate, or -1.0 if not computed.
virtual void compute()=0
Computes all (coefficient) data necessary to apply the preconditioner.
virtual const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > & getDomainMap() const =0
Returns the Map associated with the domain of this operator, which must be compatible with X...
virtual int getNumCompute() const =0
Returns the number of calls to compute().
Base class for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:130
virtual double getInitializeTime() const =0
Returns the time spent in initialize().
virtual void initialize()=0
Computes all (graph-related) data necessary to initialize the preconditioner.
virtual bool isComputed() const =0
Returns true if the preconditioner has been successfully computed, false otherwise.
virtual int getNumInitialize() const =0
Returns the number of calls to initialize().
virtual void setParameters(const Teuchos::ParameterList &List)=0
Sets all parameters for the preconditioner.
virtual double getComputeTime() const =0
Returns the time spent in compute().
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)=0
Computes the condition number estimate and returns its value.
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
Applies the effect of the preconditioner.
virtual ~Preconditioner()
Destructor.
Definition: Ifpack2_Preconditioner.hpp:136
cheap estimate
Definition: Ifpack2_CondestType.hpp:51
virtual bool isInitialized() const =0
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual double getApplyTime() const =0
Returns the time spent in apply().
virtual const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > & getRangeMap() const =0
Returns the Map associated with the range of this operator, which must be compatible with Y...