46 #ifndef XPETRA_EPETRAOPERATOR_HPP 47 #define XPETRA_EPETRAOPERATOR_HPP 51 #include <Epetra_Operator.h> 52 #include <Epetra_Map.h> 64 template<
class EpetraGlobalOrdinal,
class Node>
75 virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >
getDomainMap()
const {
77 return toXpetra<GlobalOrdinal,Node>(
op_->OperatorDomainMap());
81 virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >
getRangeMap()
const {
83 return toXpetra<GlobalOrdinal,Node>(
op_->OperatorRangeMap());
95 Teuchos::ETransp mode = Teuchos::NO_TRANS,
96 Scalar alpha = Teuchos::ScalarTraits<Scalar>::one(),
97 Scalar beta = Teuchos::ScalarTraits<Scalar>::zero())
const {
104 "Xpetra::EpetraOperator->apply(): can only accept mode == NO_TRANS or mode == TRANS");
106 "Xpetra::EpetraOperator->apply(): cannot apply transpose as underlying Epetra operator does not support it");
109 RCP<Epetra_MultiVector> epY = eY.getEpetra_MultiVector();
113 op_->SetUseTranspose(mode == Teuchos::TRANS);
123 int err =
op_->SetUseTranspose(
true);
124 op_->SetUseTranspose(
false);
137 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const {
139 out <<
"Epetra_Operator" << std::endl;
154 RCP< Epetra_Operator>
op_;
161 #endif // XPETRA_EPETRAOPERATOR_HPP
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...
std::string description() const
A simple one-line description of this object.
virtual bool hasTransposeApply() const
Whether this operator supports applying the transpose or conjugate transpose.
Exception throws to report errors in the internal logical of the program.
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...
#define XPETRA_ERR_CHECK(arg)
EpetraOperator(const Teuchos::RCP< Epetra_Operator > &op)
EpetraOperator constructor to wrap a Epetra_Operator object.
Exception throws when you call an unimplemented method of Xpetra.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
virtual 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
Computes the operator-multivector application.
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.
EpetraGlobalOrdinal GlobalOrdinal
RCP< Epetra_Operator > op_
The Tpetra::Operator which this class wraps.
#define XPETRA_MONITOR(funcName)