43#ifndef IFPACK_SPARSKIT_H
44#define IFPACK_SPARSKIT_H
46#include "Ifpack_ConfigDefs.h"
47#ifdef HAVE_IFPACK_SPARSKIT
48#include "Ifpack_CondestType.h"
50#include "Ifpack_Preconditioner.h"
51#include "Epetra_Vector.h"
52#include "Epetra_RowMatrix.h"
66 Ifpack_SPARSKIT(Epetra_RowMatrix* A);
69 virtual ~Ifpack_SPARSKIT();
81 int SetParameter(
const std::string Name,
const int Value)
85 int SetParameter(
const std::string Name,
const double Value)
90 const Epetra_RowMatrix&
Matrix()
const
102 return(IsInitialized_);
130 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
132 int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const
146 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
147 const int MaxIters = 1550,
148 const double Tol = 1e-9,
149 Epetra_RowMatrix* Matrix = 0);
170 int SetUseTranspose(
bool UseTranspose) {UseTranspose_ = UseTranspose;
return(0);};
173 double NormInf()
const {
return(0.0);};
185 const Epetra_Map &
OperatorRangeMap()
const{
return(A_.OperatorRangeMap());};
188 const Epetra_Comm &
Comm()
const{
return(Comm_);};
191 const char*
Label()
const
193 return(Label_.c_str());
196 int SetLabel(
const char* Label)
203 virtual std::ostream&
Print(std::ostream& os)
const;
208 return(NumInitialize_);
220 return(NumApplyInverse_);
226 return(InitializeTime_);
232 return(ComputeTime_);
238 return(ApplyInverseTime_);
258 Epetra_RowMatrix& A_;
259 const Epetra_Comm& Comm_;
270 std::vector<double> alu_;
271 std::vector<int> jlu_;
272 std::vector<int> ju_;
276 std::vector<int> iperm_;
288 mutable int NumApplyInverse_;
291 double InitializeTime_;
295 mutable double ApplyInverseTime_;
298 double ComputeFlops_;
300 mutable double ApplyInverseFlops_;
Ifpack_ScalingType enumerable type.
virtual int SetUseTranspose(bool UseTranspose)=0
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
virtual const Epetra_Comm & Comm() const=0
virtual const char * Label() const=0
virtual const Epetra_Map & OperatorDomainMap() const=0
virtual bool HasNormInf() const=0
virtual const Epetra_Map & OperatorRangeMap() const=0
virtual bool UseTranspose() const=0
virtual double NormInf() const=0
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Applies the preconditioner to vector X, returns the result in Y.
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 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 double ComputeTime() const =0
Returns the time spent in Compute().
virtual int NumCompute() const =0
Returns the number of calls to Compute().
virtual double ComputeFlops() const =0
Returns the number of flops in the computation phase.
virtual double InitializeTime() const =0
Returns the time spent in Initialize().
virtual bool IsComputed() const =0
Returns true if the preconditioner has been successfully computed, false otherwise.
virtual int NumApplyInverse() const =0
Returns the number of calls to ApplyInverse().
virtual int SetParameters(Teuchos::ParameterList &List)=0
Sets all parameters for the preconditioner.
virtual int NumInitialize() const =0
Returns the number of calls to Initialize().
virtual double Condest() const =0
Returns the computed condition number estimate, or -1.0 if not computed.
virtual const Epetra_RowMatrix & Matrix() const =0
Returns a pointer to the matrix to be preconditioned.
virtual double ApplyInverseTime() const =0
Returns the time spent in ApplyInverse().
virtual int Initialize()=0
Computes all it is necessary to initialize the preconditioner.
virtual double InitializeFlops() const =0
Returns the number of flops in the initialization phase.