43 #ifndef IFPACK_CHEBYSHEV_H 44 #define IFPACK_CHEBYSHEV_H 48 #include "Teuchos_RefCountPtr.hpp" 63 #ifdef HAVE_IFPACK_EPETRAEXT 238 const int MaxIters = 1550,
239 const double Tol = 1e-9,
252 virtual std::ostream&
Print(std::ostream & os)
const;
318 const int MaximumIterations,
319 double& LambdaMax,
const unsigned int * RngSeed=0);
324 const int MaximumIterations,
325 double& lambda_min,
double& lambda_max,
const unsigned int * RngSeed=0);
327 #ifdef HAVE_IFPACK_EPETRAEXT 330 int CG(
const int MaximumIterations,
331 double& lambda_min,
double& lambda_max,
const unsigned int * RngSeed=0);
334 int PowerMethod(
const int MaximumIterations,
double& lambda_max,
const unsigned int * RngSeed=0);
388 bool ComputeCondest_;
417 Teuchos::RefCountPtr<const Epetra_RowMatrix>
Matrix_;
422 #ifdef HAVE_IFPACK_EPETRAEXT 423 Teuchos::ParameterList BlockList_;
425 Teuchos::RefCountPtr<EpetraExt_PointToBlockDiagPermute> InvBlockDiagonal_;
434 Teuchos::RefCountPtr<Epetra_Time>
Time_;
443 #endif // IFPACK_CHEBYSHEV_H
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
double ApplyInverseFlops_
Contain sthe number of flops for ApplyInverse().
bool UseBlockMode_
Use Block Preconditioning.
virtual int Compute()
Computes the preconditioners.
int NumMyNonzeros_
Number of local nonzeros.
int NumCompute_
Contains the number of successful call to Compute().
double EigRatio_
Contains the ratio such that [LambdaMax_ / EigRatio_, LambdaMax_] is the interval of interest for the...
bool ZeroStartingSolution_
If true, the starting solution is always the zero vector.
virtual double ComputeTime() const
Returns the time spent in Compute().
virtual ~Ifpack_Chebyshev()
Destructor.
std::string Label_
Contains the label of this object.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
int EigMaxIters_
Max number of iterations to use in eigenvalue estimation (if automatic).
long long NumGlobalNonzeros_
Number of global nonzeros.
long long NumGlobalRows_
Number of global rows.
double LambdaMin_
Contains an approximation to the smallest eigenvalue.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
double ComputeFlops_
Contains the number of flops for Compute().
double ApplyInverseTime_
Contains the time for all successful calls to ApplyInverse().
virtual double GetLambdaMin()
Contains an approximation to the smallest eigenvalue.
int PolyDegree_
Contains the degree of Chebyshev polynomial.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
bool IsRowMatrix_
If true, the Operator_ is an Epetra_RowMatrix.
Ifpack_CondestType
Ifpack_CondestType: enum to define the type of condition number estimate.
Teuchos::RefCountPtr< const Epetra_Operator > Operator_
Pointers to the matrix to be preconditioned as an Epetra_Operator.
virtual int NumCompute() const
Returns the number of calls to Compute().
Ifpack_Chebyshev(const Ifpack_Chebyshev &)
Copy constructor (PRIVATE, should not be used)
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack. ...
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
double InitializeTime_
Contains the time for all successful calls to Initialize().
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
double Condest_
Contains the estimated condition number.
virtual const char * Label() const
bool SolveNormalEquations_
Run on the normal equations.
virtual double GetLambdaMax()
Returns an approximation to the largest eigenvalue.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
int NumMyRows_
Number of local rows.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
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 double InitializeTime() const
Returns the time spent in Initialize().
int NumInitialize_
Contains the number of successful calls to Initialize().
virtual void SetLabel()
Sets the label.
bool IsInitialized_
If true, the preconditioner has been computed successfully.
virtual double ApplyInverseFlops() const
Returns the number of flops for the application of the preconditioner.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
Teuchos::RefCountPtr< Epetra_Time > Time_
Time object to track timing.
virtual int SetUseTranspose(bool UseTranspose_in)
Ifpack_Chebyshev & operator=(const Ifpack_Chebyshev &)
operator = (PRIVATE, should not be used)
double LambdaMax_
Contains an approximation to the largest eigenvalue.
Ifpack_Chebyshev(const Epetra_Operator *Matrix)
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Teuchos::RefCountPtr< Epetra_Vector > InvDiagonal_
Contains the inverse of diagonal elements of Matrix.
virtual int Initialize()
Computes all it is necessary to initialize the preconditioner.
double ComputeTime_
Contains the time for all successful calls to Compute().
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
bool UseTranspose_
If true, use the tranpose of Matrix_.
virtual double Condest() const
Returns the condition number estimate, or -1.0 if not computed.
bool IsComputed_
If true, the preconditioner has been computed successfully.
virtual std::ostream & Print(std::ostream &os) const
Prints object to an output stream.
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().
Teuchos::RefCountPtr< const Epetra_RowMatrix > Matrix_
Pointers to the matrix to be preconditioned as an Epetra_RowMatrix.
int NumApplyInverse_
Contains the number of successful call to ApplyInverse().
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
double MinDiagonalValue_
Contains the minimum value on the diagonal.