Ifpack_IC Class Reference

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

#include <Ifpack_IC.h>

Inheritance diagram for Ifpack_IC:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Ifpack_IC (Epetra_RowMatrix *A)
 Ifpack_IC constuctor with variable number of indices per row.
virtual ~Ifpack_IC ()
 Ifpack_IC Destructor.
void SetAbsoluteThreshold (double Athresh)
 Set absolute threshold value.
void SetRelativeThreshold (double Rthresh)
 Set relative threshold value.
int SetParameters (Teuchos::ParameterList &parameterlis)
 Set parameters using a Teuchos::ParameterList object.
int SetParameter (const string Name, const int Value)
int SetParameter (const string Name, const double Value)
const Epetra_RowMatrixMatrix () const
 Returns a pointer to the matrix to be preconditioned.
Epetra_RowMatrixMatrix ()
bool IsInitialized () const
 Returns true if the preconditioner has been successfully initialized, false otherwise.
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.
int ComputeSetup ()
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_IC 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.
double GetAbsoluteThreshold ()
 Get absolute threshold value.
double GetRelativeThreshold ()
 Get relative threshold value.
int NumGlobalNonzeros () const
 Returns the number of nonzero entries in the global graph.
int NumMyNonzeros () const
 Returns the number of nonzero entries in the local graph.
const Epetra_VectorD () const
 Returns the address of the D factor associated with this factored matrix.
const Epetra_CrsMatrixU () const
 Returns the address of the U factor associated with this factored matrix.
const char * Label () const
int SetLabel (const char *Label_in)
virtual 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.

Private Member Functions

double LevelOfFill () const
double AbsoluteThreshold () const
double RelativeThreshold () const
double DropTolerance () const

Private Attributes

Teuchos::RefCountPtr
< Epetra_RowMatrix
A_
const Epetra_CommComm_
Teuchos::RefCountPtr
< Epetra_CrsMatrix
U_
Teuchos::RefCountPtr
< Epetra_Vector
D_
bool UseTranspose_
double Condest_
double Athresh_
double Rthresh_
double Droptol_
int Lfil_
void * Aict_
void * Lict_
double * Ldiag_
char Label_ [160]
bool IsInitialized_
bool IsComputed_
int NumInitialize_
 Contains the number of successful calls to Initialize().
int NumCompute_
 Contains the number of successful call to Compute().
int NumApplyInverse_
 Contains the number of successful call to ApplyInverse().
double InitializeTime_
 Contains the time for all successful calls to Initialize().
double ComputeTime_
 Contains the time for all successful calls to Compute().
double ApplyInverseTime_
 Contains the time for all successful calls to ApplyInverse().
double ComputeFlops_
 Contains the number of flops for Compute().
double ApplyInverseFlops_
 Contain sthe number of flops for ApplyInverse().



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.

Detailed Description

Ifpack_IC: A class for constructing and using an incomplete Cholesky factorization of a given Epetra_RowMatrix.

The Ifpack_IC 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:

  1. 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.

  2. Diagonal perturbation - Prior to computing the factorization, it is possible to modify the diagonal entries of the matrix for which the factorization will be computing. If the absolute and relative perturbation values are zero and one, respectively, the factorization will be compute for the original user matrix A. Otherwise, the factorization will computed for a matrix that differs from the original user matrix in the diagonal values only. Details can be found in ifp_diag_pert.

Definition at line 67 of file Ifpack_IC.h.


Constructor & Destructor Documentation

Ifpack_IC::Ifpack_IC ( Epetra_RowMatrix A  ) 

Ifpack_IC constuctor with variable number of indices per row.

Creates a Ifpack_IC object and allocates storage.

Parameters:
In A - User matrix to be factored.
In Graph - Graph generated by Ifpack_IlukGraph.

Definition at line 48 of file Ifpack_IC.cpp.

Ifpack_IC::~Ifpack_IC (  )  [virtual]

Ifpack_IC Destructor.

Definition at line 76 of file Ifpack_IC.cpp.


Member Function Documentation

void Ifpack_IC::SetAbsoluteThreshold ( double  Athresh  )  [inline]

Set absolute threshold value.

Definition at line 84 of file Ifpack_IC.h.

void Ifpack_IC::SetRelativeThreshold ( double  Rthresh  )  [inline]

Set relative threshold value.

Definition at line 87 of file Ifpack_IC.h.

int Ifpack_IC::SetParameters ( Teuchos::ParameterList parameterlis  )  [virtual]

Set parameters using a Teuchos::ParameterList object.

Implements Ifpack_Preconditioner.

Definition at line 96 of file Ifpack_IC.cpp.

int Ifpack_IC::SetParameter ( const string  Name,
const int  Value 
) [inline]

Definition at line 99 of file Ifpack_IC.h.

int Ifpack_IC::SetParameter ( const string  Name,
const double  Value 
) [inline]

Definition at line 103 of file Ifpack_IC.h.

const Epetra_RowMatrix& Ifpack_IC::Matrix (  )  const [inline, virtual]

