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/mpi.h> 25 #include <deal.II/base/types.h> 26 #include <deal.II/base/utilities.h> 28 #include <deal.II/lac/communication_pattern_base.h> 29 #include <deal.II/lac/vector.h> 30 #include <deal.II/lac/vector_operation.h> 35 DEAL_II_NAMESPACE_OPEN
149 const MPI_Comm communicator_in);
159 const MPI_Comm communicator_in);
170 const IndexSet &read_write_vector_index_set,
220 std::pair<types::global_dof_index, types::global_dof_index>
283 const std::vector<std::pair<unsigned int, unsigned int>> &
291 const std::vector<std::pair<unsigned int, unsigned int>> &
302 const std::vector<std::pair<unsigned int, unsigned int>> &
321 const std::vector<std::pair<unsigned int, unsigned int>> &
376 virtual const MPI_Comm &
387 #ifdef DEAL_II_WITH_MPI 422 template <
typename Number>
425 const unsigned int communication_channel,
429 std::vector<MPI_Request> & requests)
const;
448 template <
typename Number>
451 std::vector<MPI_Request> &requests)
const;
489 template <
typename Number>
493 const unsigned int communication_channel,
496 std::vector<MPI_Request> & requests)
const;
532 template <
typename Number>
539 std::vector<MPI_Request> & requests)
const;
554 <<
"Global index " << arg1
555 <<
" neither owned nor ghost on proc " << arg2 <<
".");
564 <<
"The size of the ghost index array (" << arg1
565 <<
") must either equal the number of ghost in the " 566 <<
"partitioner (" << arg2
567 <<
") or be equal in size to a more comprehensive index" 568 <<
"set which contains " << arg3
569 <<
" elements for this partitioner.");
586 std::pair<types::global_dof_index, types::global_dof_index>
650 std::vector<std::pair<unsigned int, unsigned int>>
696 inline std::pair<types::global_dof_index, types::global_dof_index>
709 Assert(size <= std::numeric_limits<unsigned int>::max(),
711 return static_cast<unsigned int>(
size);
749 static_cast<unsigned int>(
788 inline const std::vector<std::pair<unsigned int, unsigned int>> &
796 inline const std::vector<std::pair<unsigned int, unsigned int>> &
803 inline const std::vector<std::pair<unsigned int, unsigned int>> &
819 inline const std::vector<std::pair<unsigned int, unsigned int>> &
849 inline const MPI_Comm &
857 inline const MPI_Comm &
871 #endif // ifndef DOXYGEN 878 DEAL_II_NAMESPACE_CLOSE
std::vector< std::pair< unsigned int, unsigned int > > import_indices_data
unsigned int n_ghost_indices() const
static const unsigned int invalid_unsigned_int
#define DeclException2(Exception2, type1, type2, outsequence)
static::ExceptionBase & ExcIndexNotPresent(types::global_dof_index arg1, unsigned int arg2)
unsigned int this_mpi_process() const
bool is_ghost_entry(const types::global_dof_index global_index) const
const std::vector< std::pair< unsigned int, unsigned int > > & import_indices() const
virtual const MPI_Comm & get_mpi_communicator() const override
IndexSet ghost_indices_data
types::global_dof_index size() const
types::global_dof_index global_size
const std::vector< std::pair< unsigned int, unsigned int > > & ghost_targets() const
#define AssertIndexRange(index, range)
void import_from_ghosted_array_start(const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< Number > &ghost_array, const ArrayView< Number > &temporary_storage, std::vector< MPI_Request > &requests) const
unsigned int n_ghost_indices_data
void export_to_ghosted_array_start(const unsigned int communication_channel, const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &temporary_storage, const ArrayView< Number > &ghost_array, std::vector< MPI_Request > &requests) const
const MPI_Comm & get_communicator() const
const std::vector< std::pair< unsigned int, unsigned int > > & ghost_indices_within_larger_ghost_set() const
const std::vector< std::pair< unsigned int, unsigned int > > & import_targets() const
const IndexSet & locally_owned_range() const
unsigned long long int global_dof_index
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
void import_from_ghosted_array_finish(const VectorOperation::values vector_operation, const ArrayView< const Number > &temporary_storage, const ArrayView< Number > &locally_owned_storage, const ArrayView< Number > &ghost_array, std::vector< MPI_Request > &requests) const
#define Assert(cond, exc)
std::pair< types::global_dof_index, types::global_dof_index > local_range() const
std::size_t memory_consumption() const
types::global_dof_index local_to_global(const unsigned int local_index) const
std::vector< std::pair< unsigned int, unsigned int > > ghost_indices_subset_data
bool ghost_indices_initialized() const
bool is_globally_compatible(const Partitioner &part) const
IndexSet locally_owned_range_data
unsigned int n_import_indices() const
unsigned int global_to_local(const types::global_dof_index global_index) const
const IndexSet & ghost_indices() const
void export_to_ghosted_array_finish(const ArrayView< Number > &ghost_array, std::vector< MPI_Request > &requests) const
bool is_compatible(const Partitioner &part) const
bool in_local_range(const types::global_dof_index global_index) 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
unsigned int n_mpi_processes() const
std::vector< std::pair< unsigned int, unsigned int > > ghost_targets_data
size_type index_within_set(const size_type global_index) const
bool is_element(const size_type index) const
static::ExceptionBase & ExcNotImplemented()
#define DeclException3(Exception3, type1, type2, type3, outsequence)
size_type nth_index_in_set(const unsigned int local_index) 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
static::ExceptionBase & ExcGhostIndexArrayHasWrongSize(unsigned int arg1, unsigned int arg2, unsigned int arg3)
unsigned int local_size() const
unsigned int n_ghost_indices_in_larger_set
void set_ghost_indices(const IndexSet &ghost_indices, const IndexSet &larger_ghost_index_set=IndexSet())