IFPACK Development
|
Ifpack_IKLU: A class for constructing and using an incomplete LU factorization of a given Epetra_RowMatrix. More...
#include <Ifpack_IKLU.h>
Public Member Functions | |
Ifpack_IKLU (const Epetra_RowMatrix *A) | |
Ifpack_IKLU constuctor with variable number of indices per row. | |
virtual | ~Ifpack_IKLU () |
Ifpack_IKLU Destructor. | |
int | SetParameters (Teuchos::ParameterList ¶meterlis) |
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_IKLU 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_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. | |
const Epetra_CrsMatrix & | L () const |
Returns a reference to the L factor. | |
const Epetra_CrsMatrix & | U () 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. | |
Ifpack_IKLU: A class for constructing and using an incomplete LU factorization of a given Epetra_RowMatrix.
The Ifpack_IKLU class computes a "Relaxed" IKLU factorization with level k fill of a given Epetra_RowMatrix.
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 79 of file Ifpack_IKLU.h.
Ifpack_IKLU::Ifpack_IKLU | ( | const Epetra_RowMatrix * | A | ) |
Ifpack_IKLU constuctor with variable number of indices per row.
Definition at line 66 of file Ifpack_IKLU.cpp.
|
virtual |
Ifpack_IKLU Destructor.
Definition at line 97 of file Ifpack_IKLU.cpp.
|
inline |
Get absolute threshold value.
Definition at line 277 of file Ifpack_IKLU.h.
Referenced by Print(), and SetParameters().
|
virtual |
Implements Epetra_Operator.
Definition at line 399 of file Ifpack_IKLU.cpp.
|
virtual |
Returns the result of a Ifpack_IKLU forward/back solve on a Epetra_MultiVector X in Y.
X | - (In) A Epetra_MultiVector of dimension NumVectors to solve for. |
Y | - (Out) A Epetra_MultiVector of dimension NumVectorscontaining result. |
Implements Ifpack_Preconditioner.
Definition at line 335 of file Ifpack_IKLU.cpp.
References Epetra_Time::ElapsedTime(), IsComputed(), Epetra_DistObject::Map(), Epetra_MultiVector::NumVectors(), Epetra_MultiVector::ReplaceMyValue(), and Epetra_Time::ResetStartTime().
|
inlinevirtual |
Returns the number of flops in the application of the preconditioner.
Implements Ifpack_Preconditioner.
Definition at line 262 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 246 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
Implements Epetra_Operator.
Definition at line 185 of file Ifpack_IKLU.h.
Referenced by Compute(), Initialize(), and Print().
|
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:
InitValues() must be called before the factorization can proceed.
Implements Ifpack_Preconditioner.
Definition at line 228 of file Ifpack_IKLU.cpp.
References Comm(), Epetra_Time::ElapsedTime(), Epetra_RowMatrix::ExtractMyRowCopy(), Initialize(), IsInitialized(), Epetra_RowMatrix::MaxNumEntries(), Epetra_RowMatrix::NumMyRows(), Epetra_Comm::NumProc(), Epetra_Time::ResetStartTime(), Epetra_RowMatrix::RowMatrixRowMap(), Epetra_Comm::SumAll(), and View.
|
inlinevirtual |
Returns the number of flops in the computation phase.
Implements Ifpack_Preconditioner.
Definition at line 257 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 240 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
Returns the computed estimated condition number, or -1.0 if no computed.
Implements Ifpack_Preconditioner.
Definition at line 152 of file Ifpack_IKLU.h.
Referenced by Print().
|
virtual |
Computed the estimated condition number and returns the value.
Implements Ifpack_Preconditioner.
Definition at line 407 of file Ifpack_IKLU.cpp.
References IsComputed().
|
inline |
Gets the dropping tolerance.
Definition at line 289 of file Ifpack_IKLU.h.
Referenced by SetParameters().
|
inlinevirtual |
Returns false because this class cannot compute an Inf-norm.
Implements Epetra_Operator.
Definition at line 173 of file Ifpack_IKLU.h.
|
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.
In | A - User matrix to be factored. |
Implements Ifpack_Preconditioner.
Definition at line 153 of file Ifpack_IKLU.cpp.
References Comm(), Epetra_Operator::Comm(), Epetra_Time::ElapsedTime(), Epetra_RowMatrix::ExtractMyRowCopy(), Matrix(), Epetra_RowMatrix::MaxNumEntries(), Epetra_RowMatrix::NumMyNonzeros(), Epetra_RowMatrix::NumMyRows(), Epetra_Comm::NumProc(), and Epetra_Time::ResetStartTime().
Referenced by Compute().
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 252 of file Ifpack_IKLU.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 234 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
If factor is completed, this query returns true, otherwise it returns false.
Implements Ifpack_Preconditioner.
Definition at line 128 of file Ifpack_IKLU.h.
Referenced by ApplyInverse(), and Condest().
|
inlinevirtual |
Returns true
if the preconditioner has been successfully initialized.
Implements Ifpack_Preconditioner.
Definition at line 111 of file Ifpack_IKLU.h.
Referenced by Compute().
|
inline |
Returns a reference to the L factor.
Definition at line 194 of file Ifpack_IKLU.h.
Referenced by NumGlobalNonzeros(), and NumMyNonzeros().
|
inlinevirtual |
Returns the label of this
object.
Implements Epetra_Operator.
Definition at line 200 of file Ifpack_IKLU.h.
Referenced by Print().
|
inline |
Definition at line 267 of file Ifpack_IKLU.h.
|
inlinevirtual |
Returns a reference to the matrix to be preconditioned.
Implements Ifpack_Preconditioner.
Definition at line 188 of file Ifpack_IKLU.h.
Referenced by Initialize().
|
inlinevirtual |
Returns 0.0 because this class cannot compute Inf-norm.
Implements Epetra_Operator.
Definition at line 170 of file Ifpack_IKLU.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 228 of file Ifpack_IKLU.h.
Referenced by Print().
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 222 of file Ifpack_IKLU.h.
Referenced by Print().
|
inline |
Returns the number of nonzero entries in the global graph.
Definition at line 296 of file Ifpack_IKLU.h.
References L(), NumGlobalNonzeros(), and U().
Referenced by NumGlobalNonzeros().
|
inline |
Definition at line 301 of file Ifpack_IKLU.h.
|
inlinevirtual |
Returns the number of calls to Initialize().
Implements Ifpack_Preconditioner.
Definition at line 216 of file Ifpack_IKLU.h.
Referenced by Print().
|
inline |
Returns the number of nonzero entries in the local graph.
Definition at line 307 of file Ifpack_IKLU.h.
References L(), NumMyNonzeros(), and U().
Referenced by NumMyNonzeros().
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 179 of file Ifpack_IKLU.h.
References Epetra_Operator::OperatorDomainMap().
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 182 of file Ifpack_IKLU.h.
References Epetra_Operator::OperatorRangeMap().
|
virtual |
Prints basic information on iostream. This function is used by operator<<.
Implements Ifpack_Preconditioner.
Definition at line 423 of file Ifpack_IKLU.cpp.
References AbsoluteThreshold(), ApplyInverseFlops(), ApplyInverseTime(), Comm(), ComputeFlops(), ComputeTime(), Condest(), InitializeTime(), Label(), NumApplyInverse(), NumCompute(), NumInitialize(), RelativeThreshold(), and RelaxValue().
|
inline |
Get relative threshold value.
Definition at line 283 of file Ifpack_IKLU.h.
Referenced by Print(), and SetParameters().
|
inline |
Set relative threshold value.
Definition at line 272 of file Ifpack_IKLU.h.
Referenced by Print(), and SetParameters().
|
inline |
Sets the label for this
object.
Definition at line 206 of file Ifpack_IKLU.h.
|
virtual |
Set parameters using a Teuchos::ParameterList object.
Implements Ifpack_Preconditioner.
Definition at line 116 of file Ifpack_IKLU.cpp.
References AbsoluteThreshold(), DropTolerance(), RelativeThreshold(), and RelaxValue().
|
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 167 of file Ifpack_IKLU.h.
|
inline |
Returns a reference to the U factor.
Definition at line 197 of file Ifpack_IKLU.h.
Referenced by NumGlobalNonzeros(), and NumMyNonzeros().
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 176 of file Ifpack_IKLU.h.