2 #ifndef PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
3 #define PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
7 #include "MueLu_config.hpp"
8 #include "MueLu_RefMaxwell.hpp"
12 #if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA)
22 if (X.Values() == Y.Values()) {
26 xOp_->apply(eX, *tmpY);
28 eY.
update(1.0, *tmpY, 0.0);
35 }
catch (std::exception& e) {
37 std::cerr <<
"Caught an exception in MueLu::AztecEpetraOperator::ApplyInverse():" << std::endl
38 << e.what() << std::endl;
44 const Epetra_Comm& AztecEpetraOperator::Comm()
const {
49 const Epetra_Map& AztecEpetraOperator::OperatorDomainMap()
const {
53 if (crsOp == Teuchos::null)
54 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
55 const RCP<const Xpetra::EpetraCrsMatrix> &tmp_ECrsMtx = rcp_dynamic_cast<
const Xpetra::EpetraCrsMatrix>(crsOp->getCrsMatrix());
56 if (tmp_ECrsMtx == Teuchos::null)
57 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
58 return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->DomainMap();
67 const Epetra_Map & AztecEpetraOperator::OperatorRangeMap()
const {
72 if (crsOp == Teuchos::null)
73 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
74 const RCP<const Xpetra::EpetraCrsMatrix> &tmp_ECrsMtx = rcp_dynamic_cast<
const Xpetra::EpetraCrsMatrix>(crsOp->getCrsMatrix());
75 if (tmp_ECrsMtx == Teuchos::null)
76 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
77 return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->RangeMap();
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)
void putScalar(const Scalar &value)
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
size_t getNumVectors() const
const Epetra_Comm & Comm() const
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const