Belos Package Browser (Single Doxygen Collection) Development
Public Types | Public Member Functions | Private Member Functions | Private Attributes
Belos::AkxFactory< Scalar, MV > Class Template Reference

Create and return Akx subclass instances. More...

#include <BelosAkxFactory.hpp>

List of all members.

Public Types

typedef Akx< Scalar, MV > akx_base_type
 Type of the matrix powers kernel abstract interface.

Public Member Functions

 AkxFactory ()
 Constructor.
template<class OP >
Teuchos::RCP< akx_base_typemakeOpAkx (const Teuchos::RCP< const OP > &A, const Teuchos::RCP< const OP > &M_left, const Teuchos::RCP< const OP > &M_right, const Teuchos::RCP< const Teuchos::ParameterList > &params)
 Make an OpAkx<Scalar, MV, OP> subclass instance.
Teuchos::RCP< const
Teuchos::ParameterList
getDefaultParameters ()
 Return the default matrix powers kernel parameter list.
const std::string & parameterListName () const
 Return name of the matrix powers kernel parameter list.

Private Member Functions

std::string validateBasisName (const std::string &basisName) const
 Validate and return canonical basis name.

Private Attributes

const std::string listName_
 Name of the matrix powers kernel parameter list.
std::vector< std::string > validBasisNames_
 List of valid matrix powers kernel basis names.
Teuchos::RCP< const
Teuchos::ParameterList
defaultParams_
 The default parameter list.

Detailed Description

template<class Scalar, class MV>
class Belos::AkxFactory< Scalar, MV >

Create and return Akx subclass instances.

Author:
Mark Hoemmen
Warning:
This is EXPERIMENTAL CODE. DO NOT RELY ON THIS CODE. The interface or implementation may change at any time.

This factory knows how to create various types of matrix powers kernel bases, all of which implement the Belos::Akx interface. As new matrix powers kernel implementations are added to Trilinos, this factory class will help you instantiate them and use them in solvers.

Definition at line 70 of file BelosAkxFactory.hpp.


Member Typedef Documentation

template<class Scalar, class MV>
Belos::AkxFactory< Scalar, MV >::akx_base_type

Type of the matrix powers kernel abstract interface.

Definition at line 75 of file BelosAkxFactory.hpp.


Constructor & Destructor Documentation

template<class Scalar , class MV >
Belos::AkxFactory< Scalar, MV >::AkxFactory ( )

Constructor.

It doesn't do anything exciting.

Definition at line 150 of file BelosAkxFactory.hpp.


Member Function Documentation

template<class Scalar, class MV>
template<class OP >
Teuchos::RCP< typename AkxFactory< Scalar, MV >::akx_base_type > Belos::AkxFactory< Scalar, MV >::makeOpAkx ( const Teuchos::RCP< const OP > &  A,
const Teuchos::RCP< const OP > &  M_left,
const Teuchos::RCP< const OP > &  M_right,
const Teuchos::RCP< const Teuchos::ParameterList > &  params 
)

Make an OpAkx<Scalar, MV, OP> subclass instance.

OpAkx implements the matrix powers kernel using straightforward applications of the operator A (and the left and/or right preconditioner, if applicable). It's a good default choice for (Flexible) CA-GMRES, especially with reasonably long restart cycles (so that the main benefit of CA-GMRES would likely come from TSQR and Block Gram-Schmidt, not from the matrix powers kernel).

Parameters:
A[in] The matrix of interest.
M_left[in] If not null, the left preconditioner, or split preconditioner if M_right is also not null.
M_right[in] If not null, the right preconditioner, or split preconditioner if M_left is also not null.
params[in] List of parameters to help pick and configure the matrix powers kernel implementation. If null, default parameters are used.
Returns:
Instance of an OpAkx<Scalar, MV, OP> subclass.

Definition at line 167 of file BelosAkxFactory.hpp.

template<class Scalar , class MV >
Teuchos::RCP< const Teuchos::ParameterList > Belos::AkxFactory< Scalar, MV >::getDefaultParameters ( )

Return the default matrix powers kernel parameter list.

Definition at line 222 of file BelosAkxFactory.hpp.

template<class Scalar, class MV>
const std::string& Belos::AkxFactory< Scalar, MV >::parameterListName ( ) const [inline]

Return name of the matrix powers kernel parameter list.

This method is useful if you are looking for parameters for the matrix powers kernel as a sublist of a solver's parameter list.

Definition at line 119 of file BelosAkxFactory.hpp.

template<class Scalar , class MV >
std::string Belos::AkxFactory< Scalar, MV >::validateBasisName ( const std::string &  basisName) const [private]

Validate and return canonical basis name.

First, canonicalize basisName. Return the canonical name if it names one of the one of the accepted types of matrix powers kernel basis. Otherwise, throw an invalid_argument exception.

Parameters:
basisName[in] Name of a matrix powers kernel basis.
Returns:
Canonical matrix powers kernel basis name.

Definition at line 261 of file BelosAkxFactory.hpp.


Member Data Documentation

template<class Scalar, class MV>
const std::string Belos::AkxFactory< Scalar, MV >::listName_ [private]

Name of the matrix powers kernel parameter list.

Definition at line 137 of file BelosAkxFactory.hpp.

template<class Scalar, class MV>
std::vector<std::string> Belos::AkxFactory< Scalar, MV >::validBasisNames_ [private]

List of valid matrix powers kernel basis names.

Definition at line 140 of file BelosAkxFactory.hpp.

template<class Scalar, class MV>
Teuchos::RCP<const Teuchos::ParameterList> Belos::AkxFactory< Scalar, MV >::defaultParams_ [private]

The default parameter list.

This is initialized lazily in getDefaultParameters().

Definition at line 145 of file BelosAkxFactory.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines