10 #ifndef MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
11 #define MUELU_SHIFTEDLAPLACIANOPERATOR_DEF_HPP
16 #include <Xpetra_CrsMatrixWrap.hpp>
18 #include <Xpetra_TpetraMultiVector.hpp>
19 #include <Xpetra_MultiVectorFactory.hpp>
22 #include "MueLu_Hierarchy.hpp"
23 #include "MueLu_Utilities.hpp"
29 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
40 if (tpbA != Teuchos::null) {
46 return tpA->getDomainMap();
51 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
62 if (tpbA != Teuchos::null)
67 return tpA->getRangeMap();
72 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
80 TMV& temp_x =
const_cast<TMV&
>(X);
81 const XTMV tX(rcpFromRef(temp_x));
82 XTMV tY(rcpFromRef(Y));
86 Hierarchy_->Iterate(tX, tY, cycles_,
true);
89 catch (std::exception& e) {
91 std::cerr <<
"Caught an exception in MueLu::ShiftedLaplacianOperator::ApplyInverse():" << std::endl
92 << e.what() << std::endl;
125 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
132 #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)