16 #ifndef dealii_partitioner_h 17 #define dealii_partitioner_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/array_view.h> 22 #include <deal.II/base/index_set.h> 23 #include <deal.II/base/memory_consumption.h> 24 #include <deal.II/base/memory_space.h> 25 #include <deal.II/base/mpi.h> 26 #include <deal.II/base/types.h> 27 #include <deal.II/base/utilities.h> 29 #include <deal.II/lac/communication_pattern_base.h> 30 #include <deal.II/lac/vector.h> 31 #include <deal.II/lac/vector_operation.h> 36 DEAL_II_NAMESPACE_OPEN
150 const MPI_Comm communicator_in);
160 const MPI_Comm communicator_in);
171 const IndexSet &read_write_vector_index_set,
221 std::pair<types::global_dof_index, types::global_dof_index>
284 const std::vector<std::pair<unsigned int, unsigned int>> &
292 const std::vector<std::pair<unsigned int, unsigned int>> &
303 const std::vector<std::pair<unsigned int, unsigned int>> &
322 const std::vector<std::pair<unsigned int, unsigned int>> &
377 virtual const MPI_Comm &
388 #ifdef DEAL_II_WITH_MPI 423 template <
typename Number,
typename MemorySpaceType = MemorySpace::Host>
426 const unsigned int communication_channel,
430 std::vector<MPI_Request> & requests)
const;
449 template <
typename Number,
typename MemorySpaceType = MemorySpace::Host>
453 std::vector<MPI_Request> & requests)
const;
491 template <
typename Number,
typename MemorySpaceType = MemorySpace::Host>
495 const unsigned int communication_channel,
498 std::vector<MPI_Request> & requests)
const;
534 template <
typename Number,
typename MemorySpaceType = MemorySpace::Host>
541 std::vector<MPI_Request> & requests)
const;
556 <<
"Global index " << arg1
557 <<
" neither owned nor ghost on proc " << arg2 <<
".");
566 <<
"The size of the ghost index array (" << arg1
567 <<
") must either equal the number of ghost in the " 568 <<
"partitioner (" << arg2
569 <<
") or be equal in size to a more comprehensive index" 570 <<
"set which contains " << arg3
571 <<
" elements for this partitioner.");
595 std::pair<types::global_dof_index, types::global_dof_index>
634 std::pair<std::unique_ptr<unsigned int[], void (*)(unsigned int *)>,
673 std::vector<std::pair<unsigned int, unsigned int>>
719 inline std::pair<types::global_dof_index, types::global_dof_index>
732 Assert(
size <= std::numeric_limits<unsigned int>::max(),
734 return static_cast<unsigned int>(
size);
772 static_cast<unsigned int>(
811 inline const std::vector<std::pair<unsigned int, unsigned int>> &
819 inline const std::vector<std::pair<unsigned int, unsigned int>> &
826 inline const std::vector<std::pair<unsigned int, unsigned int>> &
842 inline const std::vector<std::pair<unsigned int, unsigned int>> &
872 inline const MPI_Comm &
880 inline const MPI_Comm &
894 #endif // ifndef DOXYGEN 901 DEAL_II_NAMESPACE_CLOSE
std::vector< std::pair< unsigned int, unsigned int > > import_indices_data
const IndexSet & locally_owned_range() const
bool is_globally_compatible(const Partitioner &part) const
static const unsigned int invalid_unsigned_int
#define DeclException2(Exception2, type1, type2, outsequence)
bool is_compatible(const Partitioner &part) const
static ::ExceptionBase & ExcIndexNotPresent(types::global_dof_index arg1, unsigned int arg2)
unsigned int local_size() const
const std::vector< std::pair< unsigned int, unsigned int > > & import_targets() const
size_type nth_index_in_set(const unsigned int local_index) const
void import_from_ghosted_array_finish(const VectorOperation::values vector_operation, const ArrayView< const Number, MemorySpaceType > &temporary_storage, const ArrayView< Number, MemorySpaceType > &locally_owned_storage, const ArrayView< Number, MemorySpaceType > &ghost_array, std::vector< MPI_Request > &requests) const
virtual const MPI_Comm & get_mpi_communicator() const override
IndexSet ghost_indices_data
const std::vector< std::pair< unsigned int, unsigned int > > & import_indices() const
void import_from_ghosted_array_start(const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< Number, MemorySpaceType > &ghost_array, const ArrayView< Number, MemorySpaceType > &temporary_storage, std::vector< MPI_Request > &requests) const
types::global_dof_index global_size
types::global_dof_index local_to_global(const unsigned int local_index) const
#define AssertIndexRange(index, range)
unsigned int n_ghost_indices_data
const std::vector< std::pair< unsigned int, unsigned int > > & ghost_indices_within_larger_ghost_set() const
unsigned int global_to_local(const types::global_dof_index global_index) const
bool in_local_range(const types::global_dof_index global_index) const
void set_owned_indices(const IndexSet &locally_owned_indices)
std::vector< unsigned int > ghost_indices_subset_chunks_by_rank_data
std::vector< unsigned int > import_indices_chunks_by_rank_data
bool ghost_indices_initialized() const
unsigned int this_mpi_process() const
const IndexSet & ghost_indices() const
const MPI_Comm & get_communicator() const
unsigned int n_ghost_indices() const
std::pair< types::global_dof_index, types::global_dof_index > local_range() const
#define Assert(cond, exc)
size_type index_within_set(const size_type global_index) const
unsigned int n_mpi_processes() const
std::vector< std::pair< unsigned int, unsigned int > > ghost_indices_subset_data
const std::vector< std::pair< unsigned int, unsigned int > > & ghost_targets() const
IndexSet locally_owned_range_data
unsigned int global_dof_index
types::global_dof_index size() const
std::size_t memory_consumption() const
void initialize_import_indices_plain_dev() const
std::vector< std::pair< unsigned int, unsigned int > > import_targets_data
std::pair< types::global_dof_index, types::global_dof_index > local_range_data
std::vector< std::pair< unsigned int, unsigned int > > ghost_targets_data
void export_to_ghosted_array_start(const unsigned int communication_channel, const ArrayView< const Number, MemorySpaceType > &locally_owned_array, const ArrayView< Number, MemorySpaceType > &temporary_storage, const ArrayView< Number, MemorySpaceType > &ghost_array, std::vector< MPI_Request > &requests) const
void export_to_ghosted_array_finish(const ArrayView< Number, MemorySpaceType > &ghost_array, std::vector< MPI_Request > &requests) const
static ::ExceptionBase & ExcNotImplemented()
TrilinosWrappers::types::int_type global_index(const Epetra_BlockMap &map, const ::types::global_dof_index i)
bool is_element(const size_type index) const
#define DeclException3(Exception3, type1, type2, type3, outsequence)
std::vector< std::pair< std::unique_ptr< unsigned int[], void(*)(unsigned int *)>, unsigned int > > import_indices_plain_dev
unsigned int n_import_indices() const
unsigned int n_import_indices_data
virtual void reinit(const IndexSet &vector_space_vector_index_set, const IndexSet &read_write_vector_index_set, const MPI_Comm &communicator) override
bool is_ghost_entry(const types::global_dof_index global_index) const
static ::ExceptionBase & ExcGhostIndexArrayHasWrongSize(unsigned int arg1, unsigned int arg2, unsigned int arg3)
unsigned int n_ghost_indices_in_larger_set
void set_ghost_indices(const IndexSet &ghost_indices, const IndexSet &larger_ghost_index_set=IndexSet())