IFPACK Development
|
Ifpack_ILU: A class for constructing and using an incomplete lower/upper (ILU) factorization of a given Epetra_RowMatrix. More...
#include <Ifpack_ILU.h>
Public Member Functions | |
Ifpack_ILU (Epetra_RowMatrix *A) | |
Constructor. | |
~Ifpack_ILU () | |
Destructor. | |
int | Initialize () |
Initialize the preconditioner, does not touch matrix values. | |
bool | IsInitialized () const |
Returns true if the preconditioner has been successfully initialized. | |
int | Compute () |
Compute ILU factors L and 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 | SetParameters (Teuchos::ParameterList ¶meterlist) |
Set parameters using a Teuchos::ParameterList object. | |
int | SetUseTranspose (bool UseTranspose_in) |
If set true, transpose of this operator will be applied. | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
int | Multiply (bool Trans, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
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. | |
double | Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix_in=0) |
Computes the estimated condition number and returns the value. | |
double | Condest () const |
Returns the computed estimated condition number, or -1.0 if not computed. | |
const Epetra_CrsMatrix & | L () const |
Returns the address of the L factor associated with this factored matrix. | |
const Epetra_Vector & | D () const |
Returns the address of the D factor associated with this factored matrix. | |
const Epetra_CrsMatrix & | U () const |
Returns the address of the L factor associated with this factored matrix. | |
const char * | Label () const |
Returns a character string describing the operator. | |
int | SetLabel (const char *Label_in) |
Sets label for this object. | |
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_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. | |
const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. | |
const Epetra_Comm & | Comm () const |
Returns the Epetra_BlockMap object associated with the range of this matrix operator. | |
const Epetra_RowMatrix & | Matrix () const |
Returns a reference to the matrix to be preconditioned. | |
virtual std::ostream & | Print (std::ostream &os) const |
Prints on stream basic information about this object. | |
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. | |
Ifpack_ILU: A class for constructing and using an incomplete lower/upper (ILU) factorization of a given Epetra_RowMatrix.
The Ifpack_ILU class computes a "relaxed" ILU factorization with level k fill of a given Epetra_RowMatrix. The notion of relaxation is the same as described in "Experimental study of ILU preconditioners for indefinite matrices" by Chow and Saad.
Please refer to General description of incomplete factorizations for a general description of the ILU algorithm.
The complete list of supported parameters is reported in page List of Supported Parameters.
Definition at line 83 of file Ifpack_ILU.h.
Ifpack_ILU::Ifpack_ILU | ( | Epetra_RowMatrix * | A | ) |
|
inline |
Destructor.
Definition at line 91 of file Ifpack_ILU.h.
|
inlinevirtual |
Implements Epetra_Operator.
Definition at line 149 of file Ifpack_ILU.h.
|
virtual |
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
In this implementation, we use several existing attributes to determine how virtual method ApplyInverse() should call the concrete method Solve(). We pass in the UpperTriangular(), the Epetra_CrsMatrix::UseTranspose(), and NoDiagonal() methods. The most notable warning is that if a matrix has no diagonal values we assume that there is an implicit unit diagonal that should be accounted for when doing a triangular solve.
X | - (In) A Epetra_MultiVector of dimension NumVectors to solve for. |
Out | Y - (Out) A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Ifpack_Preconditioner.
Definition at line 575 of file Ifpack_ILU.cpp.
References Epetra_Time::ElapsedTime(), IsComputed(), Epetra_MultiVector::NumVectors(), Epetra_MultiVector::Pointers(), Epetra_Time::ResetStartTime(), and UseTranspose().
|
inlinevirtual |
Returns the number of flops in the application of the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 282 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 266 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
Implements Epetra_Operator.
Definition at line 224 of file Ifpack_ILU.h.
|
virtual |
Compute ILU factors L and U using the specified graph, diagonal perturbation thresholds and relaxation parameters.
This function computes the ILU(k) factors L and U using the current:
InitValues() must be called before the factorization can proceed.
Implements Ifpack_Preconditioner.
Definition at line 334 of file Ifpack_ILU.cpp.
References Comm(), Epetra_Time::ElapsedTime(), Initialize(), IsInitialized(), and Epetra_Time::ResetStartTime().
|
inlinevirtual |
Returns the number of flops in the computation phase.
Implements Ifpack_Preconditioner.
Definition at line 277 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 260 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the computed estimated condition number, or -1.0 if not computed.
Implements Ifpack_Preconditioner.
Definition at line 181 of file Ifpack_ILU.h.
Referenced by Print().
|
virtual |
Computes the estimated condition number and returns the value.
Implements Ifpack_Preconditioner.
Definition at line 615 of file Ifpack_ILU.cpp.
References IsComputed().
|
inline |
Returns the address of the D factor associated with this factored matrix.
Definition at line 193 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns false because this class cannot compute an Inf-norm.
Implements Epetra_Operator.
Definition at line 212 of file Ifpack_ILU.h.
|
virtual |
Initialize the preconditioner, does not touch matrix values.
Implements Ifpack_Preconditioner.
Definition at line 239 of file Ifpack_ILU.cpp.
References Copy, Epetra_Time::ElapsedTime(), Epetra_CrsMatrix::Graph(), and Epetra_Time::ResetStartTime().
Referenced by Compute().
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 272 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 254 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
If factor is completed, this query returns true, otherwise it returns false.
Implements Ifpack_Preconditioner.
Definition at line 120 of file Ifpack_ILU.h.
Referenced by ApplyInverse(), and Condest().
|
inlinevirtual |
Returns true
if the preconditioner has been successfully initialized.
Implements Ifpack_Preconditioner.
Definition at line 103 of file Ifpack_ILU.h.
Referenced by Compute().
|
inline |
Returns the address of the L factor associated with this factored matrix.
Definition at line 190 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns a character string describing the operator.
Implements Epetra_Operator.
Definition at line 199 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns a reference to the matrix to be preconditioned.
Implements Ifpack_Preconditioner.
Definition at line 227 of file Ifpack_ILU.h.
int Ifpack_ILU::Multiply | ( | bool | Trans, |
const Epetra_MultiVector & | X, | ||
Epetra_MultiVector & | Y ) const |
Definition at line 535 of file Ifpack_ILU.cpp.
|
inlinevirtual |
Returns 0.0 because this class cannot compute Inf-norm.
Implements Epetra_Operator.
Definition at line 209 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 248 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 242 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the number of calls to Initialize().
Implements Ifpack_Preconditioner.
Definition at line 236 of file Ifpack_ILU.h.
Referenced by Print().
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 218 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 221 of file Ifpack_ILU.h.
|
virtual |
Prints on stream basic information about this
object.
Implements Ifpack_Preconditioner.
Definition at line 634 of file Ifpack_ILU.cpp.
References ApplyInverseFlops(), ApplyInverseTime(), Comm(), ComputeFlops(), ComputeTime(), Condest(), InitializeTime(), Label(), NumApplyInverse(), NumCompute(), and NumInitialize().
|
inline |
Sets label for this
object.
Definition at line 202 of file Ifpack_ILU.h.
|
virtual |
Set parameters using a Teuchos::ParameterList object.
Implements Ifpack_Preconditioner.
Definition at line 100 of file Ifpack_ILU.cpp.
Referenced by Ifpack_ILU().
|
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.
UseTranspose_in | - (In) If true, multiply by the transpose of operator, otherwise just use operator. |
Implements Epetra_Operator.
Definition at line 144 of file Ifpack_ILU.h.
|
inline |
Returns the address of the L factor associated with this factored matrix.
Definition at line 196 of file Ifpack_ILU.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 215 of file Ifpack_ILU.h.
Referenced by ApplyInverse().