46 #include "Ifpack_ConfigDefs.h" 47 #include "Ifpack_CondestType.h" 49 #include "Ifpack_Preconditioner.h" 50 #include "Ifpack_IKLU_Utils.h" 51 #include "Epetra_Vector.h" 52 #include "Epetra_CrsMatrix.h" 53 #include "Epetra_Time.h" 54 #include "Teuchos_RefCountPtr.hpp" 56 class Epetra_RowMatrix;
57 class Epetra_SerialComm;
60 class Epetra_MultiVector;
99 int SetParameters(Teuchos::ParameterList& parameterlis);
113 return(IsInitialized_);
141 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
143 int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
146 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
147 const int MaxIters = 1550,
148 const double Tol = 1e-9,
149 Epetra_RowMatrix* Matrix_in = 0);
167 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
185 const Epetra_Comm &
Comm()
const{
return(Comm_);};
194 const Epetra_CrsMatrix &
L()
const {
return(*L_);};
197 const Epetra_CrsMatrix &
U()
const {
return(*U_);};
202 return(Label_.c_str());
213 virtual std::ostream& Print(std::ostream& os)
const;
218 return(NumInitialize_);
230 return(NumApplyInverse_);
236 return(InitializeTime_);
242 return(ComputeTime_);
248 return(ApplyInverseTime_);
259 return(ComputeFlops_);
264 return(ApplyInverseFlops_);
267 inline double LevelOfFill()
const {
268 return(LevelOfFill_);
291 return(DropTolerance_);
295 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 298 return(L().NumGlobalNonzeros() + U().NumGlobalNonzeros() - L().NumGlobalRows());
301 long long NumGlobalNonzeros64()
const {
303 return(L().NumGlobalNonzeros64() + U().NumGlobalNonzeros64() - L().NumGlobalRows64());
308 return(L().NumMyNonzeros() + U().NumMyNonzeros());
336 const Epetra_RowMatrix& A_;
338 const Epetra_Comm& Comm_;
340 Teuchos::RefCountPtr<Epetra_CrsMatrix> L_;
342 Teuchos::RefCountPtr<Epetra_CrsMatrix> U_;
354 double DropTolerance_;
372 mutable int NumApplyInverse_;
374 double InitializeTime_;
378 mutable double ApplyInverseTime_;
380 double ComputeFlops_;
382 mutable double ApplyInverseFlops_;
384 mutable Epetra_Time Time_;
386 long long GlobalNonzeros_;
387 Teuchos::RefCountPtr<Epetra_SerialComm> SerialComm_;
388 Teuchos::RefCountPtr<Epetra_Map> SerialMap_;
const Epetra_CrsMatrix & U() const
Returns a reference to the U factor.
const Epetra_RowMatrix & Matrix() const
Returns a reference to the matrix to be preconditioned.
const Epetra_CrsMatrix & L() const
Returns a reference to the L factor.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual double InitializeTime() const
Returns the time spent in Initialize().
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global graph.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual double ComputeTime() const
Returns the time spent in Compute().
int NumMyNonzeros() const
Returns the number of nonzero entries in the local graph.
Ifpack_ScalingType enumerable type.
virtual double ApplyInverseFlops() const
Returns the number of flops in the application of the preconditioner.
const char * Label() const
Returns the label of this object.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
bool IsComputed() const
If factor is completed, this query returns true, otherwise it returns false.
bool UseTranspose() const
Returns the current UseTranspose setting.
virtual int NumCompute() const
Returns the number of calls to Compute().
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
double DropTolerance() const
Gets the dropping tolerance.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
Ifpack_IKLU: A class for constructing and using an incomplete LU factorization of a given Epetra_RowM...
double RelativeThreshold() const
Get relative threshold value.
double RelaxValue() const
Set relative threshold value.
const Epetra_Comm & Comm() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
virtual int NumInitialize() const
Returns the number of calls to Initialize().
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
int SetLabel(const char *Label_in)
Sets the label for this object.
double AbsoluteThreshold() const
Get absolute threshold value.
double Condest() const
Returns the computed estimated condition number, or -1.0 if no computed.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.