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
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
16 {
17 namespace fem
18 {
19 class CoordinateElement;
20 }
21 
23 namespace generation::RectangleMesh
24 {
25 
41 mesh::Mesh create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
42  std::array<std::size_t, 2> n, mesh::CellType celltype,
43  const mesh::GhostMode ghost_mode,
44  const std::string& diagonal = "right");
45 
63 mesh::Mesh create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
64  std::array<std::size_t, 2> n, mesh::CellType celltype,
65  const mesh::GhostMode ghost_mode,
66  const mesh::CellPartitionFunction& partitioner,
67  const std::string& diagonal = "right");
68 } // namespace generation::RectangleMesh
69 } // 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::mesh::GhostMode
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:46
dolfinx::mesh::Mesh
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:55
dolfinx::generation::RectangleMesh::create
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:272