10 #include <dolfinx/common/MPI.h>
36 std::pair<MPI_Comm, std::map<std::int32_t, std::vector<int>>>
46 const MPI_Comm& neighbor_comm,
47 const std::vector<std::vector<std::int32_t>>& marked_for_update,
48 std::vector<bool>& marked_edges,
const common::IndexMap& map_e);
58 std::pair<std::map<std::int32_t, std::int64_t>, xt::xtensor<double, 2>>
60 const MPI_Comm& neighbor_comm,
61 const std::map<std::int32_t, std::vector<std::int32_t>>& shared_edges,
62 const mesh::Mesh& mesh,
const std::vector<bool>& marked_edges);
72 mesh::Mesh
partition(
const mesh::Mesh& old_mesh,
73 const graph::AdjacencyList<std::int64_t>& cell_topology,
74 const xt::xtensor<double, 2>& new_vertex_coordinates,
85 std::vector<std::int64_t>
86 adjust_indices(
const std::shared_ptr<const common::IndexMap>& index_map,
Miscellaneous classes, functions and types.
Mesh data structures and algorithms on meshes.
Definition: DirichletBC.h:20
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:44
Mesh refinement algorithms.
mesh::Mesh partition(const mesh::Mesh &old_mesh, const graph::AdjacencyList< std::int64_t > &cell_topology, const xt::xtensor< double, 2 > &new_vertex_coordinates, bool redistribute, mesh::GhostMode ghost_mode)
Use vertex and topology data to partition new mesh across processes.
Definition: utils.cpp:316
std::vector< std::int64_t > adjust_indices(const std::shared_ptr< const common::IndexMap > &index_map, std::int32_t n)
Adjust indices to account for extra n values on each process This is a utility to help add new topolo...
Definition: utils.cpp:287
std::pair< MPI_Comm, std::map< std::int32_t, std::vector< int > > > compute_edge_sharing(const mesh::Mesh &mesh)
Compute the sharing of edges between processes. The resulting MPI_Comm is over the neighborhood of sh...
Definition: utils.cpp:117
std::pair< std::map< std::int32_t, std::int64_t >, xt::xtensor< double, 2 > > create_new_vertices(const MPI_Comm &neighbor_comm, const std::map< std::int32_t, std::vector< std::int32_t >> &shared_edges, const mesh::Mesh &mesh, const std::vector< bool > &marked_edges)
Add new vertex for each marked edge, and create new_vertex_coordinates and global_edge->new_vertex ma...
Definition: utils.cpp:198
void update_logical_edgefunction(const MPI_Comm &neighbor_comm, const std::vector< std::vector< std::int32_t >> &marked_for_update, std::vector< bool > &marked_edges, const common::IndexMap &map_e)
Transfer marked edges between processes.
Definition: utils.cpp:163