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

"Identity" preconditioner. More...

#include <Ifpack2_IdentitySolver_decl.hpp>

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

List of all members.

Public Types

typedef MatrixType::scalar_type scalar_type
 Type of the entries of the input matrix.
typedef
MatrixType::local_ordinal_type 
local_ordinal_type
 Type of the local indices of the input matrix.
typedef
MatrixType::global_ordinal_type 
global_ordinal_type
 Type of the global indices of the input matrix.
typedef MatrixType::node_type node_type
 Kokkos Node type of the input matrix.
typedef Teuchos::ScalarTraits
< scalar_type >::magnitudeType 
magnitude_type
 Type of the absolute value (magnitude) of a scalar_type value.
typedef Tpetra::Map
< local_ordinal_type,
global_ordinal_type, node_type
map_type
 Specialization of Tpetra::Map used by this class.
typedef Tpetra::RowMatrix
< scalar_type,
local_ordinal_type,
global_ordinal_type, node_type
row_matrix_type
 Specialization of Tpetra::RowMatrix used by this class.

Public Member Functions

 IdentitySolver (const Teuchos::RCP< const row_matrix_type > &A)
 Constructor: Takes the matrix to precondition.
virtual ~IdentitySolver ()
 Destructor.
void setParameters (const Teuchos::ParameterList &params)
 Set this object's parameters.
void initialize ()
 Initialize.
bool isInitialized () const
 Return true if the preconditioner has been successfully initialized.
void compute ()
 Compute the preconditioner.
bool isComputed () const
 Return true if compute() has been called.
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.
Teuchos::RCP< const map_typegetDomainMap () const
 Return the Tpetra::Map object associated with the domain of this operator.
Teuchos::RCP< const map_typegetRangeMap () const
 Return the Tpetra::Map object associated with the range of this operator.
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.
Mathematical functions.
virtual magnitude_type
TEUCHOS_DEPRECATED 
computeCondEst (CondestType CT=Cheap, local_ordinal_type MaxIters=1550, magnitude_type Tol=1e-9, const Teuchos::Ptr< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > &matrix=Teuchos::null)
 Compute the condition number estimate and return its value.
Attribute accessor methods
virtual magnitude_type
TEUCHOS_DEPRECATED 
getCondEst () const
 Return the computed condition number estimate, or -1 if not computed.
Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 Return the communicator associated with this matrix operator.
Teuchos::RCP< const
row_matrix_type
getMatrix () const
 Return a reference to the matrix to be preconditioned.
double getComputeFlops () const
 Return the number of flops in the computation phase.
double getApplyFlops () const
 Return the number of flops for the application of the preconditioner.
int getNumInitialize () const
 Return the number of calls to initialize().
int getNumCompute () const
 Return the number of calls to compute().
int getNumApply () const
 Return the number of calls to apply().
double getInitializeTime () const
 Return the time spent in initialize().
double getComputeTime () const
 Return the time spent in compute().
double getApplyTime () const
 Return the time spent in apply().
Implementation of Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object.
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.
virtual void setMatrix (const Teuchos::RCP< const row_matrix_type > &A)
 Set this preconditioner's matrix.

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

Kokkos Node type of the input matrix.

template<class MatrixType>
typedef Teuchos::ScalarTraits<scalar_type>::magnitudeType Ifpack2::IdentitySolver< MatrixType >::magnitude_type
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 [inline, virtual]
template<class MatrixType >
void Ifpack2::IdentitySolver< MatrixType >::compute ( ) [virtual]
template<class MatrixType>
bool Ifpack2::IdentitySolver< MatrixType >::isComputed ( ) const [inline, 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]

Apply the original input matrix.

Parameters:
X[in] MultiVector input.
Y[in/out] Result of applying the matrix A to X.
template<class MatrixType>
IdentitySolver< MatrixType >::magnitude_type Ifpack2::IdentitySolver< MatrixType >::computeCondEst ( CondestType  CT = Cheap,
local_ordinal_type  MaxIters = 1550,
magnitude_type  Tol = 1e-9,
const Teuchos::Ptr< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > &  matrix = Teuchos::null 
) [virtual]

Compute the condition number estimate and return its value.

Warning:
This method is DEPRECATED. It was inherited from Ifpack, and Ifpack never clearly stated what this method computes. Furthermore, Ifpack's method just estimates the condition number of the matrix A, and ignores the preconditioner -- which is probably not what users thought it did. If there is sufficient interest, we might reintroduce this method with a different meaning and a better algorithm.

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

template<class MatrixType>
virtual magnitude_type TEUCHOS_DEPRECATED Ifpack2::IdentitySolver< MatrixType >::getCondEst ( ) const [inline, virtual]

Return the computed condition number estimate, or -1 if not computed.

Warning:
This method is DEPRECATED. See warning for computeCondEst().

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

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 [inline, virtual]
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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends