Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
mpi_noncontiguous_partitioner.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2020 - 2023 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_mpi_noncontiguous_partitioner_h
17#define dealii_mpi_noncontiguous_partitioner_h
18
19#include <deal.II/base/config.h>
20
24
26
27
29
30namespace Utilities
31{
32 namespace MPI
33 {
49 {
50 public:
56
62 NoncontiguousPartitioner(const IndexSet &indexset_locally_owned,
63 const IndexSet &indexset_ghost,
65
76 const std::vector<types::global_dof_index> &indices_locally_owned,
77 const std::vector<types::global_dof_index> &indices_ghost,
79
96 template <typename Number>
97 void
99 const ArrayView<const Number> &locally_owned_array,
100 const ArrayView<Number> & ghost_array) const;
101
116 template <typename Number>
117 void
119 const unsigned int communication_channel,
120 const ArrayView<const Number> &locally_owned_array,
121 const ArrayView<Number> & temporary_storage,
122 const ArrayView<Number> & ghost_array,
123 std::vector<MPI_Request> & requests) const;
124
141 template <typename Number>
142 void
144 const unsigned int communication_channel,
145 const ArrayView<const Number> &locally_owned_array,
146 const ArrayView<Number> & temporary_storage,
147 std::vector<MPI_Request> & requests) const;
148
163 template <typename Number>
164 void
166 const ArrayView<const Number> &temporary_storage,
167 const ArrayView<Number> & ghost_array,
168 std::vector<MPI_Request> & requests) const;
169
174 std::pair<unsigned int, unsigned int>
175 n_targets() const;
176
182 unsigned int
184
190
195 get_mpi_communicator() const override;
196
197 void
198 reinit(const IndexSet &locally_owned_indices,
199 const IndexSet &ghost_indices,
200 const MPI_Comm communicator) override;
201
207 void
208 reinit(const std::vector<types::global_dof_index> &locally_owned_indices,
209 const std::vector<types::global_dof_index> &ghost_indices,
210 const MPI_Comm communicator);
211
212 private:
217
221 std::vector<unsigned int> send_ranks;
222
228 std::vector<types::global_dof_index> send_ptr;
229
236 std::vector<types::global_dof_index> send_indices;
237
241 std::vector<unsigned int> recv_ranks;
242
248 std::vector<types::global_dof_index> recv_ptr;
249
256 std::vector<types::global_dof_index> recv_indices;
257
267 mutable std::vector<std::uint8_t> buffers;
268
274 mutable std::vector<MPI_Request> requests;
275 };
276
277 } // namespace MPI
278} // namespace Utilities
279
281
282#endif
void reinit(const IndexSet &locally_owned_indices, const IndexSet &ghost_indices, const MPI_Comm communicator) override
void export_to_ghosted_array_start(const unsigned int communication_channel, const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &temporary_storage, std::vector< MPI_Request > &requests) const
std::vector< types::global_dof_index > recv_ptr
void export_to_ghosted_array(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
std::vector< types::global_dof_index > send_ptr
void export_to_ghosted_array_finish(const ArrayView< const Number > &temporary_storage, const ArrayView< Number > &ghost_array, std::vector< MPI_Request > &requests) const
std::vector< types::global_dof_index > recv_indices
std::pair< unsigned int, unsigned int > n_targets() const
void export_to_ghosted_array(const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &ghost_array) const
std::vector< types::global_dof_index > send_indices
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473