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 | |
Ifpack_PointRelaxation (const Epetra_RowMatrix *Matrix) | |
Ifpack_PointRelaxation constructor with given Epetra_RowMatrix. | |
virtual | ~Ifpack_PointRelaxation () |
Destructor. | |
virtual int | SetUseTranspose (bool UseTranspose_in) |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the matrix to an Epetra_MultiVector. | |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Applies the preconditioner to X, returns the result in Y. | |
virtual double | NormInf () const |
Returns the infinity norm of the global matrix (not implemented) | |
virtual const char * | Label () const |
virtual bool | UseTranspose () const |
Returns the current UseTranspose setting. | |
virtual bool | HasNormInf () const |
Returns true if the this object can provide an approximate Inf-norm, false otherwise. | |
virtual const Epetra_Comm & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. | |
virtual const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. | |
virtual const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. | |
virtual int | Initialize () |
Computes all it is necessary to initialize the preconditioner. | |
virtual bool | IsInitialized () const |
Returns true if the preconditioner has been successfully initialized, false otherwise. | |
virtual bool | IsComputed () const |
Returns true if the preconditioner has been successfully computed. | |
virtual int | Compute () |
Computes the preconditioners. | |
virtual const Epetra_RowMatrix & | Matrix () const |
Returns a pointer to the matrix to be preconditioned. | |
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. | |
virtual double | Condest () const |
Returns the condition number estimate, or -1.0 if not computed. | |
virtual int | SetParameters (Teuchos::ParameterList &List) |
Sets all the parameters for the preconditioner. | |
virtual std::ostream & | Print (std::ostream &os) const |
Prints object to an output stream. | |
virtual int | NumInitialize () const |
Returns the number of calls to Initialize(). | |
virtual int | NumCompute () const |
Returns the number of calls to Compute(). | |
virtual int | NumApplyInverse () const |
Returns the number of calls to ApplyInverse(). | |
virtual double | InitializeTime () const |
Returns the time spent in Initialize(). | |
virtual double | ComputeTime () const |
Returns the time spent in Compute(). | |
virtual double | ApplyInverseTime () const |
Returns the time spent in ApplyInverse(). | |
virtual double | InitializeFlops () const |
Returns the number of flops in the initialization phase. | |
virtual double | ComputeFlops () const |
Returns the number of flops in the computation phase. | |
virtual double | ApplyInverseFlops () const |
Returns the number of flops for the application of the preconditioner. | |
virtual int | SetParameters (Teuchos::ParameterList &List)=0 |
Sets all parameters for the preconditioner. | |
virtual int | Initialize ()=0 |
Computes all it is necessary to initialize the preconditioner. | |
virtual bool | IsInitialized () const =0 |
Returns true if the preconditioner has been successfully initialized, false otherwise. | |
virtual int | Compute ()=0 |
Computes all it is necessary to apply the preconditioner. | |
virtual bool | IsComputed () const =0 |
Returns true if the preconditioner has been successfully computed, false otherwise. | |
virtual double | Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix=0)=0 |
Computes the condition number estimate, returns its value. | |
virtual double | Condest () const =0 |
Returns the computed condition number estimate, or -1.0 if not computed. | |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0 |
Applies the preconditioner to vector X, returns the result in Y. | |
virtual const Epetra_RowMatrix & | Matrix () const =0 |
Returns a pointer to the matrix to be preconditioned. | |
virtual int | NumInitialize () const =0 |
Returns the number of calls to Initialize(). | |
virtual int | NumCompute () const =0 |
Returns the number of calls to Compute(). | |
virtual int | NumApplyInverse () const =0 |
Returns the number of calls to ApplyInverse(). | |
virtual double | InitializeTime () const =0 |
Returns the time spent in Initialize(). | |
virtual double | ComputeTime () const =0 |
Returns the time spent in Compute(). | |
virtual double | ApplyInverseTime () const =0 |
Returns the time spent in ApplyInverse(). | |
virtual double | InitializeFlops () const =0 |
Returns the number of flops in the initialization phase. | |
virtual double | ComputeFlops () const =0 |
Returns the number of flops in the computation phase. | |
virtual double | ApplyInverseFlops () const =0 |
Returns the number of flops in the application of the preconditioner. | |
virtual std::ostream & | Print (std::ostream &os) const =0 |
Prints basic information on iostream. This function is used by operator<<. | |
![]() | |
virtual | ~Epetra_Operator () |
virtual int | SetUseTranspose (bool UseTranspose)=0 |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual double | NormInf () const=0 |
virtual const char * | Label () const=0 |
virtual bool | UseTranspose () const=0 |
virtual bool | HasNormInf () const=0 |
virtual const Epetra_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () const=0 |
virtual | ~Epetra_Operator () |
virtual int | SetUseTranspose (bool UseTranspose)=0 |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual double | NormInf () const=0 |
virtual const char * | Label () const=0 |
virtual bool | UseTranspose () const=0 |
virtual bool | HasNormInf () const=0 |
virtual const Epetra_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () const=0 |
Private Attributes | |
bool | IsInitialized_ |
If true , the preconditioner has been computed successfully. | |
bool | IsComputed_ |
If true , the preconditioner has been computed successfully. | |
int | NumInitialize_ |
Contains the number of successful calls to Initialize(). | |
int | NumCompute_ |
Contains the number of successful call to Compute(). | |
int | NumApplyInverse_ |
Contains the number of successful call to ApplyInverse(). | |
double | InitializeTime_ |
Contains the time for all successful calls to Initialize(). | |
double | ComputeTime_ |
Contains the time for all successful calls to Compute(). | |
double | ApplyInverseTime_ |
Contains the time for all successful calls to ApplyInverse(). | |
double | ComputeFlops_ |
Contains the number of flops for Compute(). | |
double | ApplyInverseFlops_ |
Contain sthe number of flops for ApplyInverse(). | |
int | NumSweeps_ |
Number of application of the preconditioner (should be greater than 0). | |
double | DampingFactor_ |
Damping factor. | |
bool | UseTranspose_ |
If true, use the tranpose of Matrix_ . | |
double | Condest_ |
Contains the estimated condition number. | |
std::string | Label_ |
Contains the label of this object. | |
int | PrecType_ |
double | MinDiagonalValue_ |
int | NumMyRows_ |
Number of local rows. | |
int | NumMyNonzeros_ |
Number of local nonzeros. | |
long long | NumGlobalRows_ |
Number of global rows. | |
long long | NumGlobalNonzeros_ |
Number of global nonzeros. | |
Teuchos::RefCountPtr< const Epetra_RowMatrix > | Matrix_ |
Pointers to the matrix to be preconditioned. | |
Teuchos::RefCountPtr< Epetra_Import > | Importer_ |
Importer for parallel GS and SGS. | |
Teuchos::RefCountPtr< Epetra_Vector > | Diagonal_ |
Contains the diagonal elements of Matrix . | |
Teuchos::RefCountPtr< Epetra_Time > | Time_ |
Time object to track timing. | |
bool | IsParallel_ |
If true , more than 1 processor is currently used. | |
bool | ZeroStartingSolution_ |
If true , the starting solution is always the zero vector. | |
bool | DoBackwardGS_ |
Backward-Mode Gauss Seidel. | |
bool | DoL1Method_ |
Do L1 Jacobi/GS/SGS. | |
double | L1Eta_ |
Eta parameter for modified L1 method. | |
int | NumLocalSmoothingIndices_ |
Number of (local) unknowns for local smoothing. | |
int * | LocalSmoothingIndices_ |
List of (local) unknowns for local smoothing (if any) | |
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
where
Given an starting solution
for
Using Ifpack_Jacobi, the user can apply the specified number of sweeps (
Given an starting solution
for
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 62 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Destructor.
Definition at line 143 of file Ifpack_PointRelaxation.h.
|
inlineprivate |
Copy constructor (PRIVATE, should not be used)
Definition at line 389 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 153 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 172 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 413 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns the infinity norm of the global matrix (not implemented)
Implements Epetra_Operator.
Definition at line 198 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Implements Epetra_Operator.
Definition at line 206 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 212 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 218 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 234 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns true
if the preconditioner has been successfully computed.
Implements Ifpack_Preconditioner.
Definition at line 240 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 252 of file Ifpack_PointRelaxation.h.
|
virtual |
Computes the condition number estimates and returns the value.
Implements Ifpack_Preconditioner.
Definition at line 368 of file Ifpack_PointRelaxation.cpp.
|
inlinevirtual |
Returns the condition number estimate, or -1.0 if not computed.
Implements Ifpack_Preconditioner.
Definition at line 264 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 280 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 286 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 292 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 298 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 304 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 310 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 316 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops in the computation phase.
Implements Ifpack_Preconditioner.
Definition at line 322 of file Ifpack_PointRelaxation.h.
|
inlinevirtual |
Returns the number of flops for the application of the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 328 of file Ifpack_PointRelaxation.h.
|
privatevirtual |
Applies the Jacobi preconditioner to X, returns the result in Y.
Definition at line 456 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Applies the Gauss-Seidel preconditioner to X, returns the result in Y.
Definition at line 498 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 523 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 668 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 764 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 854 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Applies the symmetric Gauss-Seidel preconditioner to X, returns the result in Y.
Definition at line 945 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 968 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1057 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1145 of file Ifpack_PointRelaxation.cpp.
|
privatevirtual |
Definition at line 1233 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 393 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 400 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the preconditioner has been computed successfully.
Definition at line 402 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of successful calls to Initialize().
Definition at line 404 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of successful call to Compute().
Definition at line 406 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the number of successful call to ApplyInverse().
Definition at line 408 of file Ifpack_PointRelaxation.h.
|
private |
Contains the time for all successful calls to Initialize().
Definition at line 410 of file Ifpack_PointRelaxation.h.
|
private |
Contains the time for all successful calls to Compute().
Definition at line 412 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the time for all successful calls to ApplyInverse().
Definition at line 414 of file Ifpack_PointRelaxation.h.
|
private |
Contains the number of flops for Compute().
Definition at line 416 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contain sthe number of flops for ApplyInverse().
Definition at line 418 of file Ifpack_PointRelaxation.h.
|
private |
Number of application of the preconditioner (should be greater than 0).
Definition at line 423 of file Ifpack_PointRelaxation.h.
|
private |
Damping factor.
Definition at line 425 of file Ifpack_PointRelaxation.h.
|
private |
If true, use the tranpose of Matrix_
.
Definition at line 427 of file Ifpack_PointRelaxation.h.
|
private |
Contains the estimated condition number.
Definition at line 429 of file Ifpack_PointRelaxation.h.
|
private |
Contains the label of this object.
Definition at line 437 of file Ifpack_PointRelaxation.h.
|
private |
Definition at line 438 of file Ifpack_PointRelaxation.h.
|
private |
Definition at line 439 of file Ifpack_PointRelaxation.h.
|
private |
Number of local rows.
Definition at line 444 of file Ifpack_PointRelaxation.h.
|
private |
Number of local nonzeros.
Definition at line 446 of file Ifpack_PointRelaxation.h.
|
private |
Number of global rows.
Definition at line 448 of file Ifpack_PointRelaxation.h.
|
private |
Number of global nonzeros.
Definition at line 450 of file Ifpack_PointRelaxation.h.
|
private |
Pointers to the matrix to be preconditioned.
Definition at line 452 of file Ifpack_PointRelaxation.h.
|
private |
Importer for parallel GS and SGS.
Definition at line 454 of file Ifpack_PointRelaxation.h.
|
mutableprivate |
Contains the diagonal elements of Matrix
.
Definition at line 456 of file Ifpack_PointRelaxation.h.
|
private |
Time object to track timing.
Definition at line 458 of file Ifpack_PointRelaxation.h.
|
private |
If true
, more than 1 processor is currently used.
Definition at line 460 of file Ifpack_PointRelaxation.h.
|
private |
If true
, the starting solution is always the zero vector.
Definition at line 462 of file Ifpack_PointRelaxation.h.
|
private |
Backward-Mode Gauss Seidel.
Definition at line 464 of file Ifpack_PointRelaxation.h.
|
private |
Do L1 Jacobi/GS/SGS.
Definition at line 466 of file Ifpack_PointRelaxation.h.
|
private |
Eta parameter for modified L1 method.
Definition at line 468 of file Ifpack_PointRelaxation.h.
|
private |
Number of (local) unknowns for local smoothing.
Definition at line 471 of file Ifpack_PointRelaxation.h.
|
private |
List of (local) unknowns for local smoothing (if any)
Definition at line 473 of file Ifpack_PointRelaxation.h.