Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.1.0/v0.9.0/cpp
DOLFINx  0.1.0
DOLFINx 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 <dolfinx/mesh/cell_types.h>
14 #include <mpi.h>
15 
16 namespace dolfinx
17 {
18 
19 namespace fem
20 {
21 class CoordinateElement;
22 }
23 
25 namespace generation::BoxMesh
26 {
27 
44 create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
45  std::array<std::size_t, 3> n, mesh::CellType celltype,
46  const mesh::GhostMode ghost_mode,
47  const mesh::CellPartitionFunction& partitioner
48  = static_cast<graph::AdjacencyList<std::int32_t> (*)(
49  MPI_Comm, int, int, const graph::AdjacencyList<std::int64_t>&,
51 } // namespace generation::BoxMesh
52 } // namespace dolfinx
dolfinx::mesh::CellType
CellType
Cell type identifier.
Definition: cell_types.h:21
dolfinx::mesh::CellPartitionFunction
std::function< const dolfinx::graph::AdjacencyList< std::int32_t >(MPI_Comm comm, int nparts, int tdim, const dolfinx::graph::AdjacencyList< std::int64_t > &cells, dolfinx::mesh::GhostMode ghost_mode)> CellPartitionFunction
Definition: Mesh.h:43
dolfinx::graph::AdjacencyList
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:46
dolfinx::mesh::GhostMode
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:46
dolfinx::generation::BoxMesh::create
mesh::Mesh create(MPI_Comm comm, const std::array< std::array< double, 3 >, 2 > &p, std::array< std::size_t, 3 > n, mesh::CellType celltype, const mesh::GhostMode ghost_mode, const mesh::CellPartitionFunction &partitioner=static_cast< graph::AdjacencyList< std::int32_t >(*)(MPI_Comm, int, int, 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:194
dolfinx::mesh::Mesh
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:55
dolfinx::mesh::partition_cells_graph
graph::AdjacencyList< std::int32_t > partition_cells_graph(MPI_Comm comm, int n, int tdim, 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:497