| 21 | namespace |
| 22 | { |
| 23 | common::IndexMap create_index_map(MPI_Comm comm, int size_local, int num_ghosts) |
| 24 | { |
| 25 | const int mpi_size = dolfinx::MPI::size(comm); |
| 26 | const int mpi_rank = dolfinx::MPI::rank(comm); |
| 27 | |
| 28 | // Create some ghost entries on next process |
| 29 | std::vector<std::int64_t> ghosts(num_ghosts); |
| 30 | for (int i = 0; i < num_ghosts; ++i) |
| 31 | ghosts[i] = (mpi_rank + 1) % mpi_size * size_local + i; |
| 32 | |
| 33 | std::vector<int> global_ghost_owner(ghosts.size(), (mpi_rank + 1) % mpi_size); |
| 34 | |
| 35 | // Create an IndexMap |
| 36 | return common::IndexMap(MPI_COMM_WORLD, size_local, ghosts, |
| 37 | global_ghost_owner); |
| 38 | } |
| 39 | |
| 40 | void test_scatter_fwd(int n) |
| 41 | { |
no test coverage detected