IFPACK Development
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ifpack_ILUT Class Reference

Ifpack_ILUT: A class for constructing and using an incomplete LU factorization of a given Epetra_RowMatrix. More...

#include <Ifpack_ILUT.h>

Inheritance diagram for Ifpack_ILUT:
Inheritance graph
[legend]
Collaboration diagram for Ifpack_ILUT:
Collaboration graph
[legend]

Public Member Functions

 Ifpack_ILUT (const Epetra_RowMatrix *A)
 Ifpack_ILUT constuctor with variable number of indices per row.
 
virtual ~Ifpack_ILUT ()
 Ifpack_ILUT Destructor.
 
int SetParameters (Teuchos::ParameterList &parameterlis)
 Set parameters using a Teuchos::ParameterList object.
 
int Initialize ()
 Initialize L and U with values from user matrix A.
 
bool IsInitialized () const
 Returns true if the preconditioner has been successfully initialized.
 
int Compute ()
 Compute IC factor U using the specified graph, diagonal perturbation thresholds and relaxation parameters.
 
bool IsComputed () const
 If factor is completed, this query returns true, otherwise it returns false.
 
int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Ifpack_ILUT forward/back solve on a Epetra_MultiVector X in Y.
 
int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 
double Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix_in=0)
 Computed the estimated condition number and returns the value.
 
double Condest () const
 Returns the computed estimated condition number, or -1.0 if no computed.
 
int SetUseTranspose (bool UseTranspose_in)
 If set true, transpose of this operator will be applied.
 
double NormInf () const
 Returns 0.0 because this class cannot compute Inf-norm.
 
bool HasNormInf () const
 Returns false because this class cannot compute an Inf-norm.
 
bool UseTranspose () const
 Returns the current UseTranspose setting.
 
const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
 
const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.
 
const Epetra_CommComm () const
 Returns the Epetra_BlockMap object associated with the range of this matrix operator.
 
const Epetra_RowMatrixMatrix () const
 Returns a reference to the matrix to be preconditioned.
 
const Epetra_CrsMatrixL () const
 Returns a reference to the L factor.
 
const Epetra_CrsMatrixU () const
 Returns a reference to the U factor.
 
const char * Label () const
 Returns the label of this object.
 
int SetLabel (const char *Label_in)
 Sets the label for this object.
 
virtual std::ostream & Print (std::ostream &os) const
 Prints basic information on iostream. This function is used by operator<<.
 
virtual int NumInitialize () const
 Returns the number of calls to Initialize().
 
virtual int NumCompute () const
 Returns the number of calls to Compute().
 
virtual int NumApplyInverse () const
 Returns the number of calls to ApplyInverse().
 
virtual double InitializeTime () const
 Returns the time spent in Initialize().
 
virtual double ComputeTime () const
 Returns the time spent in Compute().
 
virtual double ApplyInverseTime () const
 Returns the time spent in ApplyInverse().
 
virtual double InitializeFlops () const
 Returns the number of flops in the initialization phase.
 
virtual double ComputeFlops () const
 Returns the number of flops in the computation phase.
 
virtual double ApplyInverseFlops () const
 Returns the number of flops in the application of the preconditioner.
 
double LevelOfFill () const
 
double RelaxValue () const
 Set relative threshold value.
 
double AbsoluteThreshold () const
 Get absolute threshold value.
 
double RelativeThreshold () const
 Get relative threshold value.
 
double DropTolerance () const
 Gets the dropping tolerance.
 
int NumGlobalNonzeros () const
 Returns the number of nonzero entries in the global graph.
 
long long NumGlobalNonzeros64 () const
 
int NumMyNonzeros () const
 Returns the number of nonzero entries in the local graph.
 
virtual int SetParameters (Teuchos::ParameterList &List)=0
 Sets all parameters for the preconditioner.
 
virtual int Initialize ()=0
 Computes all it is necessary to initialize the preconditioner.
 
virtual bool IsInitialized () const =0
 Returns true if the preconditioner has been successfully initialized, false otherwise.
 
