Ifpack2 Templated Preconditioning Package Version 1.0
Classes | Enumerations | Functions
Ifpack2 Namespace Reference

Classes

class  BorderedOperator
 Ifpack2 bordered operator. More...
class  Chebyshev
 A class for preconditioning with Chebyshev polynomials. More...
class  Diagonal
 A class for diagonal preconditioning. More...
class  Factory
 A factory class to create Ifpack2 preconditioners. More...
class  IlukGraph
 A class for constructing level filled graphs for use with ILU(k) class preconditioners. More...
class  ILUT
 A class for constructing and using an ILUT factorization. More...
class  OverlapGraph
 Ifpack2::OverlapGraph constructs an overlapped graph. More...
class  Preconditioner
 Base class for all Ifpack2 preconditioners. More...
class  Relaxation
 Ifpack2::Relaxation: defines relaxation preconditioners for Tpetra::RowMatrix objects. More...
class  RILUK
 A class for constructing and using an incomplete lower/upper (ILU) factorization of a given Tpetra::RowMatrix. More...

Enumerations

enum  CondestType { Cheap, CG, GMRES }
 Ifpack2::CondestType: enum to define the type of condition number estimate. More...
enum  ScalingType
 Ifpack2 scaling type selector. More...

Functions

template<class LocalOrdinal , class GlobalOrdinal = LocalOrdinal>
void ConstructLevelFillGraph (const RowGraph< LocalOrdinal, GlobalOrdinal > &userGraph, Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal >> graphL, Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal >> graphU)
 ConstructLevelFillGraph: A function for constructing level filled graphs for use with ILU(k) class preconditioners.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const
Tpetra::CrsGraph< LocalOrdinal,
GlobalOrdinal, Node > > 
CreateOverlapGraph (const Teuchos::RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &input_graph, int OverlapLevel)
 Constructs an overlapped graph for use with Ifpack2 preconditioners.
template<class MatrixType , class VectorType >
Teuchos::RCP
< Ifpack2::Diagonal
< MatrixType > > 
createDiagonalPreconditioner (const Teuchos::RCP< const VectorType > &invdiag)
bool supportsUnsymmetric (const std::string &prec_type)
 Return true if the specified preconditioner type supports unsymmetric matrices.
