47 #ifndef MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
48 #define MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
52 #ifdef HAVE_MUELU_TPETRA
57 #include <Xpetra_TpetraMultiVector.hpp>
61 #include "MueLu_Hierarchy.hpp"
62 #include "MueLu_Utilities.hpp"
69 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
81 if (tpbA != Teuchos::null) {
87 return tpA->getDomainMap ();
92 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
104 if(tpbA != Teuchos::null)
109 return tpA->getRangeMap();
114 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
116 Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node>& Y,
119 typedef Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> TMV;
123 TMV & temp_x =
const_cast<TMV &
>(X);
124 const XTMV tX(rcpFromRef(temp_x));
125 XTMV tY(rcpFromRef(Y));
129 Hierarchy_->Iterate(tX, tY, cycles_,
true);
132 catch(std::exception& e) {
134 std::cerr <<
"Caught an exception in MueLu::ShiftedLaplacianOperator::ApplyInverse():" << std::endl
135 << e.what() << std::endl;
169 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
175 #endif //ifdef HAVE_MUELU_TPETRA
177 #endif //ifdef MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access). Usage: Level->Get< RCP<Matrix> >("A", factory) if factory == NULL => use default factory.
const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > toTpetraNonZero(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Tpetra::Map object associated with the domain of this operator.
void apply(const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::one()) const
Returns in Y the result of a Tpetra::Operator applied to a Tpetra::MultiVector X. ...
bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.
static RCP< Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op2NonConstTpetraCrs(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op)
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Tpetra::Map object associated with the range of this operator.