43 #ifndef IFPACK_SPARSKIT_H
44 #define IFPACK_SPARSKIT_H
46 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #warning "The Ifpack package is deprecated"
52 #include "Ifpack_ConfigDefs.h"
53 #ifdef HAVE_IFPACK_SPARSKIT
54 #include "Ifpack_CondestType.h"
56 #include "Ifpack_Preconditioner.h"
57 #include "Epetra_Vector.h"
58 #include "Epetra_RowMatrix.h"
75 virtual ~Ifpack_SPARSKIT();
87 int SetParameter(
const std::string Name,
const int Value)
91 int SetParameter(
const std::string Name,
const double Value)
108 return(IsInitialized_);
152 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
153 const int MaxIters = 1550,
154 const double Tol = 1e-9,
179 double NormInf()
const {
return(0.0);};
197 const char*
Label()
const
199 return(Label_.c_str());
202 int SetLabel(
const char* Label)
209 virtual std::ostream&
Print(std::ostream& os)
const;
214 return(NumInitialize_);
226 return(NumApplyInverse_);
232 return(InitializeTime_);
238 return(ComputeTime_);
244 return(ApplyInverseTime_);
276 std::vector<double> alu_;
277 std::vector<int> jlu_;
278 std::vector<int> ju_;
282 std::vector<int> iperm_;
294 mutable int NumApplyInverse_;
297 double InitializeTime_;
301 mutable double ApplyInverseTime_;
304 double ComputeFlops_;
306 mutable double ApplyInverseFlops_;
310 #endif // HAVE_IFPACK_SPARSKIT
virtual int NumInitialize() const =0
Returns the number of calls to Initialize().
virtual int SetUseTranspose(bool UseTranspose)=0
virtual double ComputeTime() const =0
Returns the time spent in Compute().
virtual double ComputeFlops() const =0
Returns the number of flops in the computation phase.
virtual double ApplyInverseTime() const =0
Returns the time spent in ApplyInverse().
virtual double ApplyInverseFlops() const =0
Returns the number of flops in the application of the preconditioner.
virtual const Epetra_RowMatrix & Matrix() const =0
Returns a pointer to the matrix to be preconditioned.
virtual bool IsInitialized() const =0
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual std::ostream & Print(std::ostream &os) const =0
Prints basic information on iostream. This function is used by operator<<.
virtual const Epetra_Map & OperatorDomainMap() const =0
virtual const char * Label() const =0
virtual int Initialize()=0
Computes all it is necessary to initialize the preconditioner.
virtual double InitializeTime() const =0
Returns the time spent in Initialize().
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
virtual const Epetra_Map & OperatorRangeMap() const =0
virtual const Epetra_Comm & Comm() const =0
virtual int SetParameters(Teuchos::ParameterList &List)=0
Sets all parameters for the preconditioner.
virtual double Condest() const =0
Returns the computed condition number estimate, or -1.0 if not computed.
virtual bool UseTranspose() const =0
Ifpack_ScalingType enumerable type.
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 double InitializeFlops() const =0
Returns the number of flops in the initialization phase.
virtual bool HasNormInf() const =0
virtual int NumCompute() const =0
Returns the number of calls to Compute().
virtual double NormInf() const =0
virtual bool IsComputed() const =0
Returns true if the preconditioner has been successfully computed, false otherwise.
virtual int Compute()=0
Computes all it is necessary to apply the preconditioner.
virtual int NumApplyInverse() const =0
Returns the number of calls to ApplyInverse().