Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Protected Attributes | Related Functions | List of all members
Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

A class for wrapping an Operator of one Scalar type into an Operator of another Scalar type. More...

#include <Tpetra_MixedScalarMultiplyOp.hpp>

Inheritance diagram for Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

Public Types

using op_type = Operator< OpScalar, LocalOrdinal, GlobalOrdinal, Node >
 The specialization of CrsMatrix which this class wraps. More...
 
using map_type = Map< LocalOrdinal, GlobalOrdinal, Node >
 The specialization of Map which this class uses. More...
 
Typedefs that give access to the template parameters.
typedef Scalar scalar_type
 The type of the entries of the input and output multivectors. More...
 
typedef LocalOrdinal local_ordinal_type
 The local index type. More...
 
typedef GlobalOrdinal global_ordinal_type
 The global index type. More...
 
typedef Node node_type
 The Kokkos Node type. More...
 

Public Member Functions

Constructor and destructor
 MixedScalarMultiplyOp (const Teuchos::RCP< const op_type > &A)
 Constructor. More...
 
 ~MixedScalarMultiplyOp () override=default
 Destructor (virtual for memory safety of derived classes). More...
 
Methods implementing Operator
void apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const override
 Compute Y = beta*Y + alpha*Op(A)*X, where Op(A) is either A, $A^T$, or $A^H$. More...
 
bool hasTransposeApply () const override
 Whether this Operator's apply() method can apply the transpose or conjugate transpose. More...
 
Teuchos::RCP< const map_typegetDomainMap () const override
 The domain Map of this Operator. More...
 
Teuchos::RCP< const map_typegetRangeMap () const override
 The range Map of this Operator. More...
 
Pure virtual functions to be overridden by subclasses.
virtual bool hasDiagonal () const
 Whether this operator can return its diagonal. More...
 
virtual void getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
 Get the diagonal of the operator. More...
 

Protected Attributes

const Teuchos::RCP< const op_typeop_
 The underlying CrsMatrix object. More...
 

Related Functions

(Note that these are not member functions.)

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP
< MixedScalarMultiplyOp
< Scalar, OpScalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createMixedScalarMultiplyOp (const Teuchos::RCP< const Operator< OpScalar, LocalOrdinal, GlobalOrdinal, Node > > &A)
 Non-member function to create a MixedScalarMultiplyOp. More...
 

Detailed Description

template<class Scalar, class OpScalar, class LocalOrdinal, class GlobalOrdinal, class Node>
class Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >

A class for wrapping an Operator of one Scalar type into an Operator of another Scalar type.

Template Parameters
ScalarThe type of the entries of the input and output MultiVector (see apply()). Same as the first template parameter of Operator.
OpScalarThe type of the entries of the wrapped Operator.
LocalOrdinalThe second template parameter of Operator.
GlobalOrdinalThe third template parameter of Operator.
NodeThe fourth template parameter of Operator.

Definition at line 44 of file Tpetra_MixedScalarMultiplyOp.hpp.

Member Typedef Documentation

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::op_type = Operator<OpScalar, LocalOrdinal, GlobalOrdinal, Node>

The specialization of CrsMatrix which this class wraps.

Definition at line 50 of file Tpetra_MixedScalarMultiplyOp.hpp.

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::map_type = Map<LocalOrdinal, GlobalOrdinal, Node>

The specialization of Map which this class uses.

Definition at line 52 of file Tpetra_MixedScalarMultiplyOp.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef Scalar Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type
inherited

The type of the entries of the input and output multivectors.

Definition at line 61 of file Tpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef LocalOrdinal Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type
inherited

The local index type.

Definition at line 64 of file Tpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef GlobalOrdinal Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type
inherited

The global index type.

Definition at line 67 of file Tpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef Node Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type
inherited

The Kokkos Node type.

Definition at line 70 of file Tpetra_Operator.hpp.

Constructor & Destructor Documentation

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::MixedScalarMultiplyOp ( const Teuchos::RCP< const op_type > &  A)
inline

Constructor.

Parameters
A[in] The Operator to wrap as an Operator<Scalar, ...>.

Definition at line 62 of file Tpetra_MixedScalarMultiplyOp.hpp.

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::~MixedScalarMultiplyOp ( )
overridedefault

Destructor (virtual for memory safety of derived classes).

Member Function Documentation

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::apply ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar  alpha = Teuchos::ScalarTraits<Scalar>::one (),
Scalar  beta = Teuchos::ScalarTraits<Scalar>::zero () 
) const
inlineoverridevirtual

Compute Y = beta*Y + alpha*Op(A)*X, where Op(A) is either A, $A^T$, or $A^H$.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 78 of file Tpetra_MixedScalarMultiplyOp.hpp.

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply ( ) const
inlineoverridevirtual

Whether this Operator's apply() method can apply the transpose or conjugate transpose.

This is always true, since it is true for the CrsMatrix that this object wraps.

Reimplemented from Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 102 of file Tpetra_MixedScalarMultiplyOp.hpp.

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP<const map_type> Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
inlineoverridevirtual
template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP<const map_type> Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
inlineoverridevirtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasDiagonal ( ) const
virtualinherited

Whether this operator can return its diagonal.

By default, this returns false. Subclasses must override this method if they can supply a diagonal.

Definition at line 124 of file Tpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagCopy ( Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  diag) const
virtualinherited

Get the diagonal of the operator.

By default, this throws. Subclasses must override this method if they can supply a diagonal.

Reimplemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::RowMatrix< Scalar, LO, GO, Node >.

Definition at line 129 of file Tpetra_Operator.hpp.

Friends And Related Function Documentation

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node > > createMixedScalarMultiplyOp ( const Teuchos::RCP< const Operator< OpScalar, LocalOrdinal, GlobalOrdinal, Node > > &  A)
related

Non-member function to create a MixedScalarMultiplyOp.

The function has the same template parameters of MixedScalarMultiplyOp.

Parameters
A[in] The Operator instance to wrap in an MixedScalarMultiplyOp.
Returns
The MixedScalarMultiplyOp wrapper for the given Operator.

Definition at line 147 of file Tpetra_MixedScalarMultiplyOp.hpp.

Member Data Documentation

template<class Scalar , class OpScalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const Teuchos::RCP<const op_type> Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::op_
protected

The underlying CrsMatrix object.

Definition at line 122 of file Tpetra_MixedScalarMultiplyOp.hpp.


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