Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Public Types | Related Symbols | 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
 The specialization of CrsMatrix which this class wraps.
 
using map_type = Map<LocalOrdinal, GlobalOrdinal, Node>
 The specialization of Map which this class uses.
 
Typedefs that give access to the template parameters.
typedef Scalar scalar_type
 The type of the entries of the input and output multivectors.
 
typedef LocalOrdinal local_ordinal_type
 The local index type.
 
typedef GlobalOrdinal global_ordinal_type
 The global index type.
 
typedef Node node_type
 The Kokkos Node type.
 

Public Member Functions

Constructor and destructor
 MixedScalarMultiplyOp (const Teuchos::RCP< const op_type > &A)
 Constructor.
 
 ~MixedScalarMultiplyOp () override=default
 Destructor (virtual for memory safety of derived classes).
 
Pure virtual functions to be overridden by subclasses.
virtual bool hasDiagonal () const
 Whether this operator can return its diagonal.
 
virtual void getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
 Get the diagonal of the operator.
 

Related Symbols

(Note that these are not member symbols.)

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.
 

Methods implementing Operator

const Teuchos::RCP< const op_typeop_
 The underlying CrsMatrix object.
 
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$.
 
bool hasTransposeApply () const override
 Whether this Operator's apply() method can apply the transpose or conjugate transpose.
 
Teuchos::RCP< const map_typegetDomainMap () const override
 The domain Map of this Operator.
 
Teuchos::RCP< const map_typegetRangeMap () const override
 The range Map of this Operator.
 

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 76 of file Tpetra_MixedScalarMultiplyOp.hpp.

Member Typedef Documentation

◆ op_type

Initial value:
Operator<OpScalar, LocalOrdinal, GlobalOrdinal, Node>

The specialization of CrsMatrix which this class wraps.

Definition at line 81 of file Tpetra_MixedScalarMultiplyOp.hpp.

◆ map_type

The specialization of Map which this class uses.

Definition at line 84 of file Tpetra_MixedScalarMultiplyOp.hpp.

◆ scalar_type

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

Definition at line 93 of file Tpetra_Operator.hpp.

◆ local_ordinal_type

The local index type.

Definition at line 96 of file Tpetra_Operator.hpp.

◆ global_ordinal_type

The global index type.

Definition at line 99 of file Tpetra_Operator.hpp.

◆ node_type

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

The Kokkos Node type.

Definition at line 102 of file Tpetra_Operator.hpp.

Constructor & Destructor Documentation

◆ MixedScalarMultiplyOp()

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 94 of file Tpetra_MixedScalarMultiplyOp.hpp.

◆ ~MixedScalarMultiplyOp()

Destructor (virtual for memory safety of derived classes).

Member Function Documentation

◆ apply()

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 110 of file Tpetra_MixedScalarMultiplyOp.hpp.

◆ hasTransposeApply()

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 134 of file Tpetra_MixedScalarMultiplyOp.hpp.

◆ getDomainMap()

Teuchos::RCP< const map_type > Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
inlineoverridevirtual

◆ getRangeMap()

Teuchos::RCP< const map_type > Tpetra::MixedScalarMultiplyOp< Scalar, OpScalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
inlineoverridevirtual

◆ hasDiagonal()

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 156 of file Tpetra_Operator.hpp.

◆ getLocalDiagCopy()

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

Friends And Related Symbol Documentation

◆ createMixedScalarMultiplyOp()

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 179 of file Tpetra_MixedScalarMultiplyOp.hpp.

Member Data Documentation

◆ op_

The underlying CrsMatrix object.

Definition at line 154 of file Tpetra_MixedScalarMultiplyOp.hpp.


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