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