44 #include "Tpetra_EpetraRowMatrix.hpp"
45 #if defined(HAVE_TPETRA_EPETRA)
47 #ifdef HAVE_TPETRACORE_MPI
48 # include "Epetra_MpiComm.h"
51 # include "Epetra_SerialComm.h"
52 #endif // HAVE_TPETRACORE_MPI
57 #ifdef HAVE_TPETRACORE_MPI
58 std::shared_ptr<Epetra_Comm>
59 makeEpetraCommFromTeuchosComm (
const Teuchos::Comm<int>& teuchosComm)
61 using Tpetra::Details::extractMpiCommFromTeuchos;
66 MPI_Comm mpiComm = extractMpiCommFromTeuchos (teuchosComm);
67 Epetra_MpiComm* epetraComm =
new Epetra_MpiComm (mpiComm);
68 return std::shared_ptr<Epetra_Comm> (
static_cast<Epetra_Comm*
> (epetraComm));
71 std::shared_ptr<Epetra_Comm>
72 makeEpetraCommFromTeuchosComm (
const Teuchos::Comm<int>&)
74 return std::shared_ptr<Epetra_Comm> (
static_cast<Epetra_Comm*
> (
new Epetra_SerialComm));
76 #endif // HAVE_TPETRACORE_MPI
81 #endif // defined(HAVE_TPETRA_EPETRA)