DOLFIN-X
DOLFIN-X C++ interface
TopologyComputation.h
1 // Copyright (C) 2006-2020 Anders Logg and Garth N. Wells
2 //
3 // This file is part of DOLFINX (https://www.fenicsproject.org)
4 //
5 // SPDX-License-Identifier: LGPL-3.0-or-later
6 
7 #pragma once
8 
9 #include "cell_types.h"
10 #include <array>
11 #include <cstdint>
12 #include <dolfinx/common/MPI.h>
13 #include <memory>
14 #include <tuple>
15 
16 namespace dolfinx
17 {
18 
19 namespace common
20 {
21 class IndexMap;
22 }
23 
24 namespace graph
25 {
26 template <typename T>
27 class AdjacencyList;
28 }
29 
30 namespace mesh
31 {
32 class Topology;
33 
36 
38 {
39 public:
49  static std::tuple<std::shared_ptr<graph::AdjacencyList<std::int32_t>>,
50  std::shared_ptr<graph::AdjacencyList<std::int32_t>>,
51  std::shared_ptr<common::IndexMap>>
52  compute_entities(MPI_Comm comm, const Topology& topology, int dim);
53 
64  static std::array<std::shared_ptr<graph::AdjacencyList<std::int32_t>>, 2>
65  compute_connectivity(const Topology& topology, int d0, int d1);
66 };
67 } // namespace mesh
68 } // namespace dolfinx
dolfinx::mesh::TopologyComputation
This class implements a set of basic algorithms that automate the computation of mesh entities and co...
Definition: TopologyComputation.h:38
dolfinx::mesh::Topology
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:58
dolfinx::mesh::TopologyComputation::compute_connectivity
static 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.
Definition: TopologyComputation.cpp:678
dolfinx::mesh::TopologyComputation::compute_entities
static 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,...
Definition: TopologyComputation.cpp:636