virtual int Compute ()=0
 Computes all it is necessary to apply the preconditioner.
 
virtual bool IsComputed () const =0
 Returns true if the preconditioner has been successfully computed, false otherwise.
 
virtual double Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix=0)=0
 Computes the condition number estimate, returns its value.
 
virtual double Condest () const =0
 Returns the computed condition number estimate, or -1.0 if not computed.
 
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
 Applies the preconditioner to vector X, returns the result in Y.
 
virtual const Epetra_RowMatrixMatrix () const =0
 Returns a pointer to the matrix to be preconditioned.
 
virtual int NumInitialize () const =0
 Returns the number of calls to Initialize().
 
virtual int NumCompute () const =0
 Returns the number of calls to Compute().
 
virtual int NumApplyInverse () const =0
 Returns the number of calls to ApplyInverse().
 
virtual double InitializeTime () const =0
 Returns the time spent in Initialize().
 
virtual double ComputeTime () const =0
 Returns the time spent in Compute().
 
virtual double ApplyInverseTime () const =0
 Returns the time spent in ApplyInverse().
 
virtual double InitializeFlops () const =0
 Returns the number of flops in the initialization phase.
 
virtual double ComputeFlops () const =0
 Returns the number of flops in the computation phase.
 
virtual double ApplyInverseFlops () const =0
 Returns the number of flops in the application of the preconditioner.
 
virtual std::ostream & Print (std::ostream &os) const =0
 Prints basic information on iostream. This function is used by operator<<.
 
virtual int SetUseTranspose (bool UseTranspose)=0
 
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
 
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
 
virtual double NormInf () const=0
 
virtual const char * Label () const=0
 
virtual bool UseTranspose () const=0
 
virtual bool HasNormInf () const=0
 
virtual const Epetra_CommComm () const=0
 
virtual const Epetra_MapOperatorDomainMap () const=0
 
virtual const Epetra_MapOperatorRangeMap () const=0
 
virtual int SetUseTranspose (bool UseTranspose)=0
 
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
 
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
 
virtual double NormInf () const=0
 
virtual const char * Label () const=0
 
virtual bool UseTranspose () const=0
 
virtual bool HasNormInf () const=0
 
virtual const Epetra_CommComm () const=0
 
virtual const Epetra_MapOperatorDomainMap () const=0
 
virtual const Epetra_MapOperatorRangeMap () const=0
 

Detailed Description

Ifpack_ILUT: A class for constructing and using an incomplete LU factorization of a given Epetra_RowMatrix.

The Ifpack_ILUT class computes a "Relaxed" ILUT factorization with dual threshold dropping of small elements of a given Epetra_RowMatrix.

This implementation does not use the algorithm that is described in General description of incomplete factorizations. The algorithm drops entries in a row (i) of matrix A that are smaller than drop_tolerance even before the factorization of row i then computes the factorization for that row. This is different than the usual algorithm where the drop tolerance is applied to the factored rows.

The complete list of supported parameters is reported in page List of Supported Parameters.

Author
Marzio Sala, SNL 9214.
Date
Last modified on 22-Jan-05.

Definition at line 81 of file Ifpack_ILUT.h.

Constructor & Destructor Documentation

◆ Ifpack_ILUT()

Ifpack_ILUT::Ifpack_ILUT ( const Epetra_RowMatrix A)

Ifpack_ILUT constuctor with variable number of indices per row.

Definition at line 66 of file Ifpack_ILUT.cpp.

◆ ~Ifpack_ILUT()

Ifpack_ILUT::~Ifpack_ILUT ( )
virtual

Ifpack_ILUT Destructor.

Definition at line 94 of file Ifpack_ILUT.cpp.

Member Function Documentation

◆ AbsoluteThreshold()

double Ifpack_ILUT::AbsoluteThreshold ( ) const
inline

Get absolute threshold value.

Definition at line 278 of file Ifpack_ILUT.h.

Referenced by Print(), and SetParameters().

◆ Apply()

int Ifpack_ILUT::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const
virtual

Implements Epetra_Operator.

