Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.3.0/v0.9.0/cpp
DOLFINx  0.3.0
DOLFINx C++ interface
RectangleMesh.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 <dolfinx/common/MPI.h>
11 #include <dolfinx/mesh/Mesh.h>
12 #include <dolfinx/mesh/cell_types.h>
13 #include <string>
14 
15 namespace dolfinx::fem
16 {
17 class CoordinateElement;
18 }
19 
22 {
23 
39 mesh::Mesh create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
40  std::array<std::size_t, 2> n, mesh::CellType celltype,
41  const mesh::GhostMode ghost_mode,
42  const std::string& diagonal = "right");
43 
61 mesh::Mesh create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
62  std::array<std::size_t, 2> n, mesh::CellType celltype,
63  const mesh::GhostMode ghost_mode,
64  const mesh::CellPartitionFunction& partitioner,
65  const std::string& diagonal = "right");
66 } // namespace dolfinx::generation::RectangleMesh
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:53
Finite element method functionality.
Definition: assemble_matrix_impl.h:23
Rectangle mesh creation.
Definition: RectangleMesh.h:22
mesh::Mesh create(MPI_Comm comm, const std::array< std::array< double, 3 >, 2 > &p, std::array< std::size_t, 2 > n, mesh::CellType celltype, const mesh::GhostMode ghost_mode, const std::string &diagonal="right")
Create a uniform mesh::Mesh over the rectangle spanned by the two points p. The order of the two poin...
Definition: RectangleMesh.cpp:295
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:40
CellType
Cell type identifier.
Definition: cell_types.h:22
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:44