Returns a pointer to the matrix to be preconditioned.

Implements Ifpack_Preconditioner.

Definition at line 108 of file Ifpack_IC.h.

Epetra_RowMatrix& Ifpack_IC::Matrix (  )  [inline]

Definition at line 113 of file Ifpack_IC.h.

bool Ifpack_IC::IsInitialized (  )  const [inline, virtual]

Returns true if the preconditioner has been successfully initialized, false otherwise.

Implements Ifpack_Preconditioner.

Definition at line 118 of file Ifpack_IC.h.

int Ifpack_IC::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:
In A - 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 111 of file Ifpack_IC.cpp.

int Ifpack_IC::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 198 of file Ifpack_IC.cpp.

int Ifpack_IC::ComputeSetup (  ) 

Definition at line 122 of file Ifpack_IC.cpp.

bool Ifpack_IC::IsComputed (  )  const [inline, virtual]

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

Implements Ifpack_Preconditioner.

Definition at line 145 of file Ifpack_IC.h.

int Ifpack_IC::ApplyInverse ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [virtual]

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

Parameters:
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.
Returns:
Integer error code, set to 0 if successful.

Implements Ifpack_Preconditioner.

Definition at line 282 of file Ifpack_IC.cpp.

int Ifpack_IC::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [virtual]

Implements Epetra_Operator.

Definition at line 316 of file Ifpack_IC.cpp.

