11 #include <dolfinx/common/MPI.h>
12 #include <dolfinx/graph/AdjacencyList.h>
45 MPI_Comm neighbor_comm,
46 const std::vector<std::vector<std::int32_t>>& marked_for_update,
47 std::vector<std::int8_t>& marked_edges,
const common::IndexMap& map);
61 std::tuple<std::map<std::int32_t, std::int64_t>, std::vector<double>,
62 std::array<std::size_t, 2>>
64 const graph::AdjacencyList<int>& shared_edges,
65 const mesh::Mesh& mesh,
66 const std::vector<std::int8_t>& marked_edges);
77 mesh::Mesh
partition(
const mesh::Mesh& old_mesh,
78 const graph::AdjacencyList<std::int64_t>& cell_topology,
79 std::span<const double> new_coords,
80 std::array<std::size_t, 2> xshape,
bool redistribute,
95 std::vector<std::int64_t>
adjust_indices(
const common::IndexMap& map,
107 mesh::MeshTags<std::int32_t>
109 std::shared_ptr<const mesh::Mesh> refined_mesh,
110 const std::vector<std::int32_t>& cell,
111 const std::vector<std::int8_t>& facet);
122 mesh::MeshTags<std::int32_t>
124 std::shared_ptr<const mesh::Mesh> refined_mesh,
125 const std::vector<std::int32_t>& parent_cell);
Miscellaneous classes, functions and types.
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:30
GhostMode
Enum for different partitioning ghost modes.
Definition: utils.h:29
Mesh refinement algorithms.
mesh::Mesh partition(const mesh::Mesh &old_mesh, const graph::AdjacencyList< std::int64_t > &cell_topology, std::span< const double > new_coords, std::array< std::size_t, 2 > xshape, bool redistribute, mesh::GhostMode ghost_mode)
Use vertex and topology data to partition new mesh across processes.
Definition: utils.cpp:297
std::tuple< std::map< std::int32_t, std::int64_t >, std::vector< double >, std::array< std::size_t, 2 > > create_new_vertices(MPI_Comm neighbor_comm, const graph::AdjacencyList< int > &shared_edges, const mesh::Mesh &mesh, const std::vector< std::int8_t > &marked_edges)
Add new vertex for each marked edge, and create new_vertex_coordinates and global_edge->new_vertex ma...
Definition: utils.cpp:178
mesh::MeshTags< std::int32_t > transfer_facet_meshtag(const mesh::MeshTags< std::int32_t > &meshtag, std::shared_ptr< const mesh::Mesh > refined_mesh, const std::vector< std::int32_t > &cell, const std::vector< std::int8_t > &facet)
Transfer facet MeshTags from coarse mesh to refined mesh.
Definition: utils.cpp:428
std::vector< std::int64_t > adjust_indices(const common::IndexMap &map, std::int32_t n)
Add indices to account for extra n values on this process.
Definition: utils.cpp:375
mesh::MeshTags< std::int32_t > transfer_cell_meshtag(const mesh::MeshTags< std::int32_t > &parent_meshtag, std::shared_ptr< const mesh::Mesh > refined_mesh, const std::vector< std::int32_t > &parent_cell)
Transfer cell MeshTags from coarse mesh to refined mesh.
Definition: utils.cpp:553
void update_logical_edgefunction(MPI_Comm neighbor_comm, const std::vector< std::vector< std::int32_t >> &marked_for_update, std::vector< std::int8_t > &marked_edges, const common::IndexMap &map)
Communicate edge markers between processes that share edges.
Definition: utils.cpp:120