9 #include <dolfinx/common/MPI.h>
10 #include <dolfinx/graph/AdjacencyList.h>
11 #include <dolfinx/graph/partition.h>
13 #include <xtl/xspan.hpp>
19 class ElementDofLayout;
37 graph::AdjacencyList<std::int64_t>
38 extract_topology(const CellType& cell_type, const fem::ElementDofLayout& layout,
39 const graph::AdjacencyList<std::int64_t>& cells);
42 std::vector<double>
h(const Mesh& mesh,
43 const xtl::span<const std::int32_t>& entities, int dim);
46 xt::xtensor<double, 2>
48 const xtl::span<const std::int32_t>& entities);
51 xt::xtensor<double, 2>
midpoints(const mesh::Mesh& mesh, int dim,
52 const xtl::span<const std::int32_t>& entities);
65 const mesh::Mesh& mesh, int dim,
66 const std::function<xt::xtensor<bool, 1>(const xt::xtensor<double, 2>&)>&
90 const mesh::Mesh& mesh, int dim,
91 const std::function<xt::xtensor<bool, 1>(const xt::xtensor<double, 2>&)>&
105 xt::xtensor<std::int32_t, 2>
107 const xtl::span<const std::int32_t>& entity_list,
132 graph::AdjacencyList<std::int32_t>
134 const graph::AdjacencyList<std::int64_t>& cells,
135 mesh::GhostMode ghost_mode);
139 graph::AdjacencyList<std::int32_t>
141 const graph::AdjacencyList<std::int64_t>& cells,
142 mesh::GhostMode ghost_mode,
143 const graph::partition_fn& partfn);
std::vector< double > h(const Mesh &mesh, const xtl::span< const std::int32_t > &entities, int dim)
Compute greatest distance between any two vertices.
Definition: utils.cpp:60
graph::AdjacencyList< std::int32_t > partition_cells_graph(MPI_Comm comm, int n, int tdim, const graph::AdjacencyList< std::int64_t > &cells, mesh::GhostMode ghost_mode)
Compute destination rank for mesh cells in this rank by applying the default graph partitioner to the...
Definition: utils.cpp:497
xt::xtensor< double, 2 > midpoints(const mesh::Mesh &mesh, int dim, const xtl::span< const std::int32_t > &entities)
Compute midpoints or mesh entities of a given dimension.
Definition: utils.cpp:186
std::vector< std::int32_t > locate_entities(const mesh::Mesh &mesh, int dim, const std::function< xt::xtensor< bool, 1 >(const xt::xtensor< double, 2 > &)> &marker)
Compute indices of all mesh entities that evaluate to true for the provided geometric marking functio...
Definition: utils.cpp:206
xt::xtensor< double, 2 > cell_normals(const Mesh &mesh, int dim, const xtl::span< const std::int32_t > &entities)
Compute normal to given cell (viewed as embedded in 3D)
Definition: utils.cpp:102
graph::AdjacencyList< std::int64_t > extract_topology(const CellType &cell_type, const fem::ElementDofLayout &layout, const graph::AdjacencyList< std::int64_t > &cells)
Extract topology from cell data, i.e. extract cell vertices.
Definition: utils.cpp:33
CellType
Cell type identifier.
Definition: cell_types.h:22
std::vector< std::int32_t > locate_entities_boundary(const mesh::Mesh &mesh, int dim, const std::function< xt::xtensor< bool, 1 >(const xt::xtensor< double, 2 > &)> &marker)
Compute indices of all mesh entities that are attached to an owned boundary facet and evaluate to tru...
Definition: utils.cpp:271
xt::xtensor< std::int32_t, 2 > entities_to_geometry(const mesh::Mesh &mesh, int dim, const xtl::span< const std::int32_t > &entity_list, bool orient)
Compute the indices the geometry data for the vertices of the given mesh entities.
Definition: utils.cpp:382
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:47
std::vector< std::int32_t > exterior_facet_indices(const Mesh &mesh)
Compute the indices (local) of all exterior facets. An exterior facet (co-dimension 1) is one that is...
Definition: utils.cpp:459