@@ -227,20 +227,23 @@ using CellReorderFunction = std::function<std::vector<std::int32_t>(
227227// / TODO: offload to cpp?
228228inline auto
229229create_boundary_vertices_fn (const CellReorderFunction& reorder_fn,
230- std::optional<std::int32_t > max_facet_to_cell_links
231- = 2 )
230+ std::optional<std::int32_t > max_facet_to_cell_links)
232231{
233- // / brief Function that computes the process boundary vertices of a mesh
234- // / during creation.
235- // / param[in] celltypes List of celltypes in mesh.
236- // / param[in] doflayouts List of DOF layouts in mesh.
237- // / param[in] ghost_owners List of ghost owner per cell per celltype.
238- // / param[out] cells List of cells per celltpye. Reorderd during call.
239- // / param[out] cells_v List of vertices (no higher order nodes) of cell per
240- // / celltype. Reordered during call.
241- // / param[out] original_idx Contains the permutation applied to the cells per
242- // / celltype.
243- // / return Boundary vertices (for all cell types).
232+ // / @cond
233+ // / @brief Function that computes the process boundary vertices of a
234+ // / mesh during creation.
235+ // /
236+ // / @param[in] celltypes List of celltypes in mesh.
237+ // / @param[in] doflayouts List of DOF layouts in mesh.
238+ // / @param[in] ghost_owners List of ghost owner per cell per celltype.
239+ // / @param[out] cells List of cells per celltpye. Reorderd during
240+ // / call.
241+ // / @param[out] cells_v List of vertices (no higher order nodes) of
242+ // / cell per celltype. Reordered during call.
243+ // / @param[out] original_idx Contains the permutation applied to the
244+ // / cells per celltype.
245+ // / @return Boundary vertices (for all cell types).
246+ // / @endcond
244247 return [&, max_facet_to_cell_links](
245248 const std::vector<CellType>& celltypes,
246249 const std::vector<fem::ElementDofLayout>& doflayouts,
@@ -955,17 +958,32 @@ entities_to_geometry(const Mesh<T>& mesh, int dim,
955958// / @brief Create a function that computes destination rank for mesh
956959// / cells on this rank by applying the default graph partitioner to the
957960// / dual graph of the mesh.
961+ // /
958962// / @param[in] ghost_mode ghost mode of the created mesh, defaults to none
959963// / @param[in] partfn Partitioning function for distributing cells
960964// / across MPI ranks.
961965// / @param[in] max_facet_to_cell_links Bound on the number of cells a
962- // / facet needs to be connected to to be considered *matched* (not on boundary
963- // / for non-branching meshes).
966+ // / facet needs to be connected to to be considered *matched* (not on
967+ // / boundary for non-branching meshes).
964968// / @return Function that computes the destination ranks for each cell.
965- CellPartitionFunction create_cell_partitioner (
966- mesh::GhostMode ghost_mode = mesh::GhostMode::none,
967- const graph::partition_fn& partfn = &graph::partition_graph,
968- std::optional<std::int32_t > max_facet_to_cell_links = 2 );
969+ CellPartitionFunction
970+ create_cell_partitioner (mesh::GhostMode ghost_mode,
971+ const graph::partition_fn& partfn,
972+ std::optional<std::int32_t > max_facet_to_cell_links);
973+
974+ // / @brief Create a function that computes destination rank for mesh
975+ // / cells on this rank by applying the default graph partitioner to the
976+ // / dual graph of the mesh.
977+ // /
978+ // / @param[in] ghost_mode ghost mode of the created mesh, defaults to none
979+ // / @param[in] max_facet_to_cell_links Bound on the number of cells a
980+ // / facet needs to be connected to to be considered *matched* (not on
981+ // / boundary for non-branching meshes).
982+ // / @return Function that computes the destination ranks for each cell.
983+ CellPartitionFunction
984+ create_cell_partitioner (mesh::GhostMode ghost_mode,
985+ std::optional<std::int32_t > max_facet_to_cell_links
986+ = 2 );
969987
970988// / @brief Compute incident entities.
971989// / @param[in] topology The topology.
@@ -1244,7 +1262,7 @@ Mesh<typename std::remove_reference_t<typename U::value_type>> create_mesh(
12441262 typename std::remove_reference_t <typename U::value_type>>& element,
12451263 MPI_Comm commg, const U& x, std::array<std::size_t , 2 > xshape,
12461264 const CellPartitionFunction& partitioner,
1247- std::optional<std::int32_t > max_facet_to_cell_links = 2 ,
1265+ std::optional<std::int32_t > max_facet_to_cell_links,
12481266 const CellReorderFunction& reorder_fn = graph::reorder_gps)
12491267{
12501268 return create_mesh (comm, commt, std::vector{cells}, std::vector{element},
@@ -1287,9 +1305,10 @@ create_mesh(MPI_Comm comm, std::span<const std::int64_t> cells,
12871305 }
12881306 else
12891307 {
1290- return create_mesh (comm, comm, std::vector{cells}, std::vector{elements},
1291- comm, x, xshape, create_cell_partitioner (ghost_mode),
1292- max_facet_to_cell_links);
1308+ return create_mesh (
1309+ comm, comm, std::vector{cells}, std::vector{elements}, comm, x, xshape,
1310+ create_cell_partitioner (ghost_mode, max_facet_to_cell_links),
1311+ max_facet_to_cell_links);
12931312 }
12941313}
12951314
0 commit comments