Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
Ifpack2::IdentitySolver< MatrixType > Class Template Reference

"Identity" preconditioner. More...

#include <Ifpack2_IdentitySolver_decl.hpp>

Inheritance diagram for Ifpack2::IdentitySolver< MatrixType >:
Inheritance graph
[legend]

Public Types

typedef MatrixType::scalar_type scalar_type
 Type of the entries of the input matrix. More...
 
typedef
MatrixType::local_ordinal_type 
local_ordinal_type
 Type of the local indices of the input matrix. More...
 
typedef
MatrixType::global_ordinal_type 
global_ordinal_type
 Type of the global indices of the input matrix. More...
 
typedef MatrixType::node_type node_type
 Node type of the input matrix. More...
 
typedef Teuchos::ScalarTraits
< scalar_type >::magnitudeType 
magnitude_type
 Type of the absolute value (magnitude) of a scalar_type value. More...
 
typedef Tpetra::Map
< local_ordinal_type,
global_ordinal_type, node_type
map_type
 Specialization of Tpetra::Map used by this class. More...
 
typedef Tpetra::RowMatrix
< scalar_type,
local_ordinal_type,
global_ordinal_type, node_type
row_matrix_type
 Specialization of Tpetra::RowMatrix used by this class. More...
 
- Public Types inherited from Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >
typedef Teuchos::ScalarTraits
< MatrixType::scalar_type >
::magnitudeType 
magnitude_type
 The type of the magnitude (absolute value) of a matrix entry. More...
 

Public Member Functions

 IdentitySolver (const Teuchos::RCP< const row_matrix_type > &A)
 Constructor: Takes the matrix to precondition. More...
 
virtual ~IdentitySolver ()
 Destructor. More...
 
void setParameters (const Teuchos::ParameterList &params)
 Set this object's parameters. More...
 
void initialize ()
 Initialize. More...
 
bool isInitialized () const
 Return true if the preconditioner has been successfully initialized. More...
 
void compute ()
 Compute the preconditioner. More...
 
bool isComputed () const
 Return true if compute() has been called. More...
 
