DOLFIN-X
DOLFIN-X 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 <string>
13 
14 namespace dolfinx
15 {
16 namespace fem
17 {
18 class CoordinateElement;
19 }
20 
22 namespace generation::RectangleMesh
23 {
24 
40 mesh::Mesh create(MPI_Comm comm, const std::array<std::array<double, 3>, 2>& p,
41  std::array<std::size_t, 2> n,
42  const fem::CoordinateElement& element,
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,
65  const fem::CoordinateElement& element,
66  const mesh::GhostMode ghost_mode,
67  const mesh::CellPartitionFunction& partitioner,
68  const std::string& diagonal = "right");
69 } // namespace generation::RectangleMesh
70 } // namespace dolfinx
This class manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:31
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< std::array< double, 3 >, 2 > &p, std::array< std::size_t, 2 > n, const fem::CoordinateElement &element, 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:276
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:44
GhostMode
Enum for different partitioning ghost modes.
Definition: Mesh.h:48