Ifpack Class Reference

Ifpack: a function class to define Ifpack preconditioners. More...

#include <Ifpack.h>

List of all members.

Public Types

enum  parameter {
  absolute_threshold, relative_threshold, drop_tolerance, fill_tolerance,
  relax_value, level_fill, level_overlap, num_steps,
  use_reciprocal, overlap_mode
}

Public Member Functions

Ifpack_PreconditionerCreate (const string PrecType, Epetra_RowMatrix *Matrix, const int overlap=0)
 Creates an instance of Ifpack_Preconditioner.
int SetParameters (int argc, char *argv[], Teuchos::ParameterList &List, string &PrecType, int &Overlap)
 Sets the options in List from the command line.


Detailed Description

Ifpack: a function class to define Ifpack preconditioners.

Class Ifpack is a function class, that contains just one method: Create(). Using Create(), users can easily define a variety of IFPACK preconditioners.

Create requires 3 arguments:

The first argument can assume the following values:

Note:
Objects in stand-alone mode cannot use reordering, variable overlap, and singleton filters. However, their construction can be slightly faster than the non stand-alone counterpart.

The following fragment of code shows the basic usage of this class.

#include "Ifpack.h"

...

Ifpack Factory;

Epetra_RowMatrix* A; // A is FillComplete()'d.
string PrecType = "ILU"; // use incomplete LU on each process
int OverlapLevel = 1; // one row of overlap among the processes
Ifpack_Preconditioner* Prec = Factory.Create(PrecType, A, OverlapLevel);
assert (Prec != 0);

Teuchos::ParameterList List;
List.set("fact: level-of-fill", 5); // use ILU(5)

IFPACK_CHK_ERR(Prec->SetParameters(List));
IFPACK_CHK_ERR(Prec->Initialize());
IFPACK_CHK_ERR(Prec->Compute());

// now Prec can be used as AztecOO preconditioner
// like for instance
AztecOO AztecOOSolver(*Problem);

// specify solver
AztecOOSolver.SetAztecOption(AZ_solver,AZ_gmres);
AztecOOSolver.SetAztecOption(AZ_output,32);

// Set Prec as preconditioning operator
AztecOOSolver.SetPrecOperator(Prec);

// Call the solver
AztecOOSolver.Iterate(1550,1e-8);

// print information on stdout
cout << *Prec;

// delete the preconditioner
delete Prec;

Author:
Marzio Sala, SNL 9214
Date:
Last updated on 25-Jan-05.


Member Function Documentation

Ifpack_Preconditioner * Ifpack::Create const string  PrecType,
Epetra_RowMatrix Matrix,
const int  overlap = 0
 

Creates an instance of Ifpack_Preconditioner.

Creates an Ifpack_Preconditioner.

Parameters:
PrecType (In) - type of preconditioner to be created.
Matrix (In) - Matrix used to define the preconditioner
overlap (In) - specified overlap, defaulted to 0.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:00 2008 for IFPACK by doxygen 1.3.9.1