43 #ifndef IFPACK_CHEBYSHEV_H
44 #define IFPACK_CHEBYSHEV_H
46 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #warning "The Ifpack package is deprecated"
52 #include "Ifpack_ConfigDefs.h"
53 #include "Ifpack_Preconditioner.h"
54 #include "Teuchos_RefCountPtr.hpp"
69 #ifdef HAVE_IFPACK_EPETRAEXT
70 class EpetraExt_PointToBlockDiagPermute;
144 UseTranspose_ = UseTranspose_in;
185 virtual const char * Label()
const
187 return(Label_.c_str());
193 return(UseTranspose_);
215 return(IsInitialized_);
243 virtual double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
244 const int MaxIters = 1550,
245 const double Tol = 1e-9,
258 virtual std::ostream&
Print(std::ostream & os)
const;
267 return(NumInitialize_);
279 return(NumApplyInverse_);
285 return(InitializeTime_);
291 return(ComputeTime_);
297 return(ApplyInverseTime_);
309 return(ComputeFlops_);
315 return(ApplyInverseFlops_);
324 const int MaximumIterations,
325 double& LambdaMax,
const unsigned int * RngSeed=0);
330 const int MaximumIterations,
331 double& lambda_min,
double& lambda_max,
const unsigned int * RngSeed=0);
333 #ifdef HAVE_IFPACK_EPETRAEXT
336 int CG(
const int MaximumIterations,
337 double& lambda_min,
double& lambda_max,
const unsigned int * RngSeed=0);
340 int PowerMethod(
const int MaximumIterations,
double& lambda_max,
const unsigned int * RngSeed=0);
348 virtual void SetLabel();
370 mutable int NumApplyInverse_;
372 double InitializeTime_;
376 mutable double ApplyInverseTime_;
378 double ComputeFlops_;
380 mutable double ApplyInverseFlops_;
394 bool ComputeCondest_;
408 double MinDiagonalValue_;
417 long long NumGlobalRows_;
419 long long NumGlobalNonzeros_;
421 Teuchos::RefCountPtr<const Epetra_Operator> Operator_;
423 Teuchos::RefCountPtr<const Epetra_RowMatrix> Matrix_;
425 mutable Teuchos::RefCountPtr<Epetra_Vector> InvDiagonal_;
428 #ifdef HAVE_IFPACK_EPETRAEXT
429 Teuchos::ParameterList BlockList_;
431 Teuchos::RefCountPtr<EpetraExt_PointToBlockDiagPermute> InvBlockDiagonal_;
435 bool SolveNormalEquations_;
440 Teuchos::RefCountPtr<Epetra_Time> Time_;
442 bool ZeroStartingSolution_;
449 #endif // IFPACK_CHEBYSHEV_H
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
virtual int Compute()
Computes the preconditioners.
virtual ~Ifpack_Chebyshev()
Destructor.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
virtual double ComputeTime() const
Returns the time spent in Compute().
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual double GetLambdaMin()
Contains an approximation to the smallest eigenvalue.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
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 int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack. ...
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual double InitializeTime() const
Returns the time spent in Initialize().
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual double GetLambdaMax()
Returns an approximation to the largest eigenvalue.
virtual double Condest() const
Returns the condition number estimate, or -1.0 if not computed.
static int CG(const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &lambda_min, double &lambda_max, const unsigned int *RngSeed=0)
Uses AztecOO's CG to estimate lambda_min and lambda_max.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
virtual int SetUseTranspose(bool UseTranspose_in)
Ifpack_Chebyshev(const Epetra_Operator *Matrix)
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual int Initialize()
Computes all it is necessary to initialize the preconditioner.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual int NumCompute() const
Returns the number of calls to Compute().
virtual double ApplyInverseFlops() const
Returns the number of flops for the application of the preconditioner.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
static int PowerMethod(const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &LambdaMax, const unsigned int *RngSeed=0)
Simple power method to compute lambda_max.
virtual int NumInitialize() const
Returns the number of calls to Initialize().