Implementation of Tpetra::Operator
void apply (const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const
 Apply the preconditioner to X, and put the result in Y. More...
 
Teuchos::RCP< const map_typegetDomainMap () const
 Return the Tpetra::Map object associated with the domain of this operator. More...
 
Teuchos::RCP< const map_typegetRangeMap () const
 Return the Tpetra::Map object associated with the range of this operator. More...
 
void applyMat (const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS) const
 Apply the original input matrix. More...
 
Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 Return the communicator associated with this matrix operator. More...
 
Teuchos::RCP< const
row_matrix_type
getMatrix () const
 Return a reference to the matrix to be preconditioned. More...
 
double getComputeFlops () const
 Return the number of flops in the computation phase. More...
 
double getApplyFlops () const
 Return the number of flops for the application of the preconditioner. More...
 
int getNumInitialize () const
 Return the number of calls to initialize(). More...
 
int getNumCompute () const
 Return the number of calls to compute(). More...
 
int getNumApply () const
 Return the number of calls to apply(). More...
 
double getInitializeTime () const
 Return the time spent in initialize(). More...
 
double getComputeTime () const
 Return the time spent in compute(). More...
 
double getApplyTime () const
 Return the time spent in apply(). More...
 
Implementation of Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object. More...
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object. More...
 
virtual void setMatrix (const Teuchos::RCP< const row_matrix_type > &A)
 Set this preconditioner's matrix. More...
 
- Public Member Functions inherited from Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >
virtual ~Preconditioner ()
 Destructor. More...
 
virtual void setZeroStartingSolution (bool zeroStartingSolution)
 Set this preconditioner's parameters. More...
 
- Public Member Functions inherited from Ifpack2::Details::CanChangeMatrix< Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > >
virtual void setMatrix (const Teuchos::RCP< const Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > &A)=0
 Set the new matrix. More...
 
virtual ~CanChangeMatrix ()
 Destructor. More...
 

Detailed Description

template<class MatrixType>
class Ifpack2::IdentitySolver< MatrixType >

"Identity" preconditioner.

Template Parameters
MatrixTypeSpecialization of Tpetra::RowMatrix.

This class is mainly useful for testing. It implements the identity operator; its apply() method just copies the input to the output.

Member Typedef Documentation

template<class MatrixType >
typedef MatrixType::scalar_type Ifpack2::IdentitySolver< MatrixType >::scalar_type

Type of the entries of the input matrix.

template<class MatrixType >
typedef MatrixType::local_ordinal_type Ifpack2::IdentitySolver< MatrixType >::local_ordinal_type

Type of the local indices of the input matrix.

template<class MatrixType >
typedef MatrixType::global_ordinal_type Ifpack2::IdentitySolver< MatrixType >::global_ordinal_type

Type of the global indices of the input matrix.

template<class MatrixType >
typedef MatrixType::node_type Ifpack2::IdentitySolver< MatrixType >::node_type

Node type of the input matrix.

template<class MatrixType >
typedef Teuchos::ScalarTraits<scalar_type>::magnitudeType Ifpack2::IdentitySolver< MatrixType >::magnitude_type

Type of the absolute value (magnitude) of a scalar_type value.

template<class MatrixType >
typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type> Ifpack2::IdentitySolver< MatrixType >::map_type

Specialization of Tpetra::Map used by this class.

template<class MatrixType >
typedef Tpetra::RowMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type> Ifpack2::IdentitySolver< MatrixType >::row_matrix_type

Specialization of Tpetra::RowMatrix used by this class.

Constructor & Destructor Documentation

template<class MatrixType >
Ifpack2::IdentitySolver< MatrixType >::IdentitySolver ( const Teuchos::RCP< const row_matrix_type > &  A)

Constructor: Takes the matrix to precondition.

template<class MatrixType >
Ifpack2::IdentitySolver< MatrixType >::~IdentitySolver ( )
virtual

Destructor.

Member Function Documentation

template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::setParameters ( const Teuchos::ParameterList params)
virtual

Set this object's parameters.

This object does not currently take any parameters.

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::initialize ( )
virtual
template<class MatrixType >
bool Ifpack2::IdentitySolver< MatrixType >::isInitialized ( ) const
inlinevirtual
template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::compute ( )
virtual
template<class MatrixType >
bool Ifpack2::IdentitySolver< MatrixType >::isComputed ( ) const
inlinevirtual
template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::apply ( const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &  X,
Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
scalar_type  alpha = Teuchos::ScalarTraits<scalar_type>::one(),
scalar_type  beta = Teuchos::ScalarTraits<scalar_type>::zero() 
) const
virtual

Apply the preconditioner to X, and put the result in Y.

Parameters
X[in] MultiVector to which to apply the preconditioner.
Y[in/out] On input: Initial guess, if applicable. On poutput: Result of applying the preconditioner.

Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.

template<class MatrixType >
Teuchos::RCP< const typename IdentitySolver< MatrixType >::map_type > Ifpack2::IdentitySolver< MatrixType >::getDomainMap ( ) const
virtual
template<class MatrixType >
Teuchos::RCP< const typename IdentitySolver< MatrixType >::map_type > Ifpack2::IdentitySolver< MatrixType >::getRangeMap ( ) const
virtual
template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::applyMat ( const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &  X,
Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS 
) const

Apply the original input matrix.

Parameters
X[in] MultiVector input.
Y[in/out] Result of applying the matrix A to X.
template<class MatrixType >
Teuchos::RCP<const Teuchos::Comm<int> > Ifpack2::IdentitySolver< MatrixType >::getComm ( ) const

Return the communicator associated with this matrix operator.

template<class MatrixType >
Teuchos::RCP<const row_matrix_type> Ifpack2::IdentitySolver< MatrixType >::getMatrix ( ) const
inlinevirtual
template<class MatrixType >
double Ifpack2::IdentitySolver< MatrixType >::getComputeFlops ( ) const

Return the number of flops in the computation phase.

template<class MatrixType >
double Ifpack2::IdentitySolver< MatrixType >::getApplyFlops ( ) const

Return the number of flops for the application of the preconditioner.

template<class MatrixType >
int Ifpack2::IdentitySolver< MatrixType >::getNumInitialize ( ) const
virtual
template<class MatrixType >
int Ifpack2::IdentitySolver< MatrixType >::getNumCompute ( ) const
virtual
template<class MatrixType >
int Ifpack2::IdentitySolver< MatrixType >::getNumApply ( ) const
virtual
template<class MatrixType >
double Ifpack2::IdentitySolver< MatrixType >::getInitializeTime ( ) const
virtual
template<class MatrixType >
double Ifpack2::IdentitySolver< MatrixType >::getComputeTime ( ) const
virtual
template<class MatrixType >
double Ifpack2::IdentitySolver< MatrixType >::getApplyTime ( ) const
virtual
template<class MatrixType >
std::string Ifpack2::IdentitySolver< MatrixType >::description ( ) const

Return a simple one-line description of this object.

template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const

Print the object with some verbosity level to an FancyOStream object.

template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::setMatrix ( const Teuchos::RCP< const row_matrix_type > &  A)
virtual

Set this preconditioner's matrix.

After calling this method, you must call first initialize(), then compute(), before you may call apply().


The documentation for this class was generated from the following files: