43#ifndef IFPACK_POINTRELAXATION_H
44#define IFPACK_POINTRELAXATION_H
49#include "Epetra_Vector.h"
50#include "Epetra_Time.h"
51#include "Epetra_RowMatrix.h"
52#include "Epetra_Import.h"
54#include "Teuchos_RefCountPtr.hpp"
259 const int MaxIters = 1550,
260 const double Tol = 1e-9,
273 virtual std::ostream&
Print(std::ostream & os)
const;
434 bool ComputeCondest_;
452 Teuchos::RefCountPtr<const Epetra_RowMatrix>
Matrix_;
458 Teuchos::RefCountPtr<Epetra_Time>
Time_;
Ifpack_CondestType
Ifpack_CondestType: enum to define the type of condition number estimate.
@ Ifpack_Cheap
cheap estimate
#define IFPACK_CHK_ERR(ifpack_err)
Ifpack_PointRelaxation: a class to define point relaxation preconditioners of for Epetra_RowMatrix's.
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
double ComputeTime_
Contains the time for all successful calls to Compute().
virtual int ApplyInverseJacobi(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the Jacobi preconditioner to X, returns the result in Y.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
bool IsParallel_
If true, more than 1 processor is currently used.
bool UseTranspose_
If true, use the tranpose of Matrix_.
virtual int ApplyInverseSGS_RowMatrix(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int Compute()
Computes the preconditioners.
bool DoL1Method_
Do L1 Jacobi/GS/SGS.
Teuchos::RefCountPtr< Epetra_Import > Importer_
Importer for parallel GS and SGS.
int NumInitialize_
Contains the number of successful calls to Initialize().
virtual int ApplyInverseGS_CrsMatrix(const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
int NumMyNonzeros_
Number of local nonzeros.
virtual double ComputeTime() const
Returns the time spent in Compute().
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual int ApplyInverseSGS_CrsMatrix(const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual std::ostream & Print(std::ostream &os) const
Prints object to an output stream.
virtual double Condest() const
Returns the condition number estimate, or -1.0 if not computed.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
long long NumGlobalRows_
Number of global rows.
bool DoBackwardGS_
Backward-Mode Gauss Seidel.
bool IsComputed_
If true, the preconditioner has been computed successfully.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
virtual const char * Label() const
double DampingFactor_
Damping factor.
virtual int ApplyInverseSGS(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the symmetric Gauss-Seidel preconditioner to X, returns the result in Y.
double InitializeTime_
Contains the time for all successful calls to Initialize().
int NumLocalSmoothingIndices_
Number of (local) unknowns for local smoothing.
Ifpack_PointRelaxation(const Ifpack_PointRelaxation &)
Copy constructor (PRIVATE, should not be used)
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
int NumSweeps_
Number of application of the preconditioner (should be greater than 0).
Teuchos::RefCountPtr< const Epetra_RowMatrix > Matrix_
Pointers to the matrix to be preconditioned.
virtual double ApplyInverseFlops() const
Returns the number of flops for the application of the preconditioner.
virtual int ApplyInverseGS_FastCrsMatrix(const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
int NumApplyInverse_
Contains the number of successful call to ApplyInverse().
double ApplyInverseTime_
Contains the time for all successful calls to ApplyInverse().
Ifpack_PointRelaxation & operator=(const Ifpack_PointRelaxation &)
operator = (PRIVATE, should not be used)
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual int ApplyInverseGS_RowMatrix(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
int * LocalSmoothingIndices_
List of (local) unknowns for local smoothing (if any)
bool ZeroStartingSolution_
If true, the starting solution is always the zero vector.
virtual void SetLabel()
Sets the label.
Teuchos::RefCountPtr< Epetra_Time > Time_
Time object to track timing.
virtual int ApplyInverseSGS_LocalFastCrsMatrix(const Epetra_CrsMatrix *A, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual ~Ifpack_PointRelaxation()
Destructor.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
Teuchos::RefCountPtr< Epetra_Vector > Diagonal_
Contains the diagonal elements of Matrix.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
double ComputeFlops_
Contains the number of flops for Compute().
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
double Condest_
Contains the estimated condition number.
virtual double InitializeTime() const
Returns the time spent in Initialize().
long long NumGlobalNonzeros_
Number of global nonzeros.
virtual int ApplyInverseSGS_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 ApplyInverseGS(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the Gauss-Seidel preconditioner to X, returns the result in Y.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
std::string Label_
Contains the label of this object.
virtual int SetUseTranspose(bool UseTranspose_in)
virtual int NumInitialize() const
Returns the number of calls to Initialize().
int NumMyRows_
Number of local rows.
int NumCompute_
Contains the number of successful call to Compute().
virtual int Initialize()
Computes all it is necessary to initialize the preconditioner.
double ApplyInverseFlops_
Contain sthe number of flops for ApplyInverse().
bool IsInitialized_
If true, the preconditioner has been computed successfully.
double L1Eta_
Eta parameter for modified L1 method.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
virtual int NumCompute() const
Returns the number of calls to Compute().
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.