46 #include "Ifpack_ConfigDefs.h" 47 #include "Ifpack_CondestType.h" 49 #include "Ifpack_Preconditioner.h" 50 #include "Epetra_Vector.h" 51 #include "Epetra_CrsMatrix.h" 52 #include "Epetra_Time.h" 53 #include "Teuchos_RefCountPtr.hpp" 55 class Epetra_RowMatrix;
56 class Epetra_SerialComm;
59 class Epetra_MultiVector;
101 int SetParameters(Teuchos::ParameterList& parameterlis);
115 return(IsInitialized_);
143 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
145 int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
148 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
149 const int MaxIters = 1550,
150 const double Tol = 1e-9,
151 Epetra_RowMatrix* Matrix_in = 0);
169 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
187 const Epetra_Comm &
Comm()
const{
return(Comm_);};
196 const Epetra_CrsMatrix &
L()
const {
return(*L_);};
199 const Epetra_CrsMatrix &
U()
const {
return(*U_);};
204 return(Label_.c_str());
215 virtual std::ostream& Print(std::ostream& os)
const;
220 return(NumInitialize_);
232 return(NumApplyInverse_);
238 return(InitializeTime_);
244 return(ComputeTime_);
250 return(ApplyInverseTime_);
261 return(ComputeFlops_);
266 return(ApplyInverseFlops_);
269 inline double LevelOfFill()
const {
270 return(LevelOfFill_);
293 return(DropTolerance_);
297 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 300 return(L().NumGlobalNonzeros() + U().NumGlobalNonzeros() - L().NumGlobalRows());
303 long long NumGlobalNonzeros64()
const {
305 return(L().NumGlobalNonzeros64() + U().NumGlobalNonzeros64() - L().NumGlobalRows64());
310 return(L().NumMyNonzeros() + U().NumMyNonzeros());
331 template<
typename int_type>
341 const Epetra_RowMatrix& A_;
343 const Epetra_Comm& Comm_;
345 Teuchos::RefCountPtr<Epetra_CrsMatrix> L_;
347 Teuchos::RefCountPtr<Epetra_CrsMatrix> U_;
359 double DropTolerance_;
375 mutable int NumApplyInverse_;
377 double InitializeTime_;
381 mutable double ApplyInverseTime_;
383 double ComputeFlops_;
385 mutable double ApplyInverseFlops_;
387 mutable Epetra_Time Time_;
389 long long GlobalNonzeros_;
390 Teuchos::RefCountPtr<Epetra_SerialComm> SerialComm_;
391 Teuchos::RefCountPtr<Epetra_Map> SerialMap_;
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
const Epetra_RowMatrix & Matrix() const
Returns a reference to the matrix to be preconditioned.
double Condest() const
Returns the computed estimated condition number, or -1.0 if no computed.
bool IsComputed() const
If factor is completed, this query returns true, otherwise it returns false.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual int NumInitialize() const
Returns the number of calls to Initialize().
const Epetra_CrsMatrix & U() const
Returns a reference to the U factor.
const Epetra_CrsMatrix & L() const
Returns a reference to the L factor.
int NumMyNonzeros() const
Returns the number of nonzero entries in the local graph.
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
double RelativeThreshold() const
Get relative threshold value.
const Epetra_Comm & Comm() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
Ifpack_ScalingType enumerable type.
virtual int NumCompute() const
Returns the number of calls to Compute().
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
bool UseTranspose() const
Returns the current UseTranspose setting.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized.
virtual double ApplyInverseFlops() const
Returns the number of flops in the application of the preconditioner.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
double DropTolerance() const
Gets the dropping tolerance.
virtual double ComputeTime() const
Returns the time spent in Compute().
double AbsoluteThreshold() const
Get absolute threshold value.
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global graph.
const char * Label() const
Returns the label of this object.
Ifpack_ILUT: A class for constructing and using an incomplete LU factorization of a given Epetra_RowM...
virtual double InitializeTime() const
Returns the time spent in Initialize().
int SetLabel(const char *Label_in)
Sets the label for this object.
double RelaxValue() const
Set relative threshold value.