46 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #warning "The Ifpack package is deprecated"
52 #include "Ifpack_ConfigDefs.h"
53 #include "Ifpack_Preconditioner.h"
54 #include "Ifpack_Condest.h"
56 #include "Ifpack_IlukGraph.h"
57 #include "Epetra_CompObject.h"
58 #include "Epetra_MultiVector.h"
59 #include "Epetra_Vector.h"
60 #include "Epetra_CrsGraph.h"
61 #include "Epetra_CrsMatrix.h"
62 #include "Epetra_BlockMap.h"
63 #include "Epetra_Map.h"
64 #include "Epetra_Object.h"
65 #include "Epetra_Comm.h"
66 #include "Epetra_RowMatrix.h"
67 #include "Epetra_Time.h"
68 #include "Teuchos_RefCountPtr.hpp"
111 return(IsInitialized_);
150 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
158 return(Multiply(
false,X,Y));
181 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
182 const int MaxIters = 1550,
183 const double Tol = 1e-9,
205 const char*
Label()
const {
return(Label_);}
210 strcpy(Label_,Label_in);
239 virtual std::ostream&
Print(std::ostream& os)
const;
244 return(NumInitialize_);
256 return(NumApplyInverse_);
262 return(InitializeTime_);
268 return(ComputeTime_);
274 return(ApplyInverseTime_);
285 return(ComputeFlops_);
290 return(ApplyInverseFlops_);
330 int LevelOfFill()
const {
return LevelOfFill_;}
333 double RelaxValue()
const {
return RelaxValue_;}
336 double AbsoluteThreshold()
const {
return Athresh_;}
339 double RelativeThreshold()
const {
return Rthresh_;}
341 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
342 int NumGlobalRows()
const {
return(Graph().NumGlobalRows());};
346 int NumGlobalCols()
const {
return(Graph().NumGlobalCols());};
349 int NumGlobalNonzeros()
const {
return(
L().NumGlobalNonzeros()+
U().NumGlobalNonzeros());};
352 virtual int NumGlobalBlockDiagonals()
const {
return(Graph().NumGlobalBlockDiagonals());};
355 long long NumGlobalRows64()
const {
return(Graph().NumGlobalRows64());};
357 long long NumGlobalCols64()
const {
return(Graph().NumGlobalCols64());};
359 long long NumGlobalNonzeros64()
const {
return(
L().NumGlobalNonzeros64()+
U().NumGlobalNonzeros64());};
361 virtual long long NumGlobalBlockDiagonals64()
const {
return(Graph().NumGlobalBlockDiagonals64());};
364 int NumMyRows()
const {
return(Graph().NumMyRows());};
367 int NumMyCols()
const {
return(Graph().NumMyCols());};
370 int NumMyNonzeros()
const {
return(
L().NumMyNonzeros()+
U().NumMyNonzeros());};
373 virtual int NumMyBlockDiagonals()
const {
return(Graph().NumMyBlockDiagonals());};
376 virtual int NumMyDiagonals()
const {
return(NumMyDiagonals_);};
379 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
380 int IndexBase()
const {
return(Graph().IndexBase());};
382 long long IndexBase64()
const {
return(Graph().IndexBase64());};
397 Teuchos::RefCountPtr<Epetra_RowMatrix> A_;
398 Teuchos::RefCountPtr<Ifpack_IlukGraph> Graph_;
399 Teuchos::RefCountPtr<Epetra_CrsGraph> CrsGraph_;
400 Teuchos::RefCountPtr<Epetra_Map> IlukRowMap_;
401 Teuchos::RefCountPtr<Epetra_Map> IlukDomainMap_;
402 Teuchos::RefCountPtr<Epetra_Map> IlukRangeMap_;
407 Teuchos::RefCountPtr<Epetra_CrsMatrix> L_;
409 Teuchos::RefCountPtr<Epetra_CrsMatrix> U_;
410 Teuchos::RefCountPtr<Epetra_CrsGraph> L_Graph_;
411 Teuchos::RefCountPtr<Epetra_CrsGraph> U_Graph_;
413 Teuchos::RefCountPtr<Epetra_Vector> D_;
418 bool ValuesInitialized_;
441 mutable int NumApplyInverse_;
443 double InitializeTime_;
447 mutable double ApplyInverseTime_;
449 double ComputeFlops_;
451 mutable double ApplyInverseFlops_;
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y...
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
virtual int NumCompute() const
Returns the number of calls to Compute().
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
bool UseTranspose() const
Returns the current UseTranspose setting.
Ifpack_IlukGraph: A class for constructing level filled graphs for use with ILU(k) class precondition...
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.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Ifpack_ILU: A class for constructing and using an incomplete lower/upper (ILU) factorization of a giv...
const Epetra_CrsMatrix & U() const
Returns the address of the L factor associated with this factored matrix.
virtual double ComputeTime() const
Returns the time spent in Compute().
int SetLabel(const char *Label_in)
Sets label for this object.
bool IsComputed() const
If factor is completed, this query returns true, otherwise it returns false.
int Compute()
Compute ILU factors L and U using the specified graph, diagonal perturbation thresholds and relaxatio...
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
Ifpack_ScalingType enumerable type.
int SetParameters(Teuchos::ParameterList ¶meterlist)
Set parameters using a Teuchos::ParameterList object.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
int Initialize()
Initialize the preconditioner, does not touch matrix values.
const Epetra_CrsMatrix & L() const
Returns the address of the L factor associated with this factored matrix.
virtual double InitializeTime() const
Returns the time spent in Initialize().
virtual double ApplyInverseFlops() const
Returns the number of flops in the application of the preconditioner.
bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized.
double Condest() const
Returns the computed estimated condition number, or -1.0 if not computed.
virtual std::ostream & Print(std::ostream &os) const
Prints on stream basic information about this object.
Ifpack_ILU(Epetra_RowMatrix *A)
Constructor.
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
const char * Label() const
Returns a character string describing the operator.
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
virtual int NumInitialize() const
Returns the number of calls to Initialize().
const Epetra_Vector & D() const
Returns the address of the D factor associated with this factored matrix.