Reference documentation for deal.II version 9.6.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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2020 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_mpi_noncontiguous_partitioner_h
16#define dealii_mpi_noncontiguous_partitioner_h
17
18#include <deal.II/base/config.h>
19
23
24
25
27
28namespace Utilities
29{
30 namespace MPI
31 {
47 {
48 public:
54
60 NoncontiguousPartitioner(const IndexSet &indexset_locally_owned,
61 const IndexSet &indexset_ghost,
63
74 const std::vector<types::global_dof_index> &indices_locally_owned,
75 const std::vector<types::global_dof_index> &indices_ghost,
77
94 template <typename Number>
95 void
97 const ArrayView<const Number> &locally_owned_array,
98 const ArrayView<Number> &ghost_array) const;
99
114 template <typename Number>
115 void
117 const unsigned int communication_channel,
118 const ArrayView<const Number> &locally_owned_array,
119 const ArrayView<Number> &temporary_storage,
120 const ArrayView<Number> &ghost_array,
121 std::vector<MPI_Request> &requests) const;
122
139 template <typename Number>
140 void
142 const unsigned int communication_channel,
143 const ArrayView<const Number> &locally_owned_array,
144 const ArrayView<Number> &temporary_storage,
145 std::vector<MPI_Request> &requests) const;
146
161 template <typename Number>
162 void
164 const ArrayView<const Number> &temporary_storage,
165 const ArrayView<Number> &ghost_array,
166 std::vector<MPI_Request> &requests) const;
167
176 template <typename Number>
177 void
179 const VectorOperation::values vector_operation,
180 const ArrayView<Number> &ghost_array,
181 const ArrayView<Number> &locally_owned_storage) const;
182
189 template <typename Number>
190 void
192 const unsigned int communication_channel,
193 const ArrayView<Number> &ghost_array,
194 const ArrayView<Number> &temporary_storage,
195 const ArrayView<Number> &locally_owned_storage,
196 std::vector<MPI_Request> &requests) const;
197
202 template <typename Number>
203 void
205 const VectorOperation::values vector_operation,
206 const unsigned int communication_channel,
207 const ArrayView<Number> &ghost_array,
208 const ArrayView<Number> &temporary_storage,
209 std::vector<MPI_Request> &requests) const;
210
217 template <typename Number>
218 void
220 const VectorOperation::values vector_operation,
221 const ArrayView<const Number> &temporary_storage,
222 const ArrayView<Number> &locally_owned_storage,
223 std::vector<MPI_Request> &requests) const;
224
229 std::pair<unsigned int, unsigned int>
230 n_targets() const;
231
237 unsigned int
239
245
250 get_mpi_communicator() const override;
251
252 void
253 reinit(const IndexSet &locally_owned_indices,
254 const IndexSet &ghost_indices,
255 const MPI_Comm communicator) override;
256
262 void
263 reinit(const std::vector<types::global_dof_index> &locally_owned_indices,
264 const std::vector<types::global_dof_index> &ghost_indices,
265 const MPI_Comm communicator);
266
267 private:
272
276 std::vector<unsigned int> send_ranks;
277
283 std::vector<types::global_dof_index> send_ptr;
284
291 std::vector<types::global_dof_index> send_indices;
292
296 std::vector<unsigned int> recv_ranks;
297
303 std::vector<types::global_dof_index> recv_ptr;
304
311 std::vector<types::global_dof_index> recv_indices;
312
322 mutable std::vector<std::uint8_t> buffers;
323
329 mutable std::vector<MPI_Request> requests;
330 };
331
332 } // namespace MPI
333} // namespace Utilities
334
336
337#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
void import_from_ghosted_array(const VectorOperation::values vector_operation, const ArrayView< Number > &ghost_array, const ArrayView< Number > &locally_owned_storage) const
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
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 import_from_ghosted_array_finish(const VectorOperation::values vector_operation, const ArrayView< const Number > &temporary_storage, const ArrayView< Number > &locally_owned_storage, std::vector< MPI_Request > &requests) const
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
void import_from_ghosted_array(const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< Number > &ghost_array, const ArrayView< Number > &temporary_storage, const ArrayView< Number > &locally_owned_storage, std::vector< MPI_Request > &requests) const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504