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;
146 virtual double NormInf()
const;
152 virtual const char *
Label()
const;
176 return(IsInitialized_);
218 virtual double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
219 const int MaxIters = 1550,
220 const double Tol = 1e-9,
232 return(NumInitialize_);
244 return(NumApplyInverse_);
250 return(InitializeTime_);
256 return(ComputeTime_);
262 return(ApplyInverseTime_);
274 return(ComputeFlops_);
280 return(ApplyInverseFlops_);
284 virtual const Teuchos::ParameterList& List()
const
290 virtual std::ostream&
Print(std::ostream& os)
const;
307 IsInitialized_ = IsInitialized_in;
313 IsComputed_ = IsComputed_in;
319 NumInitialize_ = NumInitialize_in;
325 NumCompute_ = NumCompute_in;
331 NumApplyInverse_ = NumApplyInverse_in;
337 InitializeTime_ = InitializeTime_in;
343 ComputeTime_ = ComputeTime_in;
349 ApplyInverseTime_ = ApplyInverseTime_in;
355 ComputeFlops_ = ComputeFlops_in;
361 ApplyInverseFlops_ = ApplyInverseFlops_in;
365 inline void SetList(
const Teuchos::ParameterList& List_in)
374 Teuchos::RefCountPtr<const Epetra_RowMatrix> Matrix_;
377 Teuchos::RefCountPtr<Epetra_LinearProblem> Problem_;
379 Teuchos::RefCountPtr<Amesos_BaseSolver> Solver_;
381 Teuchos::ParameterList List_;
399 mutable int NumApplyInverse_;
402 double InitializeTime_;
406 mutable double ApplyInverseTime_;
408 Teuchos::RefCountPtr<Epetra_Time> Time_;
411 double ComputeFlops_;
413 double ApplyInverseFlops_;
419 #endif // IFPACK_AMESOS_H
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
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 double ComputeTime() const
Returns the total time spent in Compute().
virtual int NumInitialize() const
Returns the number of calls to Initialize().
virtual double ApplyInverseTime() const
Returns the total time spent in ApplyInverse().
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner.
virtual double ComputeFlops() const
Returns the total number of flops to computate the preconditioner.
virtual int NumCompute() const
Returns the number of calls to Compute().
Ifpack_Amesos(Epetra_RowMatrix *Matrix)
Constructor.
virtual double ApplyInverseFlops() const
Returns the total number of flops to apply the preconditioner.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the matrix to an Epetra_MultiVector.
void SetIsInitialized(const bool IsInitialized_in)
Sets IsInitialized_.
virtual const Epetra_RowMatrix & Matrix() const
Returns a const reference to the internally stored matrix.
void SetList(const Teuchos::ParameterList &List_in)
Set List_.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
Ifpack_Amesos: a class to use Amesos' factorizations as preconditioners.
virtual int Compute()
Computes the preconditioners.
void SetApplyInverseTime(const double ApplyInverseTime_in)
Sets ApplyInverseTime_.
virtual int Initialize()
Initializes the preconditioners.
void SetIsComputed(const int IsComputed_in)
Sets IsComputed_.
virtual int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied (not implemented).
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual const char * Label() const
Returns a character string describing the operator.
virtual double Condest() const
Returns the estimated condition number, never computes it.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to X, returns the result in Y.
virtual double InitializeTime() const
Returns the total time spent in Initialize().
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
void SetNumApplyInverse(const int NumApplyInverse_in)
Sets NumApplyInverse_.
void SetNumCompute(const int NumCompute_in)
Sets NumCompute_.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
void SetLabel(const char *Label_in)
Sets the label.
virtual ~Ifpack_Amesos()
Destructor.
Ifpack_Amesos & operator=(const Ifpack_Amesos &rhs)
Operator=.
virtual bool IsInitialized() const
Returns true is the preconditioner has been successfully initialized.
virtual double NormInf() const
Returns the infinity norm of the global matrix (not implemented)
void SetInitializeTime(const double InitializeTime_in)
Sets InitializeTime_.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual std::ostream & Print(std::ostream &os) const
Prints on ostream basic information about this object.
void SetApplyInverseFlops(const double ApplyInverseFlops_in)
Sets ComputeFlops_.