Definition at line 584 of file Ifpack_ILUT.cpp.

◆ ApplyInverse()

int Ifpack_ILUT::ApplyInverse ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const
virtual

Returns the result of a Ifpack_ILUT forward/back solve on a Epetra_MultiVector X in Y.

Parameters
X- (In) A Epetra_MultiVector of dimension NumVectors to solve for.
Y- (Out) A Epetra_MultiVector of dimension NumVectorscontaining result.
Returns
Integer error code, set to 0 if successful.

Implements Ifpack_Preconditioner.

Definition at line 537 of file Ifpack_ILUT.cpp.

References Epetra_Time::ElapsedTime(), IsComputed(), Epetra_MultiVector::NumVectors(), Epetra_MultiVector::Pointers(), and Epetra_Time::ResetStartTime().

◆ ApplyInverseFlops()

virtual double Ifpack_ILUT::ApplyInverseFlops ( ) const
inlinevirtual

Returns the number of flops in the application of the preconditioner.

Implements Ifpack_Preconditioner.

Definition at line 263 of file Ifpack_ILUT.h.

Referenced by Print().

◆ ApplyInverseTime()

virtual double Ifpack_ILUT::ApplyInverseTime ( ) const
inlinevirtual

Returns the time spent in ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 247 of file Ifpack_ILUT.h.

Referenced by Print().

◆ Comm()

const Epetra_Comm & Ifpack_ILUT::Comm ( ) const
inlinevirtual

Returns the Epetra_BlockMap object associated with the range of this matrix operator.

Implements Epetra_Operator.

Definition at line 186 of file Ifpack_ILUT.h.

Referenced by Compute(), Initialize(), and Print().

◆ Compute()

int Ifpack_ILUT::Compute ( )
virtual

Compute IC factor U using the specified graph, diagonal perturbation thresholds and relaxation parameters.

This function computes the RILU(k) factors L and U using the current:

  1. Ifpack_IlukGraph specifying the structure of L and U.
  2. Value for the RILU(k) relaxation parameter.
  3. Value for the a priori diagonal threshold values.

InitValues() must be called before the factorization can proceed.

Implements Ifpack_Preconditioner.

Definition at line 495 of file Ifpack_ILUT.cpp.

References Comm(), Initialize(), IsInitialized(), Epetra_RowMatrix::NumMyRows(), Epetra_Comm::NumProc(), Epetra_Time::ResetStartTime(), and Epetra_RowMatrix::RowMatrixRowMap().

◆ ComputeFlops()

virtual double Ifpack_ILUT::ComputeFlops ( ) const
inlinevirtual

Returns the number of flops in the computation phase.

Implements Ifpack_Preconditioner.

Definition at line 258 of file Ifpack_ILUT.h.

Referenced by Print().

◆ ComputeTime()

virtual double Ifpack_ILUT::ComputeTime ( ) const
inlinevirtual

Returns the time spent in Compute().

Implements Ifpack_Preconditioner.

Definition at line 241 of file Ifpack_ILUT.h.

Referenced by Print().

◆ Condest() [1/2]

double Ifpack_ILUT::Condest ( ) const
inlinevirtual

Returns the computed estimated condition number, or -1.0 if no computed.

Implements Ifpack_Preconditioner.

Definition at line 154 of file Ifpack_ILUT.h.

Referenced by Print().

◆ Condest() [2/2]

double Ifpack_ILUT::Condest ( const Ifpack_CondestType  CT = Ifpack_Cheap,
const int  MaxIters = 1550,
const double  Tol = 1e-9,
Epetra_RowMatrix Matrix_in = 0 
)
virtual

Computed the estimated condition number and returns the value.

Implements Ifpack_Preconditioner.

Definition at line 591 of file Ifpack_ILUT.cpp.

References IsComputed().

◆ DropTolerance()

double Ifpack_ILUT::DropTolerance ( ) const
inline

Gets the dropping tolerance.

Definition at line 290 of file Ifpack_ILUT.h.

Referenced by SetParameters().

◆ HasNormInf()

