BoxMesh_create

dolfin.cpp.mesh.BoxMesh_create()

Create a uniform finite element Mesh over the rectangular prism spanned by the two _Point_s p0 and p1. The order of the two points is not important in terms of minimum and maximum coordinates.

// Mesh with 8 cells in each direction on the
// set [-1,2] x [-1,2] x [-1,2].
Point p0(-1, -1, -1);
Point p1(2, 2, 2);
auto mesh = BoxMesh::create({p0, p1}, {8, 8, 8});
Parameters:
  • comm (MPI_Comm) – (MPI_Comm) MPI communicator
  • std::array< Point, 2 > & p (const) – (std::array<Point , 2>) Points of box.
  • std::size_t, 3 > n (std::array<) – (std::array<double, 3> ) Number of cells in each direction.
  • cell_type (CellType::Type) – Tetrahedron or hexahedron
Return type:

Mesh