10 #include "Tpetra_EpetraRowMatrix.hpp"
11 #if defined(HAVE_TPETRA_EPETRA)
13 #ifdef HAVE_TPETRACORE_MPI
14 # include "Epetra_MpiComm.h"
17 # include "Epetra_SerialComm.h"
18 #endif // HAVE_TPETRACORE_MPI
23 #ifdef HAVE_TPETRACORE_MPI
24 std::shared_ptr<Epetra_Comm>
25 makeEpetraCommFromTeuchosComm (
const Teuchos::Comm<int>& teuchosComm)
27 using Tpetra::Details::extractMpiCommFromTeuchos;
32 MPI_Comm mpiComm = extractMpiCommFromTeuchos (teuchosComm);
33 Epetra_MpiComm* epetraComm =
new Epetra_MpiComm (mpiComm);
34 return std::shared_ptr<Epetra_Comm> (
static_cast<Epetra_Comm*
> (epetraComm));
37 std::shared_ptr<Epetra_Comm>
38 makeEpetraCommFromTeuchosComm (
const Teuchos::Comm<int>&)
40 return std::shared_ptr<Epetra_Comm> (
static_cast<Epetra_Comm*
> (
new Epetra_SerialComm));
42 #endif // HAVE_TPETRACORE_MPI
47 #endif // defined(HAVE_TPETRA_EPETRA)