bool Ifpack_ILUT::HasNormInf ( ) const
inlinevirtual

Returns false because this class cannot compute an Inf-norm.

Implements Epetra_Operator.

Definition at line 174 of file Ifpack_ILUT.h.

◆ Initialize()

int Ifpack_ILUT::Initialize ( )
virtual

Initialize L and U with values from user matrix A.

Copies values from the user's matrix into the nonzero pattern of L and U.

Parameters
InA - User matrix to be factored.
Warning
The graph of A must be identical to the graph passed in to Ifpack_IlukGraph constructor.

Implements Ifpack_Preconditioner.

Definition at line 144 of file Ifpack_ILUT.cpp.

References Comm(), Epetra_Time::ElapsedTime(), Matrix(), Epetra_RowMatrix::NumMyRows(), and Epetra_Time::ResetStartTime().

Referenced by Compute().

◆ InitializeFlops()

virtual double Ifpack_ILUT::InitializeFlops ( ) const
inlinevirtual

Returns the number of flops in the initialization phase.

Implements Ifpack_Preconditioner.

Definition at line 253 of file Ifpack_ILUT.h.

◆ InitializeTime()

virtual double Ifpack_ILUT::InitializeTime ( ) const
inlinevirtual

Returns the time spent in Initialize().

Implements Ifpack_Preconditioner.

Definition at line 235 of file Ifpack_ILUT.h.

Referenced by Print().

◆ IsComputed()

bool Ifpack_ILUT::IsComputed ( ) const
inlinevirtual

If factor is completed, this query returns true, otherwise it returns false.

Implements Ifpack_Preconditioner.

Definition at line 130 of file Ifpack_ILUT.h.

Referenced by ApplyInverse(), and Condest().

◆ IsInitialized()

bool Ifpack_ILUT::IsInitialized ( ) const
inlinevirtual

Returns true if the preconditioner has been successfully initialized.

Implements Ifpack_Preconditioner.

Definition at line 113 of file Ifpack_ILUT.h.

Referenced by Compute().

◆ L()

const Epetra_CrsMatrix & Ifpack_ILUT::L ( ) const
inline

Returns a reference to the L factor.

Definition at line 195 of file Ifpack_ILUT.h.

Referenced by NumGlobalNonzeros(), and NumMyNonzeros().

◆ Label()

const char * Ifpack_ILUT::Label ( ) const
inlinevirtual

Returns the label of this object.

Implements Epetra_Operator.

Definition at line 201 of file Ifpack_ILUT.h.

Referenced by Print().

◆ LevelOfFill()

double Ifpack_ILUT::LevelOfFill ( ) const
inline

Definition at line 268 of file Ifpack_ILUT.h.

◆ Matrix()

const Epetra_RowMatrix & Ifpack_ILUT::Matrix ( ) const
inlinevirtual

Returns a reference to the matrix to be preconditioned.

Implements Ifpack_Preconditioner.

Definition at line 189 of file Ifpack_ILUT.h.

Referenced by Initialize().

◆ NormInf()

double Ifpack_ILUT::NormInf ( ) const
inlinevirtual

Returns 0.0 because this class cannot compute Inf-norm.

Implements Epetra_Operator.

Definition at line 171 of file Ifpack_ILUT.h.

◆ NumApplyInverse()

virtual int Ifpack_ILUT::NumApplyInverse ( ) const
inlinevirtual

Returns the number of calls to ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 229 of file Ifpack_ILUT.h.

Referenced by Print().

◆ NumCompute()

virtual int Ifpack_ILUT::NumCompute ( ) const
inlinevirtual

Returns the number of calls to Compute().

Implements Ifpack_Preconditioner.

Definition at line 223 of file Ifpack_ILUT.h.

Referenced by Print().

◆ NumGlobalNonzeros()

int Ifpack_ILUT::NumGlobalNonzeros ( ) const
inline

Returns the number of nonzero entries in the global graph.

Definition at line 297 of file Ifpack_ILUT.h.

References L(), NumGlobalNonzeros(), and U().

