DOLFIN-X
DOLFIN-X C++ interface
GraphBuilder.h
1 // Copyright (C) 2010-2013 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 <Eigen/Dense>
10 #include <array>
11 #include <cstdint>
12 #include <dolfinx/common/MPI.h>
13 #include <dolfinx/common/types.h>
14 #include <tuple>
15 #include <utility>
16 #include <vector>
17 
18 namespace dolfinx
19 {
20 
21 namespace mesh
22 {
23 
24 enum class CellType;
25 
27 
29 {
30 
31 public:
35  static std::pair<std::vector<std::vector<std::int64_t>>,
36  std::array<std::int32_t, 3>>
38  const MPI_Comm mpi_comm,
39  const Eigen::Ref<const Eigen::Array<std::int64_t, Eigen::Dynamic,
40  Eigen::Dynamic, Eigen::RowMajor>>&
41  cell_vertices,
42  const mesh::CellType& cell_type);
43 
46  static std::tuple<
47  std::vector<std::vector<std::int32_t>>,
48  std::vector<std::pair<std::vector<std::int32_t>, std::int32_t>>,
49  std::int32_t>
51  const Eigen::Ref<const Eigen::Array<std::int64_t, Eigen::Dynamic,
52  Eigen::Dynamic, Eigen::RowMajor>>&
53  cell_vertices,
54  const mesh::CellType& cell_type);
55 };
56 } // namespace mesh
57 } // namespace dolfinx
dolfinx::mesh::GraphBuilder::compute_local_dual_graph
static std::tuple< std::vector< std::vector< std::int32_t > >, std::vector< std::pair< std::vector< std::int32_t >, std::int32_t > >, std::int32_t > compute_local_dual_graph(const Eigen::Ref< const Eigen::Array< std::int64_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &cell_vertices, const mesh::CellType &cell_type)
Compute local part of the dual graph, and return (local_graph, facet_cell_map, number of local edges ...
Definition: GraphBuilder.cpp:330
dolfinx::mesh::CellType
CellType
Cell type identifier.
Definition: cell_types.h:22
dolfinx::mesh::GraphBuilder::compute_dual_graph
static std::pair< std::vector< std::vector< std::int64_t > >, std::array< std::int32_t, 3 > > compute_dual_graph(const MPI_Comm mpi_comm, const Eigen::Ref< const Eigen::Array< std::int64_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &cell_vertices, const mesh::CellType &cell_type)
Build distributed dual graph (cell-cell connections) from minimal mesh data, and return (graph,...
Definition: GraphBuilder.cpp:305
dolfinx::mesh::GraphBuilder
This class builds a Graph corresponding to various objects.
Definition: GraphBuilder.h:28