42 #ifndef THYRA_TPETRA_LINEAR_OP_DECL_HPP
43 #define THYRA_TPETRA_LINEAR_OP_DECL_HPP
45 #include "Thyra_LinearOpDefaultBase.hpp"
46 #include "Thyra_TpetraVectorSpace_decl.hpp"
47 #include "Thyra_ScaledLinearOpBase.hpp"
48 #include "Thyra_RowStatLinearOpBase.hpp"
49 #include "Tpetra_Operator.hpp"
50 #include "Teuchos_ConstNonconstObjectContainer.hpp"
52 #if defined(HAVE_THYRA_EPETRA) && defined(HAVE_TPETRA_EPETRA)
53 # define HAVE_THYRA_TPETRA_EPETRA
56 #ifdef HAVE_THYRA_TPETRA_EPETRA
57 # include "Thyra_EpetraLinearOpBase.hpp"
58 # include "Tpetra_EpetraRowMatrix.hpp"
71 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal=LocalOrdinal,
72 class Node=KokkosClassic::DefaultNode::DefaultNodeType>
77 #ifdef HAVE_THYRA_TPETRA_EPETRA
93 const RCP<Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator
100 const RCP<
const Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator
124 #ifdef HAVE_THYRA_TPETRA_EPETRA
130 void getNonconstEpetraOpView(
137 void getEpetraOpView(
146 #endif // HAVE_THYRA_TPETRA_EPETRA
189 const RowStatLinearOpBaseUtils::ERowStat rowStat)
const;
193 const RowStatLinearOpBaseUtils::ERowStat rowStat,
209 #ifdef HAVE_THYRA_TPETRA_EPETRA
213 template<
class TpetraOperator_t>
227 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
232 const RCP<Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator
237 op->initialize(rangeSpace, domainSpace, tpetraOperator);
246 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
251 const RCP<
const Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator
256 op->constInitialize(rangeSpace, domainSpace, tpetraOperator);
264 #endif // THYRA_TPETRA_LINEAR_OP_DECL_HPP
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
void constInitialize(const RCP< const VectorSpaceBase< Scalar > > &rangeSpace, const RCP< const VectorSpaceBase< Scalar > > &domainSpace, const RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator)
Initialize.
Abstract base class for all LinearOpBase objects that can return an Epetra_Operator view of themselve...
Node subclass that provides a good default implementation for the describe() function.
virtual void getRowStatImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const
bool opSupportedImpl(Thyra::EOpTransp M_trans) const
Abstract interface for objects that represent a space for vectors.
RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getConstTpetraOperator() const
Get embedded const Tpetra::Operator.
void applyImpl(const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< Scalar > &X_in, const Teuchos::Ptr< Thyra::MultiVectorBase< Scalar > > &Y_inout, const Scalar alpha, const Scalar beta) const
virtual bool rowStatIsSupportedImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Interface for a collection of column vectors called a multi-vector.
RCP< const TpetraLinearOp< Scalar, LocalOrdinal, GlobalOrdinal, Node > > constTpetraLinearOp(const RCP< const VectorSpaceBase< Scalar > > &rangeSpace, const RCP< const VectorSpaceBase< Scalar > > &domainSpace, const RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator)
Nonmmeber constructor for TpetraLinearOp.
virtual bool supportsScaleLeftImpl() const
RCP< const Thyra::VectorSpaceBase< Scalar > > range() const
RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetraOperator()
Get embedded non-const Tpetra::Operator.
Abstract interface for finite-dimensional dense vectors.
RCP< TpetraLinearOp< Scalar, LocalOrdinal, GlobalOrdinal, Node > > tpetraLinearOp(const RCP< const VectorSpaceBase< Scalar > > &rangeSpace, const RCP< const VectorSpaceBase< Scalar > > &domainSpace, const RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator)
Nonmmeber constructor for TpetraLinearOp.
TpetraLinearOp()
Construct to uninitialized.
Applies left or right sclaing to the linear operator.
virtual void scaleLeftImpl(const VectorBase< Scalar > &row_scaling)
virtual void scaleRightImpl(const VectorBase< Scalar > &col_scaling)
Interface for exxtracting row statistics as a VectorBase from a supporting LinearOpBase object...
virtual bool supportsScaleRightImpl() const
void initialize(const RCP< const VectorSpaceBase< Scalar > > &rangeSpace, const RCP< const VectorSpaceBase< Scalar > > &domainSpace, const RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator)
Initialize.
RCP< const Thyra::VectorSpaceBase< Scalar > > domain() const
Concrete Thyra::LinearOpBase subclass for Tpetra::Operator.