template<typename Ordinal , typename SizeType >
void add_to_heap (const Ordinal &idx, Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
template<typename Ordinal , typename SizeType , class Compare >
void add_to_heap (const Ordinal &idx, Teuchos::Array< Ordinal > &heap, SizeType &heap_len, Compare comp)
template<typename Ordinal , typename SizeType >
void rm_heap_root (Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
template<typename Ordinal , typename SizeType , class Compare >
void rm_heap_root (Teuchos::Array< Ordinal > &heap, SizeType &heap_len, Compare comp)
void getValidParameters (Teuchos::ParameterList &params)
 Fills a list which contains all the parameters possibly used by Ifpack2.
template<typename T >
void getParameter (const Teuchos::ParameterList &params, const std::string &name, T &value)
 Set a value from a ParameterList if a parameter with the specified name exists.

Detailed Description

Classes and functions for templated preconditioning.


Enumeration Type Documentation

Ifpack2::CondestType: enum to define the type of condition number estimate.

Enumerator:
Cheap 

cheap estimate

CG 

Uses AztecOO's CG.

GMRES 

Uses AztecOO's GMRES.

Ifpack2 scaling type selector.

Selects the type of scaling used (if any) for Ifpack2 preconditioners.


Function Documentation

template<class LocalOrdinal , class GlobalOrdinal = LocalOrdinal>
void Ifpack2::ConstructLevelFillGraph ( const RowGraph< LocalOrdinal, GlobalOrdinal > &  userGraph,
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal >>  graphL,
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal >>  graphU 
)

ConstructLevelFillGraph: A function for constructing level filled graphs for use with ILU(k) class preconditioners.

The IlukGraph class enable the construction matrix graphs using level-fill algorithms. The only function required for construction is an ExtractRowView capability, i.e., the matrix that is passed in to the constructor must implement the CrsGraph interface defined in CrsMatrix.hpp

Constructing IlukGraph objects

Constructing IlukGraph objects is usually a two step process of passing in a CrsGraph object and an integer indicating the desired level of fill and then calling the ConstructFilledGraph function to complete the process. This allows warning error codes to be returned to the calling routine.

It is worth noting that an IlukGraph object has two Tpetra::CrsGraph objects containing L and U, the graphs for the lower and upper triangular parts of the ILU(k) graph. Thus, it is possible to manually insert and delete graph entries in L and U via the Tpetra_CrsGraph InsertIndices and RemoveIndices functions. However, in this case FillComplete must be called before the graph is used for subsequent operations.

Parameters:
userGraph(In) - An existing CrsGraph. This object must implement the RowGraph functions that provide graph dimension and pattern information.
levelFill(In) - The level of fill to compute via ILU(k) algorithm.
graphL(Out) - Lower triangular graph with the level k fill pattern.
graphU(Out) - Upper triangular graph with the level k fill pattern.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP<const Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node> > Ifpack2::CreateOverlapGraph ( const Teuchos::RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  input_graph,
int  OverlapLevel 
)

Constructs an overlapped graph for use with Ifpack2 preconditioners.

If OverlapLevel is 0, then the overlapped graph is the input_graph.

template<class MatrixType , class VectorType >
Teuchos::RCP<Ifpack2::Diagonal<MatrixType> > Ifpack2::createDiagonalPreconditioner ( const Teuchos::RCP< const VectorType > &  invdiag)

Function to construct a Diagonal preconditioner with vector input. The input vector is assumed to contain the equivalent of the inverted diagonal of a matrix.

Example usage:
typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> TCrsMatrix;
typedef Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> TVector;
typedef Tpetra::Preconditioner<Scalar,LocalOrdinal,GlobalOrdinal,Node> TPrec;

Teuchos::RCP<TVector> myvec = ...

Teuchos::RCP<TPrec> prec = Ifpack2::createDiagonalPreconditioner<TCrsMatrix,TVector>(myvec);

bool Ifpack2::supportsUnsymmetric ( const std::string &  prec_type)

Return true if the specified preconditioner type supports unsymmetric matrices.

template<typename Ordinal , typename SizeType >
void Ifpack2::add_to_heap ( const Ordinal &  idx,
Teuchos::Array< Ordinal > &  heap,
SizeType &  heap_len 
)

Add idx to heap, don't assume heap occupies entire vector.

template<typename Ordinal , typename SizeType , class Compare >
void Ifpack2::add_to_heap ( const Ordinal &  idx,
Teuchos::Array< Ordinal > &  heap,
SizeType &  heap_len,
Compare  comp 
)

Add idx to heap, don't assume heap occupies entire vector. Also take custom comparator.

template<typename Ordinal , typename SizeType >
void Ifpack2::rm_heap_root ( Teuchos::Array< Ordinal > &  heap,
SizeType &  heap_len 
)

Remove heap root, don't shorten vector but update a heap_len parameter.

template<typename Ordinal , typename SizeType , class Compare >
void Ifpack2::rm_heap_root ( Teuchos::Array< Ordinal > &  heap,
SizeType &  heap_len,
Compare  comp 
)

Remove heap root, with custom comparator, don't assume heap occupies entire vector.

void Ifpack2::getValidParameters ( Teuchos::ParameterList params)

Fills a list which contains all the parameters possibly used by Ifpack2.

template<typename T >
void Ifpack2::getParameter ( const Teuchos::ParameterList params,
const std::string &  name,
T &  value 
)

Set a value from a ParameterList if a parameter with the specified name exists.

If the specified name does not name a parameter in the list, then 'value' is not referenced.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends