Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_TpetraOperator.hpp>

Inheritance diagram for Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Private Attributes

RCP< Tpetra::Operator< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
op_
 The Tpetra::Operator which this class wraps. More...
 
virtual Teuchos::RCP< const
Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getDomainMap () const
 The Map associated with the domain of this operator, which must be compatible with X.getMap(). More...
 
virtual Teuchos::RCP< const
Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getRangeMap () const
 The Map associated with the range of this operator, which must be compatible with Y.getMap(). More...
 
virtual void apply (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Xpetra::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
 Computes the operator-multivector application. More...
 
virtual bool hasTransposeApply () const
 Whether this operator supports applying the transpose or conjugate transpose. More...
 

Overridden from Teuchos::Describable

std::string description () const
 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 the given verbosity level to a FancyOStream. More...
 

Xpetra specific

 TpetraOperator (const Teuchos::RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &op)
 TpetraOperator constructor to wrap a Tpetra::Operator object. More...
 
RCP< Tpetra::Operator< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getOperator ()
 Gets the operator out. More...
 
void residual (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &R) const
 Compute a residual R = B - (*this) * X. More...
 

Additional Inherited Members

- Public Types inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >
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 inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~Operator ()
 
virtual void removeEmptyProcessesInPlace (const RCP< const Map > &)
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
class Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 68 of file Xpetra_TpetraOperator.hpp.

Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::TpetraOperator ( const Teuchos::RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &  op)
inline

TpetraOperator constructor to wrap a Tpetra::Operator object.

Definition at line 123 of file Xpetra_TpetraOperator.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
inlinevirtual

The Map associated with the domain of this operator, which must be compatible with X.getMap().

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

Definition at line 73 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
inlinevirtual

The Map associated with the range of this operator, which must be compatible with Y.getMap().

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

Definition at line 79 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual void Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::apply ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
Xpetra::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
inlinevirtual

Computes the operator-multivector application.

Loosely, performs \(Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\). However, the details of operation vary according to the values of alpha and beta. Specifically

  • if beta == 0, apply() must overwrite Y, so that any values in Y (including NaNs) are ignored.
  • if alpha == 0, apply() may short-circuit the operator, so that any values in X (including NaNs) are ignored.

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

Definition at line 91 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual bool Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply ( ) const
inlinevirtual

Whether this operator supports applying the transpose or conjugate transpose.

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

Definition at line 100 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
std::string Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description ( ) const
inline

A simple one-line description of this object.

Definition at line 110 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
inline

Print the object with the given verbosity level to a FancyOStream.

Definition at line 113 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getOperator ( )
inline

Gets the operator out.

Definition at line 126 of file Xpetra_TpetraOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::residual ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  B,
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  R 
) const
inlinevirtual

Compute a residual R = B - (*this) * X.

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

Definition at line 129 of file Xpetra_TpetraOperator.hpp.

Member Data Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::op_
private

The Tpetra::Operator which this class wraps.

Definition at line 140 of file Xpetra_TpetraOperator.hpp.


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