43 #ifndef IFPACK_AMESOS_H 44 #define IFPACK_AMESOS_H 46 #include "Ifpack_ConfigDefs.h" 47 #include "Ifpack_Preconditioner.h" 48 #include "Epetra_Operator.h" 49 #include "Teuchos_ParameterList.hpp" 50 #include "Teuchos_RefCountPtr.hpp" 55 class Amesos_BaseSolver;
145 virtual double NormInf()
const;
151 virtual const char *
Label()
const;
175 return(IsInitialized_);
217 virtual double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
218 const int MaxIters = 1550,
219 const double Tol = 1e-9,
231 return(NumInitialize_);
243 return(NumApplyInverse_);
249 return(InitializeTime_);
255 return(ComputeTime_);
261 return(ApplyInverseTime_);
273 return(ComputeFlops_);
279 return(ApplyInverseFlops_);
283 virtual const Teuchos::ParameterList& List()
const 289 virtual std::ostream&
Print(std::ostream& os)
const;
306 IsInitialized_ = IsInitialized_in;
312 IsComputed_ = IsComputed_in;
318 NumInitialize_ = NumInitialize_in;
324 NumCompute_ = NumCompute_in;
330 NumApplyInverse_ = NumApplyInverse_in;
336 InitializeTime_ = InitializeTime_in;
342 ComputeTime_ = ComputeTime_in;
348 ApplyInverseTime_ = ApplyInverseTime_in;
354 ComputeFlops_ = ComputeFlops_in;
360 ApplyInverseFlops_ = ApplyInverseFlops_in;
364 inline void SetList(
const Teuchos::ParameterList& List_in)
373 Teuchos::RefCountPtr<const Epetra_RowMatrix> Matrix_;
376 Teuchos::RefCountPtr<Epetra_LinearProblem> Problem_;
378 Teuchos::RefCountPtr<Amesos_BaseSolver> Solver_;
380 Teuchos::ParameterList List_;
398 mutable int NumApplyInverse_;
401 double InitializeTime_;
405 mutable double ApplyInverseTime_;
407 Teuchos::RefCountPtr<Epetra_Time> Time_;
410 double ComputeFlops_;
412 double ApplyInverseFlops_;
418 #endif // IFPACK_AMESOS_H void SetComputeFlops(const double ComputeFlops_in)
Sets ComputeFlops_.
void SetComputeTime(const double ComputeTime_in)
Sets ComputeTime_.
void SetNumInitialize(const int NumInitialize_in)
Sets NumInitialize_.
virtual std::ostream & Print(std::ostream &os) const
Prints on ostream basic information about this object.
virtual const char * Label() const
Returns a character string describing the operator.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual bool IsInitialized() const
Returns true is the preconditioner has been successfully initialized.
virtual double ApplyInverseTime() const
Returns the total time spent in ApplyInverse().
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
Ifpack_Amesos(Epetra_RowMatrix *Matrix)
Constructor.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
void SetIsInitialized(const bool IsInitialized_in)
Sets IsInitialized_.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual double InitializeTime() const
Returns the total time spent in Initialize().
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
void SetList(const Teuchos::ParameterList &List_in)
Set List_.
virtual double ComputeTime() const
Returns the total time spent in Compute().
virtual int NumCompute() const
Returns the number of calls to Compute().
virtual double ComputeFlops() const
Returns the total number of flops to computate the preconditioner.
Ifpack_Amesos: a class to use Amesos' factorizations as preconditioners.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
virtual int Compute()
Computes the preconditioners.
virtual double ApplyInverseFlops() const
Returns the total number of flops to apply the preconditioner.
void SetApplyInverseTime(const double ApplyInverseTime_in)
Sets ApplyInverseTime_.
virtual int Initialize()
Initializes the preconditioners.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
void SetIsComputed(const int IsComputed_in)
Sets IsComputed_.
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
virtual int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied (not implemented).
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual const Epetra_RowMatrix & Matrix() const
Returns a const reference to the internally stored matrix.
void SetNumApplyInverse(const int NumApplyInverse_in)
Sets NumApplyInverse_.
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
void SetNumCompute(const int NumCompute_in)
Sets NumCompute_.
void SetLabel(const char *Label_in)
Sets the label.
virtual ~Ifpack_Amesos()
Destructor.
Ifpack_Amesos & operator=(const Ifpack_Amesos &rhs)
Operator=.
virtual double Condest() const
Returns the estimated condition number, never computes it.
void SetInitializeTime(const double InitializeTime_in)
Sets InitializeTime_.
virtual int NumInitialize() const
Returns the number of calls to Initialize().
void SetApplyInverseFlops(const double ApplyInverseFlops_in)
Sets ComputeFlops_.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().