deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\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
process_grid.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2017 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_process_grid_h
14#define dealii_process_grid_h
15
16#include <deal.II/base/config.h>
17
19#include <deal.II/base/mpi.h>
20
22
23#ifdef DEAL_II_WITH_SCALAPACK
24// Forward declaration of class ScaLAPACKMatrix for ProcessGrid
25# ifndef DOXYGEN
26template <typename NumberType>
27class ScaLAPACKMatrix;
28# endif
29
30namespace Utilities
31{
32 namespace MPI
33 {
57 {
58 public:
59 // Declare class ScaLAPACK as friend to provide access to private members.
60 template <typename NumberType>
61 friend class ::ScaLAPACKMatrix;
62
70 const unsigned int n_rows,
71 const unsigned int n_columns);
72
91 const unsigned int n_rows_matrix,
92 const unsigned int n_columns_matrix,
93 const unsigned int row_block_size,
94 const unsigned int column_block_size);
95
100
104 unsigned int
106
110 unsigned int
112
118 int
120
126 int
128
134 template <typename NumberType>
135 void
136 send_to_inactive(NumberType *value, const int count = 1) const;
137
141 bool
143
144 private:
150 const std::pair<unsigned int, unsigned int> &grid_dimensions);
151
156
162
168
172 const unsigned int this_mpi_process;
173
177 const unsigned int n_mpi_processes;
178
183
188
195
202
207 };
208
209 /*--------------------- Inline functions --------------------------------*/
210
211# ifndef DOXYGEN
212
213 inline unsigned int
215 {
216 return n_process_rows;
217 }
218
219
220
221 inline unsigned int
223 {
224 return n_process_columns;
225 }
226
227
228
229 inline int
231 {
232 return this_process_row;
233 }
234
235
236
237 inline int
239 {
240 return this_process_column;
241 }
242
243
244
245 inline bool
247 {
249 }
250
251
252# endif // ifndef DOXYGEN
253
254 } // end of namespace MPI
255
256} // end of namespace Utilities
257
258#endif // DEAL_II_WITH_SCALAPACK
259
261
262#endif
MPI_Comm mpi_communicator_inactive_with_root
void send_to_inactive(NumberType *value, const int count=1) const
unsigned int get_process_grid_rows() const
const unsigned int n_mpi_processes
unsigned int get_process_grid_columns() const
int get_this_process_column() const
const unsigned int this_mpi_process
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39