9 #include <dolfinx/graph/AdjacencyList.h>
10 #include <dolfinx/graph/partition.h>
14 #include <xtensor/xtensor.hpp>
18 class ElementDofLayout;
51 = std::function<dolfinx::graph::AdjacencyList<std::int32_t>(
52 MPI_Comm comm,
int nparts,
int tdim,
77 std::vector<double>
h(
const Mesh& mesh,
78 const std::span<const std::int32_t>& entities,
int dim);
84 const std::span<const std::int32_t>& entities);
91 const std::span<const std::int32_t>& entities);
104 const Mesh& mesh,
int dim,
105 const std::function<xt::xtensor<bool, 1>(
const xt::xtensor<double, 2>&)>&
129 const Mesh& mesh,
int dim,
130 const std::function<xt::xtensor<bool, 1>(
const xt::xtensor<double, 2>&)>&
149 std::vector<std::int32_t>
151 const std::span<const std::int32_t>& entities,
181 std::vector<std::int32_t>
183 const std::span<const std::int32_t>& entities,
int d0,
The class represents the degree-of-freedom (dofs) for an element. Dofs are associated with a mesh ent...
Definition: ElementDofLayout.h:31
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:26
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:33
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:44
Finite element method functionality.
Definition: assemble_matrix_impl.h:25
std::function< graph::AdjacencyList< std::int32_t >(MPI_Comm, int, const AdjacencyList< std::int64_t > &, bool)> partition_fn
Signature of functions for computing the parallel partitioning of a distributed graph.
Definition: partition.h:34
AdjacencyList< std::int32_t > partition_graph(MPI_Comm comm, int nparts, const AdjacencyList< std::int64_t > &local_graph, bool ghosting)
Partition graph across processes using the default graph partitioner.
Definition: partition.cpp:21
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:30
CellPartitionFunction create_cell_partitioner(const graph::partition_fn &partfn=&graph::partition_graph)
Create a function that computes destination rank for mesh cells in this rank by applying the default ...
Definition: utils.cpp:604
std::vector< std::int32_t > locate_entities(const 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:386
std::vector< double > compute_midpoints(const Mesh &mesh, int dim, const std::span< const std::int32_t > &entities)
Compute the midpoints for mesh entities of a given dimension.
Definition: utils.cpp:355
GhostMode
Enum for different partitioning ghost modes.
Definition: utils.h:29
std::vector< std::int32_t > locate_entities_boundary(const 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:430
std::vector< std::int32_t > entities_to_geometry(const Mesh &mesh, int dim, const std::span< const std::int32_t > &entities, bool orient)
Determine the indices in the geometry data for each vertex of the given mesh entities.
Definition: utils.cpp:484
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:159
std::vector< std::int32_t > compute_incident_entities(const Mesh &mesh, const std::span< const std::int32_t > &entities, int d0, int d1)
Compute incident indices.
Definition: utils.cpp:627
std::vector< double > cell_normals(const Mesh &mesh, int dim, const std::span< const std::int32_t > &entities)
Compute normal to given cell (viewed as embedded in 3D)
Definition: utils.cpp:238
std::vector< std::int32_t > exterior_facet_indices(const Topology &topology)
Compute the indices of all exterior facets that are owned by the caller.
Definition: utils.cpp:570
std::vector< double > h(const Mesh &mesh, const std::span< const std::int32_t > &entities, int dim)
Compute greatest distance between any two vertices of the mesh entities (h).
Definition: utils.cpp:186
CellType
Cell type identifier.
Definition: cell_types.h:22
std::function< dolfinx::graph::AdjacencyList< std::int32_t >(MPI_Comm comm, int nparts, int tdim, const dolfinx::graph::AdjacencyList< std::int64_t > &cells, dolfinx::mesh::GhostMode ghost_mode)> CellPartitionFunction
Signature for the cell partitioning function. The function should compute the destination rank for ce...
Definition: utils.h:54