43 #ifndef IFPACK_KRYLOV_H 44 #define IFPACK_KRYLOV_H 46 #include "Ifpack_ConfigDefs.h" 47 #include "Ifpack_Preconditioner.h" 48 #include "Teuchos_RefCountPtr.hpp" 49 #include "Ifpack_PointRelaxation.h" 50 #include "Ifpack_BlockRelaxation.h" 51 #include "Ifpack_SparseContainer.h" 52 #include "Ifpack_DenseContainer.h" 53 #include "Ifpack_Amesos.h" 54 #ifdef HAVE_IFPACK_AZTECOO 62 class Epetra_MultiVector;
68 class Epetra_Operator;
69 class Epetra_RowMatrix;
70 #ifdef HAVE_IFPACK_AZTECOO 75 #ifdef HAVE_IFPACK_EPETRAEXT 76 class EpetraExt_PointToBlockDiagPermute;
84 typedef Epetra_MultiVector MV;
85 typedef Epetra_Operator OP;
86 typedef Epetra_RowMatrix RM;
109 UseTranspose_ = UseTranspose_in;
126 virtual inline int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
139 virtual int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
150 virtual const char * Label()
const 152 return(Label_.c_str());
158 return(UseTranspose_);
168 virtual const Epetra_Comm &
Comm()
const;
180 return(IsInitialized_);
192 virtual const Epetra_RowMatrix&
Matrix()
const 198 virtual double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
199 const int MaxIters = 1550,
200 const double Tol = 1e-9,
201 Epetra_RowMatrix* Matrix_in = 0);
213 virtual std::ostream&
Print(std::ostream & os)
const;
222 return(NumInitialize_);
234 return(NumApplyInverse_);
240 return(InitializeTime_);
246 return(ComputeTime_);
252 return(ApplyInverseTime_);
264 return(ComputeFlops_);
270 return(ApplyInverseFlops_);
279 virtual void SetLabel();
301 mutable int NumApplyInverse_;
303 double InitializeTime_;
307 mutable double ApplyInverseTime_;
309 double ComputeFlops_;
311 mutable double ApplyInverseFlops_;
322 int PreconditionerType_;
328 double DampingParameter_;
337 bool ComputeCondest_;
348 long long NumGlobalRows_;
350 long long NumGlobalNonzeros_;
352 Teuchos::RefCountPtr<Epetra_Operator> Operator_;
354 Teuchos::RefCountPtr<Epetra_RowMatrix> Matrix_;
359 Teuchos::RefCountPtr<Epetra_Time> Time_;
361 bool ZeroStartingSolution_;
364 #ifdef HAVE_IFPACK_AZTECOO 365 Teuchos::RCP<AztecOO> AztecSolver_;
369 Teuchos::RCP<Ifpack_Preconditioner> IfpackPrec_;
374 #endif // IFPACK_KRYLOV_H virtual double ApplyInverseFlops() const
Returns the number of flops for the application of the preconditioner.
virtual int Initialize()
Computes all it is necessary to initialize the preconditioner.
virtual int NumInitialize() const
Returns the number of calls to Initialize().
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual int Compute()
Computes the preconditioners.
virtual double ComputeTime() const
Returns the time spent in Compute().
virtual int SetUseTranspose(bool UseTranspose_in)
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual double Condest() const
Returns the condition number estimate, or -1.0 if not computed.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Ifpack_Krylov: class for smoothing with Krylov solvers in Ifpack.
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
virtual int NumCompute() const
Returns the number of calls to Compute().
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
virtual std::ostream & Print(std::ostream &os) const
Prints object to an output stream.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual ~Ifpack_Krylov()
Destructor.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
virtual double InitializeTime() const
Returns the time spent in Initialize().
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.