Ifpack Package Browser (Single Doxygen Collection)
Development
|
Ifpack_PointRelaxation: a class to define point relaxation preconditioners of for Epetra_RowMatrix's. More...
#include <Ifpack_PointRelaxation.h>
Public Member Functions | |
virtual int | SetUseTranspose (bool UseTranspose_in) |
Private Member Functions | |
virtual void | SetLabel () |
Sets the label. More... | |
Ifpack_PointRelaxation (const Ifpack_PointRelaxation &) | |
Copy constructor (PRIVATE, should not be used) More... | |
Ifpack_PointRelaxation & | operator= (const Ifpack_PointRelaxation &) |
operator = (PRIVATE, should not be used) More... | |
Ifpack_PointRelaxation (const Epetra_RowMatrix *Matrix) | |
Ifpack_PointRelaxation constructor with given Epetra_RowMatrix. More... | |
virtual | ~Ifpack_PointRelaxation () |
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 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=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... | |
virtual int | ApplyInverseJacobi (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the Jacobi preconditioner to X, returns the result in Y. More... | |
virtual int | ApplyInverseGS (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the Gauss-Seidel preconditioner to X, returns the result in Y. More... | |
virtual int | ApplyInverseGS_RowMatrix (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseGS_CrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseGS_FastCrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseGS_LocalFastCrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseSGS (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the symmetric Gauss-Seidel preconditioner to X, returns the result in Y. More... | |
virtual int | ApplyInverseSGS_RowMatrix (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseSGS_CrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseSGS_FastCrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
virtual int | ApplyInverseSGS_LocalFastCrsMatrix (const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
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... | |
int | NumSweeps_ |
Number of application of the preconditioner (should be greater than 0). More... | |
double | DampingFactor_ |
Damping factor. More... | |
bool | UseTranspose_ |
If true, use the tranpose of Matrix_ . More... | |
double | Condest_ |
Contains the estimated condition number. More... | |
std::string | Label_ |
Contains the label of this object. More... | |
int | PrecType_ |
double | MinDiagonalValue_ |
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_RowMatrix > | Matrix_ |
Pointers to the matrix to be preconditioned. More... | |
Teuchos::RefCountPtr < Epetra_Import > | Importer_ |
Importer for parallel GS and SGS. More... | |
Teuchos::RefCountPtr < Epetra_Vector > | Diagonal_ |
Contains the diagonal elements of Matrix . More... | |
Teuchos::RefCountPtr< Epetra_Time > | Time_ |
Time object to track timing. More... | |
bool | IsParallel_ |
If true , more than 1 processor is currently used. More... | |
bool | ZeroStartingSolution_ |
If true , the starting solution is always the zero vector. More... | |
bool | DoBackwardGS_ |
Backward-Mode Gauss Seidel. More... | |
bool | DoL1Method_ |
Do L1 Jacobi/GS/SGS. More... | |
double | L1Eta_ |
Eta parameter for modified L1 method. More... | |
int | NumLocalSmoothingIndices_ |
Number of (local) unknowns for local smoothing. More... | |
int * | LocalSmoothingIndices_ |
List of (local) unknowns for local smoothing (if any) More... | |
Ifpack_PointRelaxation: a class to define point relaxation preconditioners of for Epetra_RowMatrix's.
The Ifpack_PointRelaxation class enables the construction of point relaxation preconditioners of an Epetra_RowMatrix. Ifpack_PointRelaxation 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.
This class enables the construction of the following simple preconditioners:
We now briefly describe the main features of the above preconditioners. Consider a linear system of type
where is a square, real matrix, and are two real vectors. We begin with the decomposition
where is the diagonal of A, is the strict lower part, and is the strict upper part. It is assumed that the diagonal entries of are different from zero.
Given an starting solution , an iteration of the (damped) Jacobi method can be written in matrix form as follows:
for , and a damping parameter.
Using Ifpack_Jacobi, the user can apply the specified number of sweeps ( ), and the damping parameter. If only one sweep is used, then the class simply applies the inverse of the diagonal of A to the input vector.
Given an starting solution , an iteration of the (damped) GaussSeidel method can be written in matrix form as follows:
for , and a damping parameter. Equivalently, the Gauss-Seidel preconditioner can be defined as
Clearly, the role of E and F can be interchanged. However, Ifpack_GaussSeidel does not consider backward Gauss-Seidel methods.
For a list of supported parameters, please refer to page ifp_params.
The complete list of supported parameters is reported in page ifp_params. For a presentation of basic relaxation schemes, please refer to page Ifpack_PointRelaxation.
Definition at line 130 of file Ifpack_PointRelaxation.h.
Ifpack_PointRelaxation::Ifpack_PointRelaxation | ( | const Epetra_RowMatrix * | Matrix | ) |
Ifpack_PointRelaxation constructor with given Epetra_RowMatrix.
Creates an instance of Ifpack_PointRelaxation class.
Matrix | - (In) Pointer to matrix to precondition. |
Definition at line 63 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Destructor.
Definition at line 144 of file Ifpack_PointRelaxation.h.
|
inlineprivate |
Copy constructor (PRIVATE, should not be used)
Definition at line 390 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
This flag can be used to apply the preconditioner to the transpose of the input operator.
Implements Epetra_Operator.
Definition at line 154 of file Ifpack_PointRelaxation.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 173 of file Ifpack_PointRelaxation.h.
|
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 414 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns the infinity norm of the global matrix (not implemented)
Implements Epetra_Operator.
Definition at line 199 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Implements Epetra_Operator.
Definition at line 207 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 213 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements Epetra_Operator.
Definition at line 219 of file Ifpack_PointRelaxation.h.
|
virtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements Epetra_Operator.
Definition at line 153 of file Ifpack_PointRelaxation.cpp.
|
virtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 159 of file Ifpack_PointRelaxation.cpp.
|
virtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 165 of file Ifpack_PointRelaxation.cpp.
|
virtual |
Computes all it is necessary to initialize the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 171 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns true if the preconditioner has been successfully initialized, false otherwise.
Implements Ifpack_Preconditioner.
Definition at line 235 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns true
if the preconditioner has been successfully computed.
Implements Ifpack_Preconditioner.
Definition at line 241 of file Ifpack_PointRelaxation.h.
|
virtual |
Computes the preconditioners.
Implements Ifpack_Preconditioner.
Definition at line 201 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns a pointer to the matrix to be preconditioned.
Implements Ifpack_Preconditioner.
Definition at line 253 of file Ifpack_PointRelaxation.h.
|
virtual |
Computes the condition number estimates and returns the value.
Implements Ifpack_Preconditioner.
Definition at line 369 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns the condition number estimate, or -1.0 if not computed.
Implements Ifpack_Preconditioner.
Definition at line 265 of file Ifpack_PointRelaxation.h.
|
virtual |
Sets all the parameters for the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 97 of file Ifpack_PointRelaxation.cpp.
|
virtual |
Prints object to an output stream.
Implements Ifpack_Preconditioner.
Definition at line 302 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns the number of calls to Initialize().
Implements Ifpack_Preconditioner.
Definition at line 281 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 287 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 293 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 299 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 305 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 311 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 317 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops in the computation phase.
Implements Ifpack_Preconditioner.
Definition at line 323 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops for the application of the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 329 of file Ifpack_PointRelaxation.h.
|
privatevirtual |
Applies the Jacobi preconditioner to X, returns the result in Y.
Definition at line 457 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Applies the Gauss-Seidel preconditioner to X, returns the result in Y.
Definition at line 499 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 524 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 669 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 765 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 855 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Applies the symmetric Gauss-Seidel preconditioner to X, returns the result in Y.
Definition at line 946 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 969 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1058 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1146 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1234 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Sets the label.
Definition at line 384 of file Ifpack_PointRelaxation.cpp.
|
inlineprivate |
operator = (PRIVATE, should not be used)
Definition at line 394 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 401 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 403 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of successful calls to Initialize().
Definition at line 405 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of successful call to Compute().
Definition at line 407 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the number of successful call to ApplyInverse().
Definition at line 409 of file Ifpack_PointRelaxation.h.
|
private |
Contains the time for all successful calls to Initialize().
Definition at line 411 of file Ifpack_PointRelaxation.h.
|
private |
Contains the time for all successful calls to Compute().
Definition at line 413 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the time for all successful calls to ApplyInverse().
Definition at line 415 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of flops for Compute().
Definition at line 417 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contain sthe number of flops for ApplyInverse().
Definition at line 419 of file Ifpack_PointRelaxation.h.
|
private |
Number of application of the preconditioner (should be greater than 0).
Definition at line 424 of file Ifpack_PointRelaxation.h.
|
private |
Damping factor.
Definition at line 426 of file Ifpack_PointRelaxation.h.
|
private |
If true, use the tranpose of Matrix_
.
Definition at line 428 of file Ifpack_PointRelaxation.h.
|
private |
Contains the estimated condition number.
Definition at line 430 of file Ifpack_PointRelaxation.h.
|
private |
Contains the label of this object.
Definition at line 438 of file Ifpack_PointRelaxation.h.
|
private |
Definition at line 439 of file Ifpack_PointRelaxation.h.
|
private |
Definition at line 440 of file Ifpack_PointRelaxation.h.
|
private |
Number of local rows.
Definition at line 445 of file Ifpack_PointRelaxation.h.
|
private |
Number of local nonzeros.
Definition at line 447 of file Ifpack_PointRelaxation.h.
|
private |
Number of global rows.
Definition at line 449 of file Ifpack_PointRelaxation.h.
|
private |
Number of global nonzeros.
Definition at line 451 of file Ifpack_PointRelaxation.h.
|
private |
Pointers to the matrix to be preconditioned.
Definition at line 453 of file Ifpack_PointRelaxation.h.
|
private |
Importer for parallel GS and SGS.
Definition at line 455 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the diagonal elements of Matrix
.
Definition at line 457 of file Ifpack_PointRelaxation.h.
|
private |
Time object to track timing.
Definition at line 459 of file Ifpack_PointRelaxation.h.
|
private |
If true
, more than 1 processor is currently used.
Definition at line 461 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the starting solution is always the zero vector.
Definition at line 463 of file Ifpack_PointRelaxation.h.
|
private |
Backward-Mode Gauss Seidel.
Definition at line 465 of file Ifpack_PointRelaxation.h.
|
private |
Do L1 Jacobi/GS/SGS.
Definition at line 467 of file Ifpack_PointRelaxation.h.
|
private |
Eta parameter for modified L1 method.
Definition at line 469 of file Ifpack_PointRelaxation.h.
|
private |
Number of (local) unknowns for local smoothing.
Definition at line 472 of file Ifpack_PointRelaxation.h.
|
private |
List of (local) unknowns for local smoothing (if any)
Definition at line 474 of file Ifpack_PointRelaxation.h.