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
Functions
dolfinx::generation::RectangleMesh Namespace Reference

Rectangle mesh creation. More...

Functions

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 points is not important in terms of minimum and maximum coordinates. The total number of vertices will be (n[0] + 1)*(n[1] + 1). For triangles there will be will be 2*n[0]*n[1] cells. For quadrilaterals the number of cells will be n[0]*n[1]. More...
 
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 mesh::CellPartitionFunction &partitioner, const std::string &diagonal="right")
 Create a uniform mesh::Mesh over the rectangle spanned by the two points p. The order of the two points is not important in terms of minimum and maximum coordinates. The total number of vertices will be (n[0] + 1)*(n[1] + 1). For triangles there will be will be 2*n[0]*n[1] cells. For quadrilaterals the number of cells will be n[0]*n[1]. More...
 

Detailed Description

Rectangle mesh creation.

Function Documentation

◆ create() [1/2]

mesh::Mesh dolfinx::generation::RectangleMesh::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 mesh::CellPartitionFunction partitioner,
const std::string &  diagonal = "right" 
)

Create a uniform mesh::Mesh over the rectangle spanned by the two points p. The order of the two points is not important in terms of minimum and maximum coordinates. The total number of vertices will be (n[0] + 1)*(n[1] + 1). For triangles there will be will be 2*n[0]*n[1] cells. For quadrilaterals the number of cells will be n[0]*n[1].

Parameters
[in]commMPI communicator to build the mesh on
[in]pTwo corner points
[in]nNumber of cells in each direction
[in]celltypeCell shape
[in]ghost_modeMesh ghosting mode
[in]partitionerPartitioning function to use for determining the parallel distribution of cells across MPI ranks
[in]diagonalDirection of diagonals: "left", "right", "left/right", "crossed"
Returns
Mesh

◆ create() [2/2]

mesh::Mesh dolfinx::generation::RectangleMesh::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 points is not important in terms of minimum and maximum coordinates. The total number of vertices will be (n[0] + 1)*(n[1] + 1). For triangles there will be will be 2*n[0]*n[1] cells. For quadrilaterals the number of cells will be n[0]*n[1].

Parameters
[in]commMPI communicator to build the mesh on
[in]pTwo corner points
[in]nNumber of cells in each direction
[in]celltypeCell shape
[in]ghost_modeMesh ghosting mode
[in]diagonalDirection of diagonals: "left", "right", "left/right", "crossed"
Returns
Mesh