11#include <dolfinx/common/MPI.h>
67 std::shared_ptr<const common::IndexMap> vertex_map,
68 std::vector<std::shared_ptr<const common::IndexMap>> cell_maps,
70 const std::optional<std::vector<std::vector<std::int64_t>>>&
90 int dim() const noexcept;
109 std::vector<std::shared_ptr<const
common::IndexMap>>
133 std::shared_ptr<const
graph::AdjacencyList<std::int32_t>>
134 connectivity(std::array<
int, 2> d0, std::array<
int, 2> d1) const;
145 std::shared_ptr<const
graph::AdjacencyList<std::int32_t>>
215 MPI_Comm
comm() const;
220 std::vector<std::vector<
CellType>> _entity_types;
228 std::map<std::array<
int, 2>, std::shared_ptr<const
common::IndexMap>>
235 std::map<std::pair<std::array<
int, 2>, std::array<
int, 2>>,
236 std::shared_ptr<
graph::AdjacencyList<std::int32_t>>>
242 std::vector<std::uint8_t> _facet_permutations;
246 std::vector<std::uint32_t> _cell_permutations;
251 std::vector<std::vector<std::int32_t>> _interprocess_facets;
283 std::vector<std::span<const std::int64_t>> cells,
285 std::vector<std::span<const
int>> ghost_owners,
286 std::span<const std::int64_t> boundary_vertices);
314 std::span<const std::int64_t> boundary_vertices);
328std::tuple<
Topology, std::vector<int32_t>, std::vector<int32_t>>
330 std::span<const std::int32_t> entities);
341std::vector<std::int32_t>
343 std::span<const std::int32_t> entities);
362std::vector<std::vector<std::int32_t>>
Definition AdjacencyList.h:27
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:823
void create_connectivity(int d0, int d1)
Create connectivity between given pair of dimensions, d0 / -> d1.
Definition Topology.cpp:950
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:990
const std::vector< std::uint32_t > & get_cell_permutation_info() const
Returns the permutation information.
Definition Topology.cpp:852
std::shared_ptr< const graph::AdjacencyList< std::int32_t > > connectivity(std::array< int, 2 > d0, std::array< int, 2 > d1) const
Get the connectivity from entities of topological dimension d0 to dimension d1.
Definition Topology.cpp:832
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:867
Topology(const Topology &topology)=default
Copy constructor.
~Topology()=default
Destructor.
Topology(std::vector< CellType > cell_types, std::shared_ptr< const common::IndexMap > vertex_map, std::vector< std::shared_ptr< const common::IndexMap > > cell_maps, std::vector< std::shared_ptr< graph::AdjacencyList< std::int32_t > > > cells, const std::optional< std::vector< std::vector< std::int64_t > > > &original_cell_index=std::nullopt)
Create a mesh topology.
Definition Topology.cpp:741
const std::vector< CellType > & entity_types(int dim) const
Entity types in the topology for a given dimension.
Definition Topology.cpp:790
int dim() const noexcept
Topological dimension of the mesh.
Definition Topology.cpp:785
const std::vector< std::int32_t > & interprocess_facets(int index) const
List of inter-process facets of a given type.
Definition Topology.cpp:881
Topology(Topology &&topology)=default
Move constructor.
std::vector< CellType > cell_types() const
Get the types of cells in the topology.
Definition Topology.cpp:805
Topology & operator=(const Topology &topology)=delete
Assignment.
MPI_Comm comm() const
Mesh MPI communicator.
Definition Topology.cpp:1010
CellType cell_type() const
Cell type.
Definition Topology.cpp:795
bool create_entities(int dim)
Create entities of given topological dimension.
Definition Topology.cpp:893
Topology & operator=(Topology &&topology)=default
Assignment.
std::vector< std::shared_ptr< const common::IndexMap > > index_maps(int dim) const
Get the index maps that described the parallel distribution of the mesh entities of a given topologic...
Definition Topology.cpp:811
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, const std::vector< CellType > &cell_types, std::vector< std::span< const std::int64_t > > cells, std::vector< std::span< const std::int64_t > > original_cell_index, std::vector< std::span< const int > > ghost_owners, std::span< const std::int64_t > boundary_vertices)
Create a mesh topology.
Definition Topology.cpp:1017
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:1303
CellType
Cell type identifier.
Definition cell_types.h:22
std::vector< std::vector< std::int32_t > > compute_mixed_cell_pairs(const Topology &topology, mesh::CellType facet_type)
Compute a list of cell-cell connections for each possible combination in the topology which have the ...
Definition Topology.cpp:1444
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:1386