51 #ifndef IFPACK_AMESOS2_H 52 #define IFPACK_AMESOS2_H 58 #include "ShyLUCore_config.h" 61 #ifdef HAVE_SHYLUCORE_MPI 62 # include "Epetra_MpiComm.h" 63 #endif // HAVE_SHYLUCORE_MPI 64 #include "Epetra_SerialComm.h" 65 #include "Epetra_Time.h" 66 #include "Epetra_CrsMatrix.h" 67 #include "Epetra_MultiVector.h" 68 #include "Epetra_LinearProblem.h" 69 #include "Epetra_Operator.h" 73 #include "Amesos_BaseSolver.h" 99 return(IsInitialized_);
119 int SetParameters(Teuchos::ParameterList& parameterlist);
121 int SetUseTranspose(
bool UseTranspose_in) {
122 UseTranspose_ = UseTranspose_in;
136 int Apply(
const Epetra_MultiVector& X,
137 Epetra_MultiVector& Y)
const 139 return(Multiply(
false,X,Y));
142 int Multiply(
bool Trans,
const Epetra_MultiVector& X,
143 Epetra_MultiVector& Y)
const{
return A_->Multiply(Trans,X,Y);}
154 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
166 const char*
Label()
const {
return(Label_);}
171 strcpy(Label_,Label_in);
189 const Epetra_Comm &
Comm()
const{
return(A_->Comm());};
198 virtual ostream& Print(ostream& os)
const;
203 return(NumInitialize_);
215 return(NumApplyInverse_);
221 return(InitializeTime_);
227 return(ComputeTime_);
233 return(ApplyInverseTime_);
242 virtual double ComputeFlops()
const 244 return(ComputeFlops_);
247 virtual double ApplyInverseFlops()
const 249 return(ApplyInverseFlops_);
272 int NumGlobalRows()
const {
return(A_->NumGlobalRows());};
275 int NumGlobalCols()
const {
return(A_->NumGlobalCols());};
278 int NumMyRows()
const {
return(A_->NumMyRows());};
281 int NumMyCols()
const {
return(A_->NumMyCols());};
287 Epetra_CrsMatrix *A_;
289 Teuchos::ParameterList List_;
291 Teuchos::RCP<Epetra_LinearProblem> LP_;
292 Teuchos::RCP<Amesos_BaseSolver> Solver_;
311 mutable int NumApplyInverse_;
313 double InitializeTime_;
317 mutable double ApplyInverseTime_;
319 double ComputeFlops_;
321 mutable double ApplyInverseFlops_;
323 mutable Epetra_Time Time_;
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
~AmesosSchurOperator()
Destructor.
bool IsComputed() const
If factor is completed, this query returns true, otherwise it returns false.
const char * Label() const
Returns a character string describing the operator.
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
virtual int NumCompute() const
Returns the number of calls to Compute().
bool UseTranspose() const
Returns the current UseTranspose setting.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
virtual int NumInitialize() const
Returns the number of calls to Initialize().
virtual double ComputeTime() const
Returns the time spent in Compute().
const Epetra_RowMatrix & Matrix() const
Returns a reference to the matrix to be preconditioned.
const Epetra_Comm & Comm() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
double Condest() const
Returns the computed estimated condition number, or -1.0 if not computed.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
int SetLabel(const char *Label_in)
Sets label for this object.
virtual double InitializeTime() const
Returns the time spent in Initialize().
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.