DOLFIN-X
DOLFIN-X C++ interface
Static Public Member Functions | List of all members
dolfinx::generation::RectangleMesh Class Reference

Triangular mesh of the 2D rectangle spanned by two points p0 and p1. Given the number of cells (nx, ny) in each direction, the total number of triangles will be 2*nx*ny and the total number of vertices will be (nx + 1)*(ny + 1). More...

#include <RectangleMesh.h>

Static Public Member Functions

static mesh::Mesh create (MPI_Comm comm, const std::array< Eigen::Vector3d, 2 > &p, std::array< std::size_t, 2 > n, const fem::CoordinateElement &element, const mesh::GhostMode ghost_mode, std::string diagonal="right")
 

Detailed Description

Triangular mesh of the 2D rectangle spanned by two points p0 and p1. Given the number of cells (nx, ny) in each direction, the total number of triangles will be 2*nx*ny and the total number of vertices will be (nx + 1)*(ny + 1).

Member Function Documentation

◆ create()

mesh::Mesh RectangleMesh::create ( MPI_Comm  comm,
const std::array< Eigen::Vector3d, 2 > &  p,
std::array< std::size_t, 2 >  n,
const fem::CoordinateElement element,
const mesh::GhostMode  ghost_mode,
std::string  diagonal = "right" 
)
static
Parameters
[in]commMPI communicator to build the mesh on
[in]pTwo corner points
[in]nNumber of cells in each direction
[in]elementElement that describes the geometry of a cell
[in]ghost_modeMesh ghosting mode
[in]diagonalDirection of diagonals: "left", "right", "left/right", "crossed"
Returns
Mesh

The documentation for this class was generated from the following files: