IFPACK Development
|
Ifpack_ICT: A class for constructing and using an incomplete Cholesky factorization of a given Epetra_RowMatrix. More...
#include <Ifpack_ICT.h>
Public Member Functions | |
Ifpack_ICT (const Epetra_RowMatrix *A) | |
Ifpack_ICT constuctor with variable number of indices per row. | |
virtual | ~Ifpack_ICT () |
Ifpack_ICT Destructor. | |
int | SetParameters (Teuchos::ParameterList ¶meterlis) |
Set parameters using a Teuchos::ParameterList object. | |
const Epetra_RowMatrix & | Matrix () const |
Returns a reference to the matrix to be preconditioned. | |
bool | IsInitialized () const |
Returns true is the preconditioner has been successfully initialized. | |
int | Initialize () |
Initialize L and U with values from user matrix A. | |
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_ICT 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) |
Returns the maximum over all the condition number estimate for each local ILU set of factors. | |
double | Condest () const |
Returns the computed condition number estimate, or -1.0 if not computed. | |
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. | |
const Epetra_CrsMatrix & | H () const |
Returns the address of the D factor associated with this factored matrix. | |
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 char * | Label () const |
int | SetLabel (const char *Label_in) |
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 all applications of Compute(). | |
virtual double | ApplyInverseFlops () const |
Returns the number of flops in all applications of ApplyInverse(). | |
double | LevelOfFill () const |
Returns the level-of-fill. | |
double | AbsoluteThreshold () const |
Returns the absolute threshold. | |
double | RelativeThreshold () const |
Returns the relative threshold. | |
double | RelaxValue () const |
Returns the relaxation value. | |
double | DropTolerance () const |
Returns the drop threshold. | |
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_RowMatrix & | Matrix () 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_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () 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_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () const=0 |
Ifpack_ICT: A class for constructing and using an incomplete Cholesky factorization of a given Epetra_RowMatrix.
The Ifpack_ICT class computes a threshold based incomplete LDL^T factorization of a given Epetra_RowMatrix. The factorization that is produced is a function of several parameters:
Maximum number of entries per row/column in factor - The factorization will contain at most this number of nonzero terms in each row/column of the factorization.
Definition at line 83 of file Ifpack_ICT.h.
Ifpack_ICT::Ifpack_ICT | ( | const Epetra_RowMatrix * | A | ) |
Ifpack_ICT constuctor with variable number of indices per row.
Creates a Ifpack_ICT object and allocates storage.
In | A - User matrix to be factored. |
In | Graph - Graph generated by Ifpack_IlukGraph. |
Definition at line 63 of file Ifpack_ICT.cpp.
|
virtual |
Ifpack_ICT Destructor.
Definition at line 91 of file Ifpack_ICT.cpp.
|
inline |
Returns the absolute threshold.
Definition at line 305 of file Ifpack_ICT.h.
Referenced by Print(), and SetParameters().
|
virtual |
Implements Epetra_Operator.
Definition at line 494 of file Ifpack_ICT.cpp.
|
virtual |
Returns the result of a Ifpack_ICT forward/back solve on a Epetra_MultiVector X in Y.
In | Trans -If true, solve transpose problem. |
In | X - A Epetra_MultiVector of dimension NumVectors to solve for. |
Out | Y -A Epetra_MultiVector of dimension NumVectorscontaining result. |
Implements Ifpack_Preconditioner.
Definition at line 455 of file Ifpack_ICT.cpp.
References Epetra_Time::ElapsedTime(), IsComputed(), Epetra_MultiVector::NumVectors(), Epetra_MultiVector::Pointers(), and Epetra_Time::ResetStartTime().
|
inlinevirtual |
Returns the number of flops in all applications of ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 290 of file Ifpack_ICT.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 272 of file Ifpack_ICT.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_ICT.h.
Referenced by 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 438 of file Ifpack_ICT.cpp.
References Epetra_BlockMap::GlobalIndicesInt(), Epetra_BlockMap::GlobalIndicesLongLong(), and Epetra_RowMatrix::RowMatrixRowMap().
|
inlinevirtual |
Returns the number of flops in all applications of Compute().
Implements Ifpack_Preconditioner.
Definition at line 284 of file Ifpack_ICT.h.
Referenced by Print().
|
inlinevirtual |
Returns the time spent in Compute().
Implements Ifpack_Preconditioner.
Definition at line 266 of file Ifpack_ICT.h.
Referenced by Print().
|
inlinevirtual |
Returns the computed condition number estimate, or -1.0 if not computed.
Implements Ifpack_Preconditioner.
Definition at line 175 of file Ifpack_ICT.h.
Referenced by Print().
|
virtual |
Returns the maximum over all the condition number estimate for each local ILU set of factors.
This functions computes a local condition number estimate on each processor and return the maximum over all processor of the estimate.
In | Trans -If true, solve transpose problem. |
Out | ConditionNumberEstimate - The maximum across all processors of the infinity-norm estimate of the condition number of the inverse of LDU. |
Implements Ifpack_Preconditioner.
Definition at line 502 of file Ifpack_ICT.cpp.
References IsComputed().
|
inline |
Returns the drop threshold.
Definition at line 323 of file Ifpack_ICT.h.
Referenced by SetParameters().
|
inline |
Returns the address of the D factor associated with this factored matrix.
Definition at line 192 of file Ifpack_ICT.h.
Referenced by NumGlobalNonzeros(), and NumMyNonzeros().
|
inlinevirtual |
Returns false because this class cannot compute an Inf-norm.
Implements Epetra_Operator.
Definition at line 212 of file Ifpack_ICT.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 138 of file Ifpack_ICT.cpp.
References Comm(), Epetra_Time::ElapsedTime(), Matrix(), Epetra_RowMatrix::NumMyRows(), and Epetra_Time::ResetStartTime().
|
inlinevirtual |
Returns the number of flops in the initialization phase.
Implements Ifpack_Preconditioner.
Definition at line 278 of file Ifpack_ICT.h.
|
inlinevirtual |
Returns the time spent in Initialize().
Implements Ifpack_Preconditioner.
Definition at line 260 of file Ifpack_ICT.h.
Referenced by Print().
|
inlinevirtual |
If factor is completed, this query returns true, otherwise it returns false.
Implements Ifpack_Preconditioner.
Definition at line 142 of file Ifpack_ICT.h.
Referenced by ApplyInverse(), and Condest().
|
inlinevirtual |
Returns true
is the preconditioner has been successfully initialized.
Implements Ifpack_Preconditioner.
Definition at line 116 of file Ifpack_ICT.h.
|
inlinevirtual |
Implements Epetra_Operator.
Definition at line 227 of file Ifpack_ICT.h.
|
inline |
Returns the level-of-fill.
Definition at line 299 of file Ifpack_ICT.h.
Referenced by Print(), and SetParameters().
|
inlinevirtual |
Returns a reference to the matrix to be preconditioned.
Implements Ifpack_Preconditioner.
Definition at line 110 of file Ifpack_ICT.h.
Referenced by Initialize(), and Print().
|
inlinevirtual |
Returns 0.0 because this class cannot compute Inf-norm.
Implements Epetra_Operator.
Definition at line 209 of file Ifpack_ICT.h.
|
inlinevirtual |
Returns the number of calls to ApplyInverse().
Implements Ifpack_Preconditioner.
Definition at line 254 of file Ifpack_ICT.h.
Referenced by Print().
|
inlinevirtual |
Returns the number of calls to Compute().
Implements Ifpack_Preconditioner.
Definition at line 248 of file Ifpack_ICT.h.
Referenced by Print().
|
inline |
Returns the number of nonzero entries in the global graph.
Definition at line 184 of file Ifpack_ICT.h.
References H(), and NumGlobalNonzeros().
Referenced by NumGlobalNonzeros().
|
inline |
Definition at line 186 of file Ifpack_ICT.h.
|
inlinevirtual |
Returns the number of calls to Initialize().
Implements Ifpack_Preconditioner.
Definition at line 242 of file Ifpack_ICT.h.
Referenced by Print().
|
inline |
Returns the number of nonzero entries in the local graph.
Definition at line 189 of file Ifpack_ICT.h.
References H(), and NumMyNonzeros().
Referenced by NumMyNonzeros().
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 218 of file Ifpack_ICT.h.
References Epetra_Operator::OperatorDomainMap().
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 221 of file Ifpack_ICT.h.
References Epetra_Operator::OperatorRangeMap().
|
virtual |
Prints basic information on iostream. This function is used by operator<<.
Implements Ifpack_Preconditioner.
Definition at line 518 of file Ifpack_ICT.cpp.
References AbsoluteThreshold(), ApplyInverseFlops(), ApplyInverseTime(), Comm(), ComputeFlops(), ComputeTime(), Condest(), InitializeTime(), LevelOfFill(), Matrix(), NumApplyInverse(), NumCompute(), NumInitialize(), RelativeThreshold(), and RelaxValue().
|
inline |
Returns the relative threshold.
Definition at line 311 of file Ifpack_ICT.h.
Referenced by Print(), and SetParameters().
|
inline |
Returns the relaxation value.
Definition at line 317 of file Ifpack_ICT.h.
Referenced by Print(), and SetParameters().
|
inline |
Definition at line 232 of file Ifpack_ICT.h.
|
virtual |
Set parameters using a Teuchos::ParameterList object.
Implements Ifpack_Preconditioner.
Definition at line 104 of file Ifpack_ICT.cpp.
References AbsoluteThreshold(), DropTolerance(), LevelOfFill(), 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.
In | UseTranspose_in -If true, multiply by the transpose of operator, otherwise just use operator. |
Implements Epetra_Operator.
Definition at line 206 of file Ifpack_ICT.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 215 of file Ifpack_ICT.h.