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

#include <Xpetra_Operator.hpp>

Inheritance diagram for Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::CrsMatrixWrap< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::ReorderedBlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Public Member Functions

virtual ~Operator ()
 
virtual void removeEmptyProcessesInPlace (const RCP< const Map > &)
 
virtual void residual (const MultiVector &X, const MultiVector &B, MultiVector &R) const =0
 Compute a residual R = B - (*this) * X. More...
 

Private Types

typedef Xpetra::Map
< LocalOrdinal, GlobalOrdinal,
Node > 
Map
 
typedef Xpetra::MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > 
MultiVector
 

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...
 

Pure virtual functions to be overridden by subclasses.

virtual Teuchos::RCP< const MapgetDomainMap () const =0
 The Map associated with the domain of this operator, which must be compatible with X.getMap(). More...
 
virtual Teuchos::RCP< const MapgetRangeMap () const =0
 The Map associated with the range of this operator, which must be compatible with Y.getMap(). More...
 
virtual void apply (const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const =0
 Computes the operator-multivector application. More...
 
virtual bool hasTransposeApply () const
 Whether this operator supports applying the transpose or conjugate transpose. More...
 

Detailed Description

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

Definition at line 64 of file Xpetra_Operator.hpp.

Member Typedef Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Xpetra::Map<LocalOrdinal,GlobalOrdinal,Node> Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Map
private

Definition at line 65 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Xpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector
private

Definition at line 66 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Scalar Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type

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

Definition at line 73 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef LocalOrdinal Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type

The local index type.

Definition at line 76 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef GlobalOrdinal Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type

The global index type.

Definition at line 79 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Node Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type

The Kokkos Node type.

Definition at line 82 of file Xpetra_Operator.hpp.

Constructor & Destructor Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~Operator ( )
inlinevirtual

Definition at line 68 of file Xpetra_Operator.hpp.

Member Function Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<const Map> Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
pure virtual
template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<const Map> Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
pure virtual
template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual void Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::apply ( const MultiVector X,
MultiVector Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar  alpha = Teuchos::ScalarTraits< Scalar >::one(),
Scalar  beta = Teuchos::ScalarTraits< Scalar >::zero() 
) const
pure virtual

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.

Implemented in Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::CrsMatrixWrap< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::ReorderedBlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraOperator< EpetraGlobalOrdinal, Node >, and Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

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

Whether this operator supports applying the transpose or conjugate transpose.

By default, this returns false. Subclasses must override this method if they can support apply() with mode=Teuchos::TRANS or mode=Teuchos::CONJ_TRANS.

Reimplemented in Xpetra::TpetraOperator< double, int, long long, EpetraNode >, Xpetra::TpetraOperator< double, int, int, EpetraNode >, Xpetra::EpetraOperator< EpetraGlobalOrdinal, Node >, and Xpetra::TpetraOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 112 of file Xpetra_Operator.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual void Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::removeEmptyProcessesInPlace ( const RCP< const Map > &  )
inlinevirtual

Definition at line 116 of file Xpetra_Operator.hpp.

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

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