DOLFINx
DOLFINx C++ interface
IntervalMesh.h
1 // Copyright (C) 2007 Kristian B. Oelgaard
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 
14 namespace dolfinx
15 {
16 namespace fem
17 {
18 class CoordinateElement;
19 }
20 
22 namespace generation::IntervalMesh
23 {
24 
37 create(MPI_Comm comm, std::size_t n, std::array<double, 2> x,
38  const mesh::GhostMode ghost_mode,
39  const mesh::CellPartitionFunction& partitioner
40  = static_cast<graph::AdjacencyList<std::int32_t> (*)(
41  MPI_Comm, int, int, const graph::AdjacencyList<std::int64_t>&,
43 } // namespace generation::IntervalMesh
44 } // namespace dolfinx
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:47
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:56
mesh::Mesh create(MPI_Comm comm, std::size_t n, std::array< double, 2 > x, 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))
Interval mesh of the 1D line [a, b]. Given n cells in the axial direction, the total number of interv...
Definition: IntervalMesh.cpp:78
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
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
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:47