48 #ifdef HAVE_XPETRA_EPETRA
55 #include <Teuchos_DefaultMpiComm.hpp>
56 #include <Teuchos_OpaqueWrapper.hpp>
58 #include <Teuchos_DefaultSerialComm.hpp>
60 #include <Epetra_MpiComm.h>
62 #include <Epetra_SerialComm.h>
74 if (mpiComm != Teuchos::null) {
75 return Teuchos::rcp(
new Epetra_MpiComm(*mpiComm->getRawMpiComm()));
87 const Epetra_MpiComm& mpiComm =
dynamic_cast<const Epetra_MpiComm&
>(comm);
89 }
catch (std::bad_cast & b) {}
92 const Epetra_SerialComm& serialComm =
dynamic_cast<const Epetra_SerialComm&
>(comm);
95 }
catch (std::bad_cast & b) {
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, int > > &graph)
Exception indicating invalid cast attempted.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Exception throws when you call an unimplemented method of Xpetra.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > toXpetra(RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > >)
Convert an Epetra_Comm.to a Teuchos_Comm.