47 #include "Epetra_Vector.h"
48 #include "Epetra_LinearProblem.h"
49 #include "Epetra_Map.h"
50 #include "Epetra_RowMatrix.h"
51 #ifdef HAVE_IFPACK_AZTECOO
61 double ConditionNumberEstimate = -1.0;
80 #ifdef HAVE_IFPACK_AZTECOO
94 Solver.SetAztecOption(AZ_output,AZ_none);
95 Solver.SetAztecOption(AZ_solver,AZ_cg_condnum);
96 Solver.Iterate(MaxIters,Tol);
98 const double* status = Solver.GetAztecStatus();
99 ConditionNumberEstimate = status[AZ_condnum];
104 #ifdef HAVE_IFPACK_AZTECOO
118 Solver.SetAztecOption(AZ_solver,AZ_gmres_condnum);
119 Solver.SetAztecOption(AZ_output,AZ_none);
123 Solver.SetAztecOption(AZ_kspace,MaxIters);
124 Solver.Iterate(MaxIters,Tol);
126 const double* status = Solver.GetAztecStatus();
127 ConditionNumberEstimate = status[AZ_condnum];
131 return(ConditionNumberEstimate);
void SetLHS(Epetra_MultiVector *X)
void SetOperator(Epetra_RowMatrix *A)
virtual const Epetra_RowMatrix & Matrix() const =0
Returns a pointer to the matrix to be preconditioned.
virtual const Epetra_Map & OperatorDomainMap() const =0
Ifpack_CondestType
Ifpack_CondestType: enum to define the type of condition number estimate.
virtual const Epetra_Map & OperatorRangeMap() const =0
Uses AztecOO's GMRES.
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.
double Ifpack_Condest(const Ifpack_Preconditioner &IFP, const Ifpack_CondestType CT, const int MaxIters, const double Tol, Epetra_RowMatrix *Matrix)
void SetRHS(Epetra_MultiVector *B)
#define IFPACK_CHK_ERR(ifpack_err)