DOLFIN-X
DOLFIN-X C++ interface
Functions
dolfinx::mesh::TopologyComputation Namespace Reference

This class implements a set of basic algorithms that automate the computation of mesh entities and connectivity. More...

Functions

std::tuple< std::shared_ptr< graph::AdjacencyList< std::int32_t > >, std::shared_ptr< graph::AdjacencyList< std::int32_t > >, std::shared_ptr< common::IndexMap > > compute_entities (MPI_Comm comm, const Topology &topology, int dim)
 Compute mesh entities of given topological dimension by computing entity-to-vertex connectivity (dim, 0), and cell-to-entity connectivity (tdim, dim) More...
 
std::array< std::shared_ptr< graph::AdjacencyList< std::int32_t > >, 2 > compute_connectivity (const Topology &topology, int d0, int d1)
 Compute connectivity (d0 -> d1) for given pair of topological dimensions. More...
 

Detailed Description

This class implements a set of basic algorithms that automate the computation of mesh entities and connectivity.

Function Documentation

◆ compute_connectivity()

std::array< std::shared_ptr< graph::AdjacencyList< std::int32_t > >, 2 > dolfinx::mesh::TopologyComputation::compute_connectivity ( const Topology topology,
int  d0,
int  d1 
)

Compute connectivity (d0 -> d1) for given pair of topological dimensions.

Parameters
[in]topologyThe topology
[in]d0The dimension of the nodes in the adjacency list
[in]d1The dimension of the edges in the adjacency list
Returns
The connectivities [(d0, d1), (d1, d0)] if they are computed. If (d0, d1) already exists then a nullptr is returned. If (d0, d1) is computed and the computation of (d1, d0) was required as part of computing (d0, d1), the (d1, d0) is returned as the second entry. The second entry is otherwise nullptr.

◆ compute_entities()

std::tuple< std::shared_ptr< graph::AdjacencyList< std::int32_t > >, std::shared_ptr< graph::AdjacencyList< std::int32_t > >, std::shared_ptr< common::IndexMap > > dolfinx::mesh::TopologyComputation::compute_entities ( MPI_Comm  comm,
const Topology topology,
int  dim 
)

Compute mesh entities of given topological dimension by computing entity-to-vertex connectivity (dim, 0), and cell-to-entity connectivity (tdim, dim)

Parameters
[in]commMPI Communicator
[in]topologyMesh topology
[in]dimThe dimension of the entities to create
Returns
Tuple of (cell-entity connectivity, entity-vertex connectivity, index map). If the entities already exist, then {nullptr, nullptr, nullptr} is returned.