| DOLFINx 0.9.0
    DOLFINx C++ interface | 
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relations for the mesh entities). More...
#include <Topology.h>
| Public Member Functions | |
| Topology (MPI_Comm comm, CellType cell_type) | |
| Empty Topology constructor. | |
| Topology (MPI_Comm comm, const std::vector< CellType > &cell_type) | |
| Create empty mesh topology with multiple cell types. | |
| Topology (const Topology &topology)=default | |
| Copy constructor. | |
| Topology (Topology &&topology)=default | |
| Move constructor. | |
| ~Topology ()=default | |
| Destructor. | |
| Topology & | operator= (const Topology &topology)=delete | 
| Assignment. | |
| Topology & | operator= (Topology &&topology)=default | 
| Assignment. | |
| int | dim () const noexcept | 
| Return the topological dimension of the mesh. | |
| void | set_index_map (int dim, std::shared_ptr< const common::IndexMap > map) | 
| Set the IndexMap for dimension dim. | |
| void | set_index_map (std::int8_t dim, std::int8_t i, std::shared_ptr< const common::IndexMap > map) | 
| Set the IndexMap for the ith celltype of dimension dim. | |
| std::shared_ptr< const common::IndexMap > | index_map (int dim) const | 
| Get the IndexMap that described the parallel distribution of the mesh entities. | |
| std::vector< std::shared_ptr< const common::IndexMap > > | index_maps (std::int8_t dim) const | 
| 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 entity type per dimension. | |
| std::shared_ptr< const graph::AdjacencyList< std::int32_t > > | connectivity (std::pair< std::int8_t, std::int8_t > d0, std::pair< std::int8_t, std::int8_t > d1) const | 
| Return the connectivity from entities of topological dimension d0 to dimension d1. The entity type, and incident entity type are each described by a pair (dim, index). The index within a topological dimension dim, is that of the cell type given inentity_types(dim). | |
| void | set_connectivity (std::shared_ptr< graph::AdjacencyList< std::int32_t > > c, int d0, int d1) | 
| Set connectivity for given pair of topological dimensions. | |
| void | set_connectivity (std::shared_ptr< graph::AdjacencyList< std::int32_t > > c, std::pair< std::int8_t, std::int8_t > d0, std::pair< std::int8_t, std::int8_t > d1) | 
| Set connectivity for given pair of entity types, defined by dimension and index, as listed in entity_types(). General version for mixed topology. Connectivity from d0 to d1. | |
| const std::vector< std::uint32_t > & | get_cell_permutation_info () const | 
| Returns the permutation information. | |
| const std::vector< std::uint8_t > & | get_facet_permutations () const | 
| Get the numbers that encode the number of permutations to apply to facets. | |
| CellType | cell_type () const | 
| Cell type. | |
| std::vector< CellType > | entity_types (std::int8_t dim) const | 
| Get the entity types in the topology for a given dimension. | |
| std::int32_t | create_entities (int dim) | 
| Create entities of given topological dimension. | |
| void | create_connectivity (int d0, int d1) | 
| Create connectivity between given pair of dimensions, d0 / -> d1. | |
| void | create_entity_permutations () | 
| Compute entity permutations and reflections. | |
| const std::vector< std::int32_t > & | interprocess_facets () const | 
| List of inter-process facets. | |
| const std::vector< std::int32_t > & | interprocess_facets (std::int8_t index) const | 
| List of inter-process facets, if facet topology has been computed, for the facet type in Topology::entity_typesidentified by index. | |
| MPI_Comm | comm () const | 
| Public Attributes | |
| std::vector< std::vector< std::int64_t > > | original_cell_index | 
| Original cell index for each cell type. | |
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relations for the mesh entities).
A mesh entity e may be identified globally as a pair e = (dim, i), where dim is the topological dimension and i is the index of the entity within that topological dimension.
Create empty mesh topology with multiple cell types.
| comm | MPI communicator | 
| cell_type | List of cell types | 
| mesh::CellType cell_type | ( | ) | const | 
Cell type.
| MPI_Comm comm | ( | ) | const | 
| 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 entity type per dimension.
| [in] | d0 | |
| [in] | d1 | 
nullptr if connectivity has not been computed. | std::shared_ptr< const graph::AdjacencyList< std::int32_t > > connectivity | ( | std::pair< std::int8_t, std::int8_t > | d0, | 
| std::pair< std::int8_t, std::int8_t > | d1 ) const | 
Return the connectivity from entities of topological dimension d0 to dimension d1. The entity type, and incident entity type are each described by a pair (dim, index). The index within a topological dimension dim, is that of the cell type given in entity_types(dim). 
| d0 | Pair of (topological dimension of entities, index of "entity type" within topological dimension) | 
| d1 | Pair of (topological dimension of indicent entities, index of incident "entity type" within topological dimension) | 
| void create_connectivity | ( | int | d0, | 
| int | d1 ) | 
Create connectivity between given pair of dimensions, d0 / -> d1. 
| [in] | d0 | Topological dimension | 
| [in] | d1 | Topological dimension | 
| std::int32_t create_entities | ( | int | dim | ) | 
Create entities of given topological dimension.
| [in] | dim | Topological dimension | 
| std::vector< CellType > entity_types | ( | std::int8_t | dim | ) | const | 
Get the entity types in the topology for a given dimension.
| dim | Topological dimension | 
| const std::vector< std::uint8_t > & get_facet_permutations | ( | ) | const | 
Get the numbers that encode the number of permutations to apply to facets.
The permutations are encoded so that:
n % 2 gives the number of reflections to applyn // 2 gives the number of rotations to applyThe data is stored in a flattened 2D array, so that data[cell_index * / facets_per_cell + facet_index] contains the facet with index facet_index of the cell with index cell_index. 
| std::shared_ptr< const common::IndexMap > index_map | ( | int | dim | ) | const | 
Get the IndexMap that described the parallel distribution of the mesh entities.
| [in] | dim | Topological dimension | 
dim. Returns nullptr if index map has not been set. | std::vector< std::shared_ptr< const common::IndexMap > > index_maps | ( | std::int8_t | dim | ) | const | 
| dim | Topological dimension | 
| const std::vector< std::int32_t > & interprocess_facets | ( | ) | const | 
List of inter-process facets.
"Inter-process" facets are facets that are connected (1) to a cell that is owned by the calling process (rank) and (2) to a cell that is owned by another process.
| const std::vector< std::int32_t > & interprocess_facets | ( | std::int8_t | index | ) | const | 
List of inter-process facets, if facet topology has been computed, for the facet type in Topology::entity_types identified by index. 
| index | Index of facet type | 
| void set_connectivity | ( | std::shared_ptr< graph::AdjacencyList< std::int32_t > > | c, | 
| int | d0, | ||
| int | d1 ) | 
Set connectivity for given pair of topological dimensions.
| void set_connectivity | ( | std::shared_ptr< graph::AdjacencyList< std::int32_t > > | c, | 
| std::pair< std::int8_t, std::int8_t > | d0, | ||
| std::pair< std::int8_t, std::int8_t > | d1 ) | 
Set connectivity for given pair of entity types, defined by dimension and index, as listed in entity_types(). General version for mixed topology. Connectivity from d0 to d1. 
| c | Connectivity AdjacencyList | 
| d0 | Pair of (topological dimension of entities, index of "entity type" within topological dimension) | 
| d1 | Pair of (topological dimension of indicent entities, index of incident "entity type" within topological dimension) | 
| void set_index_map | ( | int | dim, | 
| std::shared_ptr< const common::IndexMap > | map ) | 
Set the IndexMap for dimension dim.
| void set_index_map | ( | std::int8_t | dim, | 
| std::int8_t | i, | ||
| std::shared_ptr< const common::IndexMap > | map ) | 
Set the IndexMap for the ith celltype of dimension dim. 
| dim | Topological dimension | 
| i | Index of cell type within dimension dim. Cell types for each dimension can be obtained withentity_types(dim). | 
| map | Map to set |