2 #ifndef PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
3 #define PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
6 #include "Xpetra_CrsMatrixWrap.hpp"
9 #include "MueLu_config.hpp"
10 #include "MueLu_RefMaxwell.hpp"
15 #if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA)
25 if (X.Values() == Y.Values()) {
29 xOp_->apply(eX, *tmpY);
31 eY.
update(1.0, *tmpY, 0.0);
38 }
catch (std::exception& e) {
40 std::cerr <<
"Caught an exception in MueLu::AztecEpetraOperator::ApplyInverse():" << std::endl
41 << e.what() << std::endl;
47 const Epetra_Comm& AztecEpetraOperator::Comm()
const {
52 const Epetra_Map& AztecEpetraOperator::OperatorDomainMap()
const {
56 if (crsOp == Teuchos::null)
57 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
59 if (tmp_ECrsMtx == Teuchos::null)
60 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
61 return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->DomainMap();
70 const Epetra_Map& AztecEpetraOperator::OperatorRangeMap()
const {
74 if (crsOp == Teuchos::null)
75 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
77 if (tmp_ECrsMtx == Teuchos::null)
78 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
79 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