#ifdef DEAL_II_USE_TRILINOS
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+# include <Epetra_MpiComm.h>
+# include <mpi.h>
+#else
+# include <Epetra_SerialComm.h>
+#endif
// some forward declarations
namespace ML_Epetra
*/
boost::shared_ptr<ML_Epetra::MultiLevelPreconditioner> multigrid_operator;
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+ Epetra_MpiComm communicator;
+#else
Epetra_SerialComm communicator;
+#endif
boost::shared_ptr<Epetra_Map> Map;
/**
#include <lac/vector.h>
#include <lac/sparse_matrix.h>
-#include <Epetra_SerialComm.h>
+
+#ifdef DEAL_II_USE_TRILINOS
+
#include <Epetra_Map.h>
#include <Epetra_CrsMatrix.h>
#include <Epetra_Vector.h>
#include <ml_include.h>
#include <ml_MultiLevelPreconditioner.h>
-
-
-#ifdef DEAL_II_USE_TRILINOS
-
DEAL_II_NAMESPACE_OPEN
namespace TrilinosWrappers
{
- PreconditionAMG::PreconditionAMG ()
+ PreconditionAMG::PreconditionAMG () :
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+ communicator (MPI_COMM_WORLD)
+#endif
{}
ExcMessage ("Drop tolerance must be a non-negative number."));
const unsigned int n_rows = matrix.m();
- const SparsityPattern *sparsity_pattern = &(matrix.get_sparsity_pattern());
// Init Epetra Matrix, avoid
// storing the nonzero elements.