DOLFIN-X
DOLFIN-X C++ interface
BoxMesh.h
1 // Copyright (C) 2005-2017 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 <array>
10 #include <cstddef>
11 #include <dolfinx/graph/AdjacencyList.h>
12 #include <dolfinx/mesh/Mesh.h>
13 #include <mpi.h>
14 
15 namespace dolfinx
16 {
17 
18 namespace fem
19 {
20 class CoordinateElement;
21 }
22 
24 namespace generation::BoxMesh
25 {
26 
43 create(MPI_Comm comm, const std::array<Eigen::Vector3d, 2>& p,
44  std::array<std::size_t, 3> n, const fem::CoordinateElement& element,
45  const mesh::GhostMode ghost_mode,
46  const mesh::CellPartitionFunction& partitioner
47  = static_cast<graph::AdjacencyList<std::int32_t> (*)(
48  MPI_Comm, int, const mesh::CellType,
51 } // namespace generation::BoxMesh
52 } // namespace dolfinx
This class manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:26
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:46
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:57
mesh::Mesh create(MPI_Comm comm, const std::array< Eigen::Vector3d, 2 > &p, std::array< std::size_t, 3 > n, const fem::CoordinateElement &element, const mesh::GhostMode ghost_mode, const mesh::CellPartitionFunction &partitioner=static_cast< graph::AdjacencyList< std::int32_t >(*)(MPI_Comm, int, const mesh::CellType, const graph::AdjacencyList< std::int64_t > &, mesh::GhostMode)>(&mesh::partition_cells_graph))
Create a uniform mesh::Mesh over the rectangular prism spanned by the two points p....
Definition: BoxMesh.cpp:197
graph::AdjacencyList< std::int32_t > partition_cells_graph(MPI_Comm comm, int n, const mesh::CellType cell_type, const graph::AdjacencyList< std::int64_t > &cells, mesh::GhostMode ghost_mode)
Compute destination rank for mesh cells in this rank by applying the default graph partitioner to the...
Definition: utils.cpp:485
CellType
Cell type identifier.
Definition: cell_types.h:21
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:48
std::function< const dolfinx::graph::AdjacencyList< std::int32_t >(MPI_Comm comm, int nparts, const dolfinx::mesh::CellType cell_type, const dolfinx::graph::AdjacencyList< std::int64_t > &cells, dolfinx::mesh::GhostMode ghost_mode)> CellPartitionFunction
Definition: Mesh.h:44