double Ifpack_IC::Condest ( const Ifpack_CondestType  CT = Ifpack_Cheap,
const int  MaxIters = 1550,
const double  Tol = 1e-9,
Epetra_RowMatrix Matrix_in = 0 
) [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.

Parameters:
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 336 of file Ifpack_IC.cpp.

double Ifpack_IC::Condest (  )  const [inline, virtual]

Returns the computed condition number estimate, or -1.0 if not computed.

Implements Ifpack_Preconditioner.

Definition at line 178 of file Ifpack_IC.h.

double Ifpack_IC::GetAbsoluteThreshold (  )  [inline]

Get absolute threshold value.

Definition at line 186 of file Ifpack_IC.h.

double Ifpack_IC::GetRelativeThreshold (  )  [inline]

Get relative threshold value.

Definition at line 189 of file Ifpack_IC.h.

int Ifpack_IC::NumGlobalNonzeros (  )  const [inline]

Returns the number of nonzero entries in the global graph.

Definition at line 192 of file Ifpack_IC.h.

int Ifpack_IC::NumMyNonzeros (  )  const [inline]

Returns the number of nonzero entries in the local graph.

Definition at line 195 of file Ifpack_IC.h.

const Epetra_Vector& Ifpack_IC::D (  )  const [inline]

Returns the address of the D factor associated with this factored matrix.

Definition at line 197 of file Ifpack_IC.h.

const Epetra_CrsMatrix& Ifpack_IC::U (  )  const [inline]

Returns the address of the U factor associated with this factored matrix.

Definition at line 200 of file Ifpack_IC.h.

int Ifpack_IC::SetUseTranspose ( bool  UseTranspose_in  )  [inline, virtual]

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:
In UseTranspose_in -If true, multiply by the transpose of operator, otherwise just use operator.
Returns:
Always returns 0.

Implements Epetra_Operator.

Definition at line 214 of file Ifpack_IC.h.

double Ifpack_IC::NormInf (  )  const [inline, virtual]

Returns 0.0 because this class cannot compute Inf-norm.

Implements Epetra_Operator.

Definition at line 217 of file Ifpack_IC.h.

bool Ifpack_IC::HasNormInf (  )  const [inline, virtual]

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

Implements Epetra_Operator.

Definition at line 220 of file Ifpack_IC.h.

bool Ifpack_IC::UseTranspose (  )  const [inline, virtual]

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 223 of file Ifpack_IC.h.

const Epetra_Map& Ifpack_IC::OperatorDomainMap (  )  const [inline, virtual]

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

Implements Epetra_Operator.

Definition at line 226 of file Ifpack_IC.h.

const Epetra_Map& Ifpack_IC::OperatorRangeMap (  )  const [inline, virtual]

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

Implements Epetra_Operator.

Definition at line 229 of file Ifpack_IC.h.

const Epetra_Comm& Ifpack_IC::Comm (  )  const [inline, virtual]

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

Implements Epetra_Operator.

Definition at line 232 of file Ifpack_IC.h.

const char* Ifpack_IC::Label (  )  const [inline, virtual]

Implements Epetra_Operator.

Definition at line 235 of file Ifpack_IC.h.

int Ifpack_IC::SetLabel ( const char *  Label_in  )  [inline]

Definition at line 240 of file Ifpack_IC.h.

std::ostream & Ifpack_IC::Print ( std::ostream &  os  )  const [virtual]

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

Implements Ifpack_Preconditioner.

Definition at line 351 of file Ifpack_IC.cpp.

virtual int Ifpack_IC::NumInitialize (  )  const [inline, virtual]

Returns the number of calls to Initialize().

Implements Ifpack_Preconditioner.

Definition at line 250 of file Ifpack_IC.h.

virtual int Ifpack_IC::NumCompute (  )  const [inline, virtual]

Returns the number of calls to Compute().

Implements Ifpack_Preconditioner.

Definition at line 256 of file Ifpack_IC.h.

virtual int Ifpack_IC::NumApplyInverse (  )  const [inline, virtual]

Returns the number of calls to ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 262 of file Ifpack_IC.h.

virtual double Ifpack_IC::InitializeTime (  )  const [inline, virtual]

Returns the time spent in Initialize().

Implements Ifpack_Preconditioner.

Definition at line 268 of file Ifpack_IC.h.

virtual double Ifpack_IC::ComputeTime (  )  const [inline, virtual]

Returns the time spent in Compute().

Implements Ifpack_Preconditioner.

Definition at line 274 of file Ifpack_IC.h.

virtual double Ifpack_IC::ApplyInverseTime (  )  const [inline, virtual]

Returns the time spent in ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 280 of file Ifpack_IC.h.

virtual double Ifpack_IC::InitializeFlops (  )  const [inline, virtual]

Returns the number of flops in the initialization phase.

Implements Ifpack_Preconditioner.

Definition at line 286 of file Ifpack_IC.h.

virtual double Ifpack_IC::ComputeFlops (  )  const [inline, virtual]

Returns the number of flops in the computation phase.

Implements Ifpack_Preconditioner.

Definition at line 291 of file Ifpack_IC.h.

virtual double Ifpack_IC::ApplyInverseFlops (  )  const [inline, virtual]

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

Implements Ifpack_Preconditioner.

Definition at line 296 of file Ifpack_IC.h.

double Ifpack_IC::LevelOfFill (  )  const [inline, private]

Definition at line 304 of file Ifpack_IC.h.

double Ifpack_IC::AbsoluteThreshold (  )  const [inline, private]

Definition at line 309 of file Ifpack_IC.h.

double Ifpack_IC::RelativeThreshold (  )  const [inline, private]

Definition at line 314 of file Ifpack_IC.h.

double Ifpack_IC::DropTolerance (  )  const [inline, private]

Definition at line 319 of file Ifpack_IC.h.


Member Data Documentation

Definition at line 324 of file Ifpack_IC.h.

const Epetra_Comm& Ifpack_IC::Comm_ [private]

Definition at line 325 of file Ifpack_IC.h.

Definition at line 326 of file Ifpack_IC.h.

Definition at line 327 of file Ifpack_IC.h.

Definition at line 328 of file Ifpack_IC.h.

double Ifpack_IC::Condest_ [private]

Definition at line 330 of file Ifpack_IC.h.

double Ifpack_IC::Athresh_ [private]

Definition at line 331 of file Ifpack_IC.h.

double Ifpack_IC::Rthresh_ [private]

Definition at line 332 of file Ifpack_IC.h.

double Ifpack_IC::Droptol_ [private]

Definition at line 333 of file Ifpack_IC.h.

int Ifpack_IC::Lfil_ [private]

Definition at line 334 of file Ifpack_IC.h.

void* Ifpack_IC::Aict_ [private]

Definition at line 336 of file Ifpack_IC.h.

void* Ifpack_IC::Lict_ [private]

Definition at line 337 of file Ifpack_IC.h.

double* Ifpack_IC::Ldiag_ [private]

Definition at line 338 of file Ifpack_IC.h.

char Ifpack_IC::Label_[160] [private]

Definition at line 339 of file Ifpack_IC.h.

Definition at line 341 of file Ifpack_IC.h.

Definition at line 342 of file Ifpack_IC.h.

Contains the number of successful calls to Initialize().

Definition at line 345 of file Ifpack_IC.h.

int Ifpack_IC::NumCompute_ [private]

Contains the number of successful call to Compute().

Definition at line 347 of file Ifpack_IC.h.

int Ifpack_IC::NumApplyInverse_ [mutable, private]

Contains the number of successful call to ApplyInverse().

Definition at line 349 of file Ifpack_IC.h.

double Ifpack_IC::InitializeTime_ [private]

Contains the time for all successful calls to Initialize().

Definition at line 352 of file Ifpack_IC.h.

double Ifpack_IC::ComputeTime_ [private]

Contains the time for all successful calls to Compute().

Definition at line 354 of file Ifpack_IC.h.

double Ifpack_IC::ApplyInverseTime_ [mutable, private]

Contains the time for all successful calls to ApplyInverse().

Definition at line 356 of file Ifpack_IC.h.

double Ifpack_IC::ComputeFlops_ [private]

Contains the number of flops for Compute().

Definition at line 359 of file Ifpack_IC.h.

double Ifpack_IC::ApplyInverseFlops_ [mutable, private]

Contain sthe number of flops for ApplyInverse().

Definition at line 361 of file Ifpack_IC.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:05:41 2011 for Ifpack Package Browser (Single Doxygen Collection) by  doxygen 1.6.3