Referenced by NumGlobalNonzeros().

◆ NumGlobalNonzeros64()

long long Ifpack_ILUT::NumGlobalNonzeros64 ( ) const
inline

Definition at line 302 of file Ifpack_ILUT.h.

◆ NumInitialize()

virtual int Ifpack_ILUT::NumInitialize ( ) const
inlinevirtual

Returns the number of calls to Initialize().

Implements Ifpack_Preconditioner.

Definition at line 217 of file Ifpack_ILUT.h.

Referenced by Print().

◆ NumMyNonzeros()

int Ifpack_ILUT::NumMyNonzeros ( ) const
inline

Returns the number of nonzero entries in the local graph.

Definition at line 308 of file Ifpack_ILUT.h.

References L(), NumMyNonzeros(), and U().

Referenced by NumMyNonzeros().

◆ OperatorDomainMap()

const Epetra_Map & Ifpack_ILUT::OperatorDomainMap ( ) const
inlinevirtual

Returns the Epetra_Map object associated with the domain of this operator.

Implements Epetra_Operator.

Definition at line 180 of file Ifpack_ILUT.h.

References Epetra_Operator::OperatorDomainMap().

◆ OperatorRangeMap()

const Epetra_Map & Ifpack_ILUT::OperatorRangeMap ( ) const
inlinevirtual

Returns the Epetra_Map object associated with the range of this operator.

Implements Epetra_Operator.

Definition at line 183 of file Ifpack_ILUT.h.

References Epetra_Operator::OperatorRangeMap().

◆ Print()

std::ostream & Ifpack_ILUT::Print ( std::ostream &  os) const
virtual

Prints basic information on iostream. This function is used by operator<<.

Implements Ifpack_Preconditioner.

Definition at line 607 of file Ifpack_ILUT.cpp.

References AbsoluteThreshold(), ApplyInverseFlops(), ApplyInverseTime(), Comm(), ComputeFlops(), ComputeTime(), Condest(), InitializeTime(), Label(), NumApplyInverse(), NumCompute(), NumInitialize(), RelativeThreshold(), and RelaxValue().

◆ RelativeThreshold()

double Ifpack_ILUT::RelativeThreshold ( ) const
inline

Get relative threshold value.

Definition at line 284 of file Ifpack_ILUT.h.

Referenced by Print(), and SetParameters().

◆ RelaxValue()

double Ifpack_ILUT::RelaxValue ( ) const
inline

Set relative threshold value.

Definition at line 273 of file Ifpack_ILUT.h.

Referenced by Print(), and SetParameters().

◆ SetLabel()

int Ifpack_ILUT::SetLabel ( const char *  Label_in)
inline

Sets the label for this object.

Definition at line 207 of file Ifpack_ILUT.h.

◆ SetParameters()

int Ifpack_ILUT::SetParameters ( Teuchos::ParameterList &  parameterlis)
virtual

Set parameters using a Teuchos::ParameterList object.

Implements Ifpack_Preconditioner.

Definition at line 107 of file Ifpack_ILUT.cpp.

References AbsoluteThreshold(), DropTolerance(), RelativeThreshold(), and RelaxValue().

◆ SetUseTranspose()

int Ifpack_ILUT::SetUseTranspose ( bool  UseTranspose_in)
inlinevirtual

If set true, transpose of this operator will be applied.

This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.

Parameters
UseTranspose_in- (In) If true, multiply by the transpose of operator, otherwise just use operator.
Returns
Always returns 0.

Implements Epetra_Operator.

Definition at line 168 of file Ifpack_ILUT.h.

◆ U()

const Epetra_CrsMatrix & Ifpack_ILUT::U ( ) const
inline

Returns a reference to the U factor.

Definition at line 198 of file Ifpack_ILUT.h.

Referenced by NumGlobalNonzeros(), and NumMyNonzeros().

◆ UseTranspose()

bool Ifpack_ILUT::UseTranspose ( ) const
inlinevirtual

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 177 of file Ifpack_ILUT.h.


The documentation for this class was generated from the following files: