|
Ifpack Package Browser (Single Doxygen Collection)
Development
|
Go to the documentation of this file.
43 #ifndef IFPACK_POLYNOMIAL_H
44 #define IFPACK_POLYNOMIAL_H
48 #include "Teuchos_RefCountPtr.hpp"
49 #include "Teuchos_LAPACK.hpp"
50 #include "Teuchos_SerialDenseMatrix.hpp"
65 #ifdef HAVE_IFPACK_EPETRAEXT
66 class EpetraExt_PointToBlockDiagPermute;
225 const int MaxIters = 1550,
226 const double Tol = 1e-9,
239 virtual std::ostream&
Print(std::ostream & os)
const;
305 const int MaximumIterations,
311 const int MaximumIterations,
312 double& lambda_min,
double& lambda_max);
314 #ifdef HAVE_IFPACK_EPETRAEXT
317 int CG(
const int MaximumIterations,
318 double& lambda_min,
double& lambda_max);
321 int PowerMethod(
const int MaximumIterations,
double& lambda_max);
327 const int MaximumIterations,
328 double& lambda_real_min,
double& lambda_real_max,
329 double& lambda_imag_min,
double& lambda_imag_max);
389 bool ComputeCondest_;
417 Teuchos::RefCountPtr<const Epetra_RowMatrix>
Matrix_;
422 #ifdef HAVE_IFPACK_EPETRAEXT
425 Teuchos::RefCountPtr<EpetraExt_PointToBlockDiagPermute> InvBlockDiagonal_;
435 Teuchos::RefCountPtr<Epetra_Time>
Time_;
444 #endif // IFPACK_POLYNOMIAL_H
Ifpack_Polynomial & operator=(const Ifpack_Polynomial &rhs)
operator = (PRIVATE, should not be used)
int NumMyRows_
Number of local rows.
double MinDiagonalValue_
Contains the minimum value on the diagonal.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
bool IsRowMatrix_
If true, the Operator_ is an Epetra_RowMatrix.
Ifpack_Polynomial(const Ifpack_Polynomial &rhs)
Copy constructor (PRIVATE, should not be used)
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
bool SolveNormalEquations_
Run on the normal equations.
virtual int SetUseTranspose(bool UseTranspose_in)
int GMRES(const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &lambda_real_min, double &lambda_real_max, double &lambda_imag_min, double &lambda_imag_max)
Uses AztecOO's GMRES to estimate the height and width of the spectrum.
double InitializeTime_
Contains the time for all successful calls to Initialize().
long long NumGlobalRows_
Number of global rows.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
int NumApplyInverse_
Contains the number of successful call to ApplyInverse().
double ComputeFlops_
Contains the number of flops for Compute().
virtual void SetLabel()
Sets the label.
bool UseBlockMode_
Use Block Preconditioning.
virtual const char * Label() const
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual double ApplyInverseFlops() const
Returns the number of flops for the application of the preconditioner.
Teuchos::RefCountPtr< const Epetra_Operator > Operator_
Pointers to the matrix to be preconditioned as an Epetra_Operator.
int NumMyNonzeros_
Number of local nonzeros.
virtual int NumCompute() const
Returns the number of calls to Compute().
Ifpack_CondestType
Ifpack_CondestType: enum to define the type of condition number estimate.
virtual double Condest() const
Returns the condition number estimate, or -1.0 if not computed.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
double RealEigRatio_
Contains the ratio such that the rectangular domain in the complex plane is [-LambdaRealMax_ / EigRat...
virtual std::ostream & Print(std::ostream &os) const
Prints object to an output stream.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual int Initialize()
Computes all it is necessary to initialize the preconditioner.
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.
bool IsIndefinite_
If true, have to compute polynomial for a spectrum with negative eigenvalues.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual double ComputeTime() const
Returns the time spent in Compute().
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
int NumInitialize_
Contains the number of successful calls to Initialize().
static int CG(const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &lambda_min, double &lambda_max)
Uses AztecOO's CG to estimate lambda_min and lambda_max.
double ApplyInverseTime_
Contains the time for all successful calls to ApplyInverse().
long long NumGlobalNonzeros_
Number of global nonzeros.
Teuchos::RefCountPtr< Epetra_Time > Time_
Time object to track timing.
Teuchos::RefCountPtr< const Epetra_RowMatrix > Matrix_
Pointers to the matrix to be preconditioned as an Epetra_RowMatrix.
bool UseTranspose_
If true, use the tranpose of Matrix_.
double Condest_
Contains the estimated condition number.
int EigMaxIters_
Max number of iterations to use in eigenvalue estimation (if automatic).
double LambdaRealMin_
Bounds on the spectrum.
int NumCompute_
Contains the number of successful call to Compute().
virtual int NumInitialize() const
Returns the number of calls to Initialize().
std::vector< double > coeff_
coefficients of the polynomial
Teuchos::RefCountPtr< Epetra_Vector > InvDiagonal_
Contains the inverse of diagonal elements of Matrix.
virtual ~Ifpack_Polynomial()
Destructor.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
bool ZeroStartingSolution_
If true, the starting solution is always the zero vector.
bool IsComplex_
If true, have to compute polynomial for a spectrum with nonzero imaginary part.
bool IsInitialized_
If true, the preconditioner has been computed successfully.
Ifpack_Polynomial(const Epetra_Operator *Matrix)
Ifpack_Polynomial constructor with given Epetra_Operator/Epetra_RowMatrix.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
int LSPointsReal_
Contains the number of discretization points of the least squares problem.
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
double ApplyInverseFlops_
Contain sthe number of flops for ApplyInverse().
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
bool IsComputed_
If true, the preconditioner has been computed successfully.
double ComputeTime_
Contains the time for all successful calls to Compute().
virtual int Compute()
Computes the preconditioners.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
Ifpack_Polynomial: class for preconditioning with least squares polynomials in Ifpack.
virtual double InitializeTime() const
Returns the time spent in Initialize().
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
static int PowerMethod(const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &LambdaMax)
Simple power method to compute lambda_max.
int PolyDegree_
Contains the degree of the least squares polynomial.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.