10 #ifndef PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
11 #define PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_
14 #include "Xpetra_CrsMatrixWrap.hpp"
17 #include "MueLu_config.hpp"
18 #include "MueLu_RefMaxwell.hpp"
23 #if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA)
33 if (X.Values() == Y.Values()) {
37 xOp_->apply(eX, *tmpY);
39 eY.
update(1.0, *tmpY, 0.0);
46 }
catch (std::exception& e) {
48 std::cerr <<
"Caught an exception in MueLu::AztecEpetraOperator::ApplyInverse():" << std::endl
49 << e.what() << std::endl;
55 const Epetra_Comm& AztecEpetraOperator::Comm()
const {
60 const Epetra_Map& AztecEpetraOperator::OperatorDomainMap()
const {
64 if (crsOp == Teuchos::null)
65 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
67 if (tmp_ECrsMtx == Teuchos::null)
68 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
69 return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->DomainMap();
78 const Epetra_Map& AztecEpetraOperator::OperatorRangeMap()
const {
82 if (crsOp == Teuchos::null)
83 throw Exceptions::BadCast(
"Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed");
85 if (tmp_ECrsMtx == Teuchos::null)
86 throw Exceptions::BadCast(
"Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed");
87 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