47 #ifndef MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
48 #define MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
53 #include <Xpetra_CrsMatrixWrap.hpp>
55 #include <Xpetra_TpetraMultiVector.hpp>
56 #include <Xpetra_MultiVectorFactory.hpp>
59 #include "MueLu_Hierarchy.hpp"
60 #include "MueLu_Utilities.hpp"
66 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
77 if (tpbA != Teuchos::null) {
83 return tpA->getDomainMap();
88 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
99 if (tpbA != Teuchos::null)
104 return tpA->getRangeMap();
109 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
117 TMV& temp_x =
const_cast<TMV&
>(X);
118 const XTMV tX(rcpFromRef(temp_x));
119 XTMV tY(rcpFromRef(Y));
123 Hierarchy_->Iterate(tX, tY, cycles_,
true);
126 catch (std::exception& e) {
128 std::cerr <<
"Caught an exception in MueLu::ShiftedLaplacianOperator::ApplyInverse():" << std::endl
129 << e.what() << std::endl;
162 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
169 #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.
MueLu::DefaultScalar Scalar
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Tpetra::Map object associated with the range of this operator.
static RCP< Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op2NonConstTpetraCrs(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> Op)