13#include <dolfinx/common/MPI.h>
19class CoordinateElement;
40 template <std::convertible_to<Topology> U, std::convertible_to<Geometry> V>
42 : _topology(std::forward<U>(
topology)),
60 Mesh& operator=(
const Mesh& mesh) =
delete;
91 MPI_Comm
comm()
const;
132 std::span<const double> x, std::array<std::size_t, 2> xshape,
138 std::span<const double> x, std::array<std::size_t, 2> xshape,
148std::tuple<Mesh, std::vector<std::int32_t>, std::vector<std::int32_t>,
149 std::vector<std::int32_t>>
151 std::span<const std::int32_t> entities);
A duplicate MPI communicator and manage lifetime of the communicator.
Definition: MPI.h:42
A CoordinateElement manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:32
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:27
Geometry stores the geometry imposed on a mesh.
Definition: Geometry.h:29
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:34
Mesh & operator=(Mesh &&mesh)=default
Assignment move operator.
Mesh(const Mesh &mesh)=default
Copy constructor.
Mesh(Mesh &&mesh)=default
Move constructor.
std::string name
Name.
Definition: Mesh.h:94
Mesh(MPI_Comm comm, U &&topology, V &&geometry)
Create a mesh.
Definition: Mesh.h:41
~Mesh()=default
Destructor.
MPI_Comm comm() const
Mesh MPI communicator.
Definition: Mesh.cpp:473
Geometry & geometry()
Get mesh geometry.
Definition: Mesh.cpp:469
Topology & topology()
Get mesh topology.
Definition: Mesh.cpp:463
Topology & topology_mutable() const
Get mesh topology if one really needs the mutable version.
Definition: Mesh.cpp:467
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:43
Finite element method functionality.
Definition: assemble_matrix_impl.h:25
Graph data structures and algorithms.
Definition: dofmapbuilder.h:25
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:31
GhostMode
Enum for different partitioning ghost modes.
Definition: utils.h:29
Mesh create_mesh(MPI_Comm comm, const graph::AdjacencyList< std::int64_t > &cells, const fem::CoordinateElement &element, std::span< const double > x, std::array< std::size_t, 2 > xshape, GhostMode ghost_mode)
Create a mesh using the default partitioner.
Definition: Mesh.cpp:59
std::function< graph::AdjacencyList< std::int32_t >(MPI_Comm comm, int nparts, int tdim, const graph::AdjacencyList< std::int64_t > &cells)> CellPartitionFunction
Signature for the cell partitioning function. The function should compute the destination rank for ce...
Definition: utils.h:55
std::tuple< Mesh, std::vector< std::int32_t >, std::vector< std::int32_t >, std::vector< std::int32_t > > create_submesh(const Mesh &mesh, int dim, std::span< const std::int32_t > entities)
Create a new mesh consisting of a subset of entities in a mesh.
Definition: Mesh.cpp:192