hyper.deal
Loading...
Searching...
No Matches
mpi.h
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2020 by the hyper.deal authors
4//
5// This file is part of the hyper.deal library.
6//
7// The hyper.deal 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 3.0 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 hyper.deal.
13//
14// ---------------------------------------------------------------------
15
16#ifndef HYPERDEAL_MPI
17#define HYPERDEAL_MPI
18
19#include <hyper.deal/base/config.h>
20
21#include <deal.II/base/mpi.h>
22
23namespace hyperdeal
24{
25 namespace mpi
26 {
31 MPI_Comm
32 create_sm(const MPI_Comm &comm);
33
40 unsigned int
41 n_procs_of_sm(const MPI_Comm &comm, const MPI_Comm &comm_sm);
42
48 std::vector<unsigned int>
49 procs_of_sm(const MPI_Comm &comm, const MPI_Comm &comm_shared);
50
59 void
60 print_sm(const MPI_Comm &comm, const MPI_Comm &comm_sm);
61
70 void
71 print_new_order(const MPI_Comm &comm_old, const MPI_Comm &comm_new);
72
82 MPI_Comm
83 create_rectangular_comm(const MPI_Comm & comm,
84 const unsigned int size_x,
85 const unsigned int size_v);
86
95 MPI_Comm
96 create_z_order_comm(const MPI_Comm & comm,
97 const std::pair<unsigned int, unsigned int> procs,
98 const std::pair<unsigned int, unsigned int> group_size);
99
110 MPI_Comm
111 create_row_comm(const MPI_Comm & comm,
112 const unsigned int size1,
113 const unsigned int size2);
114
121 MPI_Comm
122 create_column_comm(const MPI_Comm & comm,
123 const unsigned int size1,
124 const unsigned int size2);
125
126 } // namespace mpi
127} // namespace hyperdeal
128
129#endif