11#include <dolfinx/common/MPI.h>
73 int dim() const noexcept;
90 std::shared_ptr<const common::IndexMap> map);
98 std::shared_ptr<const common::IndexMap>
index_map(
int dim) const;
103 std::vector<std::shared_ptr<const common::IndexMap>>
114 std::shared_ptr<const graph::AdjacencyList<std::int32_t>>
128 std::shared_ptr<const graph::AdjacencyList<std::int32_t>>
130 std::pair<std::int8_t, std::int8_t> d1) const;
134 void set_connectivity(std::shared_ptr<graph::AdjacencyList<std::int32_t>> c,
147 void set_connectivity(std::shared_ptr<graph::AdjacencyList<std::int32_t>> c,
148 std::pair<std::int8_t, std::int8_t> d0,
149 std::pair<std::int8_t, std::int8_t> d1);
215 MPI_Comm
comm() const;
228 std::vector<
CellType> _entity_types;
229 std::vector<std::int8_t> _entity_type_offsets;
233 std::vector<std::shared_ptr<const common::IndexMap>> _index_map;
241 std::vector<std::vector<std::shared_ptr<graph::AdjacencyList<std::int32_t>>>>
247 std::vector<std::uint8_t> _facet_permutations;
251 std::vector<std::uint32_t> _cell_permutations;
254 std::vector<std::vector<std::int32_t>> _interprocess_facets;
283 std::span<const std::int64_t> boundary_vertices);
298 std::vector<std::span<const std::int64_t>> cells,
300 std::vector<std::span<const
int>> ghost_owners,
301 std::span<const std::int64_t> boundary_vertices);
314std::tuple<
Topology, std::vector<int32_t>, std::vector<int32_t>>
316 std::span<const std::int32_t> entities);
328std::vector<std::int32_t>
330 std::span<const std::int32_t> entities);
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition Topology.h:44
std::shared_ptr< const common::IndexMap > index_map(int dim) const
Get the IndexMap that described the parallel distribution of the mesh entities.
Definition Topology.cpp:815
void create_connectivity(int d0, int d1)
Create connectivity between given pair of dimensions, d0 / -> d1.
Definition Topology.cpp:870
std::shared_ptr< const graph::AdjacencyList< std::int32_t > > connectivity(int d0, int d1) const
Return connectivity from entities of dimension d0 to entities of dimension d1. Assumes only one entit...
Definition Topology.cpp:931
void set_connectivity(std::shared_ptr< graph::AdjacencyList< std::int32_t > > c, int d0, int d1)
Set connectivity for given pair of topological dimensions.
Definition Topology.cpp:955
std::vector< std::vector< std::int64_t > > original_cell_index
Original cell index for each cell type.
Definition Topology.h:211
void create_entity_permutations()
Compute entity permutations and reflections.
Definition Topology.cpp:910
std::int32_t create_entities(int dim)
Create entities of given topological dimension.
Definition Topology.cpp:831
const std::vector< std::uint32_t > & get_cell_permutation_info() const
Returns the permutation information.
Definition Topology.cpp:981
Topology(MPI_Comm comm, CellType cell_type)
Empty Topology constructor.
Definition Topology.cpp:716
const std::vector< std::int32_t > & interprocess_facets() const
List of inter-process facets.
Definition Topology.cpp:1010
const std::vector< std::uint8_t > & get_facet_permutations() const
Get the numbers that encode the number of permutations to apply to facets.
Definition Topology.cpp:996
Topology(const Topology &topology)=default
Copy constructor.
~Topology()=default
Destructor.
std::vector< CellType > entity_types(std::int8_t dim) const
Get the entity types in the topology for a given dimension.
Definition Topology.cpp:1023
int dim() const noexcept
Return the topological dimension of the mesh.
Definition Topology.cpp:794
Topology(Topology &&topology)=default
Move constructor.
void set_index_map(int dim, std::shared_ptr< const common::IndexMap > map)
Set the IndexMap for dimension dim.
Definition Topology.cpp:796
Topology & operator=(const Topology &topology)=delete
Assignment.
MPI_Comm comm() const
Definition Topology.cpp:1031
std::vector< std::shared_ptr< const common::IndexMap > > index_maps(std::int8_t dim) const
Definition Topology.cpp:822
CellType cell_type() const
Cell type.
Definition Topology.cpp:1021
Topology & operator=(Topology &&topology)=default
Assignment.
Miscellaneous classes, functions and types.
Definition dolfinx_common.h:8
Graph data structures and algorithms.
Definition dofmapbuilder.h:26
Mesh data structures and algorithms on meshes.
Definition DofMap.h:32
Topology create_topology(MPI_Comm comm, std::span< const std::int64_t > cells, std::span< const std::int64_t > original_cell_index, std::span< const int > ghost_owners, CellType cell_type, std::span< const std::int64_t > boundary_vertices)
Create a mesh topology.
Definition Topology.cpp:1319
std::tuple< Topology, std::vector< int32_t >, std::vector< int32_t > > create_subtopology(const Topology &topology, int dim, std::span< const std::int32_t > entities)
Create a topology for a subset of entities of a given topological dimension.
Definition Topology.cpp:1331
CellType
Cell type identifier.
Definition cell_types.h:22
std::vector< std::int32_t > entities_to_index(const Topology &topology, int dim, std::span< const std::int32_t > entities)
Get entity indices for entities defined by their vertices.
Definition Topology.cpp:1425
Top-level namespace.
Definition defines.h:12