示例#1
0
 friend gf_mesh mpi_gather(gf_mesh m, mpi::communicator c, int root) {
  return gf_mesh{m.domain(), m.size(), m.positive_only()};
 }
示例#2
0
 /// Scatter a mesh over the communicator c
 friend gf_mesh mpi_scatter(gf_mesh m, mpi::communicator c, int root) {
  auto m2 = gf_mesh{m.domain(), m.size(), m.positive_only()};
  std::tie(m2._first_index_window, m2._last_index_window) = mpi::slice_range(m2._first_index, m2._last_index, c.size(), c.rank());
  return m2;
 }