Ifpack Package Browser (Single Doxygen Collection)
Development
|
Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack. More...
#include <Ifpack_Chebyshev.h>
Public Member Functions | |
virtual int | SetUseTranspose (bool UseTranspose_in) |
Ifpack_Chebyshev (const Epetra_Operator *Matrix) | |
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix. More... | |
Ifpack_Chebyshev (const Epetra_RowMatrix *Matrix) | |
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix. More... | |
virtual | ~Ifpack_Chebyshev () |
Destructor. More... | |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the matrix to an Epetra_MultiVector. More... | |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the preconditioner to X, returns the result in Y. More... | |
virtual double | NormInf () const |
Returns the infinity norm of the global matrix (not implemented) More... | |
virtual const char * | Label () const |
virtual bool | UseTranspose () const |
Returns the current UseTranspose setting. More... | |
virtual bool | HasNormInf () const |
Returns true if the this object can provide an approximate Inf-norm, false otherwise. More... | |
virtual const Epetra_Comm & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. More... | |
virtual const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. More... | |
virtual const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. More... | |
virtual int | Initialize () |
Computes all it is necessary to initialize the preconditioner. More... | |
virtual bool | IsInitialized () const |
Returns true if the preconditioner has been successfully initialized, false otherwise. More... | |
virtual bool | IsComputed () const |
Returns true if the preconditioner has been successfully computed. More... | |
virtual int | Compute () |
Computes the preconditioners. More... | |
virtual double | GetLambdaMax () |
Returns an approximation to the largest eigenvalue. More... | |
virtual double | GetLambdaMin () |
Contains an approximation to the smallest eigenvalue. More... | |
virtual const Epetra_RowMatrix & | Matrix () const |
Returns a pointer to the matrix to be preconditioned. More... | |
virtual double | Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix_in=0) |
Computes the condition number estimates and returns the value. More... | |
virtual double | Condest () const |
Returns the condition number estimate, or -1.0 if not computed. More... | |
virtual int | SetParameters (Teuchos::ParameterList &List) |
Sets all the parameters for the preconditioner. More... | |
virtual std::ostream & | Print (std::ostream &os) const |
Prints object to an output stream. More... | |
virtual int | NumInitialize () const |
Returns the number of calls to Initialize(). More... | |
virtual int | NumCompute () const |
Returns the number of calls to Compute(). More... | |
virtual int | NumApplyInverse () const |
Returns the number of calls to ApplyInverse(). More... | |
virtual double | InitializeTime () const |
Returns the time spent in Initialize(). More... | |
virtual double | ComputeTime () const |
Returns the time spent in Compute(). More... | |
virtual double | ApplyInverseTime () const |
Returns the time spent in ApplyInverse(). More... | |
virtual double | InitializeFlops () const |
Returns the number of flops in the initialization phase. More... | |
virtual double | ComputeFlops () const |
Returns the number of flops in the computation phase. More... | |
virtual double | ApplyInverseFlops () const |
Returns the number of flops for the application of the preconditioner. More... | |
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. More... | |
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. More... | |
bool | IsInitialized_ |
If true , the preconditioner has been computed successfully. More... | |
bool | IsComputed_ |
If true , the preconditioner has been computed successfully. More... | |
int | NumInitialize_ |
Contains the number of successful calls to Initialize(). More... | |
int | NumCompute_ |
Contains the number of successful call to Compute(). More... | |
int | NumApplyInverse_ |
Contains the number of successful call to ApplyInverse(). More... | |
double | InitializeTime_ |
Contains the time for all successful calls to Initialize(). More... | |
double | ComputeTime_ |
Contains the time for all successful calls to Compute(). More... | |
double | ApplyInverseTime_ |
Contains the time for all successful calls to ApplyInverse(). More... | |
double | ComputeFlops_ |
Contains the number of flops for Compute(). More... | |
double | ApplyInverseFlops_ |
Contain sthe number of flops for ApplyInverse(). More... | |
virtual void | SetLabel () |
Sets the label. More... | |
Ifpack_Chebyshev (const Ifpack_Chebyshev &) | |
Copy constructor (PRIVATE, should not be used) More... | |
Ifpack_Chebyshev & | operator= (const Ifpack_Chebyshev &) |
operator = (PRIVATE, should not be used) More... | |
int | PolyDegree_ |
Contains the degree of Chebyshev polynomial. More... | |
bool | UseTranspose_ |
If true, use the tranpose of Matrix_ . More... | |
double | Condest_ |
Contains the estimated condition number. More... | |
double | EigRatio_ |
Contains the ratio such that [LambdaMax_ / EigRatio_, LambdaMax_] is the interval of interest for the Chebyshev polynomial. More... | |
int | EigMaxIters_ |
Max number of iterations to use in eigenvalue estimation (if automatic). More... | |
std::string | Label_ |
Contains the label of this object. More... | |
double | LambdaMin_ |
Contains an approximation to the smallest eigenvalue. More... | |
double | LambdaMax_ |
Contains an approximation to the largest eigenvalue. More... | |
double | MinDiagonalValue_ |
Contains the minimum value on the diagonal. More... | |
int | NumMyRows_ |
Number of local rows. More... | |
int | NumMyNonzeros_ |
Number of local nonzeros. More... | |
long long | NumGlobalRows_ |
Number of global rows. More... | |
long long | NumGlobalNonzeros_ |
Number of global nonzeros. More... | |
Teuchos::RefCountPtr< const Epetra_Operator > | Operator_ |
Pointers to the matrix to be preconditioned as an Epetra_Operator. More... | |
Teuchos::RefCountPtr< const Epetra_RowMatrix > | Matrix_ |
Pointers to the matrix to be preconditioned as an Epetra_RowMatrix. More... | |
Teuchos::RefCountPtr < Epetra_Vector > | InvDiagonal_ |
Contains the inverse of diagonal elements of Matrix . More... | |
bool | UseBlockMode_ |
Use Block Preconditioning. More... | |
bool | SolveNormalEquations_ |
Run on the normal equations. More... | |
bool | IsRowMatrix_ |
If true , the Operator_ is an Epetra_RowMatrix. More... | |
Teuchos::RefCountPtr< Epetra_Time > | Time_ |
Time object to track timing. More... | |
bool | ZeroStartingSolution_ |
If true , the starting solution is always the zero vector. More... | |
Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack.
The Ifpack_Chebyshev class enables the construction of preconditioners based on Chebyshev polynomials for an Epetra_RowMatrix. Ifpack_Chebyshev is derived from the Ifpack_Preconditioner class, which is itself derived from Epetra_Operator. Therefore this object can be used as preconditioner everywhere an ApplyInverse() method is required in the preconditioning step.
The class is an adaptation of the routine ML_Cheby in Smoother/ml_smoother.h
(04/04/06) Flops are not counted in the routine ApplyInverse()
(04/04/06) The switch to use the transpose matrix is not used in ApplyInverse()
The list of parameters is
Definition at line 104 of file Ifpack_Chebyshev.h.
Ifpack_Chebyshev::Ifpack_Chebyshev | ( | const Epetra_Operator * | Matrix | ) |
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
Creates an instance of Ifpack_Chebyshev class.
Matrix | - (In) Pointer to the operator to precondition. |
Definition at line 83 of file Ifpack_Chebyshev.cpp.
Ifpack_Chebyshev::Ifpack_Chebyshev | ( | const Epetra_RowMatrix * | Matrix | ) |
Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
Creates an instance of Ifpack_Chebyshev class.
Matrix | - (In) Pointer to the matrix to precondition. |
Definition at line 125 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Destructor.
Definition at line 126 of file Ifpack_Chebyshev.h.
|
inlineprivate |
Copy constructor (PRIVATE, should not be used)
Definition at line 345 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
This flag can be used to apply the preconditioner to the transpose of the input operator.
Implements Epetra_Operator.
Definition at line 136 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Applies the matrix to an Epetra_MultiVector.
X | - (In) A Epetra_MultiVector of dimension NumVectors to multiply with matrix. |
Y | - (Out) A Epetra_MultiVector of dimension NumVectors containing the result. |
Implements Epetra_Operator.
Definition at line 228 of file Ifpack_Chebyshev.cpp.
|
virtual |
Applies the preconditioner to X, returns the result in Y.
X | - (In) A Epetra_MultiVector of dimension NumVectors to be preconditioned. |
Y | - (InOut) A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Ifpack_Preconditioner.
Definition at line 467 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Returns the infinity norm of the global matrix (not implemented)
Implements Epetra_Operator.
Definition at line 171 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Implements Epetra_Operator.
Definition at line 179 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 185 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements Epetra_Operator.
Definition at line 191 of file Ifpack_Chebyshev.h.
|
virtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements Epetra_Operator.
Definition at line 209 of file Ifpack_Chebyshev.cpp.
|
virtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 215 of file Ifpack_Chebyshev.cpp.
|
virtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 221 of file Ifpack_Chebyshev.cpp.
|
virtual |
Computes all it is necessary to initialize the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 249 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Returns true if the preconditioner has been successfully initialized, false otherwise.
Implements Ifpack_Preconditioner.
Definition at line 207 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns true
if the preconditioner has been successfully computed.
Implements Ifpack_Preconditioner.
Definition at line 213 of file Ifpack_Chebyshev.h.
|
virtual |
Computes the preconditioners.
Implements Ifpack_Preconditioner.
Definition at line 283 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Returns an approximation to the largest eigenvalue.
Definition at line 222 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Contains an approximation to the smallest eigenvalue.
Definition at line 225 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns a pointer to the matrix to be preconditioned.
Implements Ifpack_Preconditioner.
Definition at line 231 of file Ifpack_Chebyshev.h.
|
virtual |
Computes the condition number estimates and returns the value.
Implements Ifpack_Preconditioner.
Definition at line 436 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Returns the condition number estimate, or -1.0 if not computed.
Implements Ifpack_Preconditioner.
Definition at line 243 of file Ifpack_Chebyshev.h.
|
virtual |
Sets all the parameters for the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 160 of file Ifpack_Chebyshev.cpp.
|
virtual |
Prints object to an output stream.
Implements Ifpack_Preconditioner.
Definition at line 378 of file Ifpack_Chebyshev.cpp.
|
inlinevirtual |
Returns the number of calls to Initialize().
Implements Ifpack_Preconditioner.
Definition at line 259 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 265 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 271 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 277 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 283 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 289 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 295 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the number of flops in the computation phase.
Implements Ifpack_Preconditioner.
Definition at line 301 of file Ifpack_Chebyshev.h.
|
inlinevirtual |
Returns the number of flops for the application of the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 307 of file Ifpack_Chebyshev.h.
|
static |
Simple power method to compute lambda_max.
Definition at line 729 of file Ifpack_Chebyshev.cpp.
|
static |
Uses AztecOO's CG to estimate lambda_min and lambda_max.
Definition at line 763 of file Ifpack_Chebyshev.cpp.
|
privatevirtual |
Sets the label.
Definition at line 451 of file Ifpack_Chebyshev.cpp.
|
inlineprivate |
operator = (PRIVATE, should not be used)
Definition at line 349 of file Ifpack_Chebyshev.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 356 of file Ifpack_Chebyshev.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 358 of file Ifpack_Chebyshev.h.
|
private |
Contains the number of successful calls to Initialize().
Definition at line 360 of file Ifpack_Chebyshev.h.
|
private |
Contains the number of successful call to Compute().
Definition at line 362 of file Ifpack_Chebyshev.h.
|
mutableprivate |
Contains the number of successful call to ApplyInverse().
Definition at line 364 of file Ifpack_Chebyshev.h.
|
private |
Contains the time for all successful calls to Initialize().
Definition at line 366 of file Ifpack_Chebyshev.h.
|
private |
Contains the time for all successful calls to Compute().
Definition at line 368 of file Ifpack_Chebyshev.h.
|
mutableprivate |
Contains the time for all successful calls to ApplyInverse().
Definition at line 370 of file Ifpack_Chebyshev.h.
|
private |
Contains the number of flops for Compute().
Definition at line 372 of file Ifpack_Chebyshev.h.
|
mutableprivate |
Contain sthe number of flops for ApplyInverse().
Definition at line 374 of file Ifpack_Chebyshev.h.
|
private |
Contains the degree of Chebyshev polynomial.
Definition at line 379 of file Ifpack_Chebyshev.h.
|
private |
If true, use the tranpose of Matrix_
.
Definition at line 381 of file Ifpack_Chebyshev.h.
|
private |
Contains the estimated condition number.
Definition at line 383 of file Ifpack_Chebyshev.h.
|
private |
Contains the ratio such that [LambdaMax_ / EigRatio_, LambdaMax_] is the interval of interest for the Chebyshev polynomial.
Definition at line 392 of file Ifpack_Chebyshev.h.
|
private |
Max number of iterations to use in eigenvalue estimation (if automatic).
Definition at line 394 of file Ifpack_Chebyshev.h.
|
private |
Contains the label of this object.
Definition at line 396 of file Ifpack_Chebyshev.h.
|
private |
Contains an approximation to the smallest eigenvalue.
Definition at line 398 of file Ifpack_Chebyshev.h.
|
private |
Contains an approximation to the largest eigenvalue.
Definition at line 400 of file Ifpack_Chebyshev.h.
|
private |
Contains the minimum value on the diagonal.
Definition at line 402 of file Ifpack_Chebyshev.h.
|
private |
Number of local rows.
Definition at line 407 of file Ifpack_Chebyshev.h.
|
private |
Number of local nonzeros.
Definition at line 409 of file Ifpack_Chebyshev.h.
|
private |
Number of global rows.
Definition at line 411 of file Ifpack_Chebyshev.h.
|
private |
Number of global nonzeros.
Definition at line 413 of file Ifpack_Chebyshev.h.
|
private |
Pointers to the matrix to be preconditioned as an Epetra_Operator.
Definition at line 415 of file Ifpack_Chebyshev.h.
|
private |
Pointers to the matrix to be preconditioned as an Epetra_RowMatrix.
Definition at line 417 of file Ifpack_Chebyshev.h.
|
mutableprivate |
Contains the inverse of diagonal elements of Matrix
.
Definition at line 419 of file Ifpack_Chebyshev.h.
|
private |
Use Block Preconditioning.
Definition at line 421 of file Ifpack_Chebyshev.h.
|
private |
Run on the normal equations.
Definition at line 429 of file Ifpack_Chebyshev.h.
|
private |
If true
, the Operator_ is an Epetra_RowMatrix.
Definition at line 432 of file Ifpack_Chebyshev.h.
|
private |
Time object to track timing.
Definition at line 434 of file Ifpack_Chebyshev.h.
|
private |
If true
, the starting solution is always the zero vector.
Definition at line 436 of file Ifpack_Chebyshev.h.