# endif
#endif
+#ifdef DEAL_II_WITH_PETSC
+# include <petscis.h>
+#endif
+
DEAL_II_NAMESPACE_OPEN
/**
# endif
#endif
+#ifdef DEAL_II_WITH_PETSC
+ IS
+ make_petsc_is(const MPI_Comm &communicator = MPI_COMM_WORLD) const;
+#endif
+
/**
* Determine an estimate for the memory consumption (in bytes) of this
#include <deal.II/base/memory_consumption.h>
#include <deal.II/base/mpi.h>
+#include <deal.II/lac/exceptions.h>
+
#include <vector>
#ifdef DEAL_II_WITH_TRILINOS
#endif
+#ifdef DEAL_II_WITH_PETSC
+IS
+IndexSet::make_petsc_is(const MPI_Comm &communicator) const
+{
+ std::vector<size_type> indices;
+ fill_index_vector(indices);
+
+ PetscInt n = indices.size();
+ std::vector<PetscInt> pindices(indices.begin(), indices.end());
+
+ IS is;
+ PetscErrorCode ierr =
+ ISCreateGeneral(communicator, n, pindices.data(), PETSC_COPY_VALUES, &is);
+ AssertThrow(ierr == 0, ExcPETScError(ierr));
+
+ return is;
+}
+#endif
+
+
bool
IndexSet::is_ascending_and_one_to_one(const MPI_Comm &communicator) const