BoxMesh¶
-
class
dolfin.cpp.mesh.BoxMesh(*args)¶ Bases:
dolfin.cpp.mesh.MeshTetrahedral mesh of the 3D rectangular prism spanned by two points p0 and p1. Given the number of cells (nx, ny, nz) in each direction, the total number of tetrahedra will be 6*nx*ny*nz and the total number of vertices will be (nx + 1)*(ny + 1)*(nz + 1).
Deprecated Create a uniform finite element
Meshover 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); BoxMesh mesh(MPI_COMM_WORLD, p0, p1, 8, 8, 8);
Parameters: - comm (MPI_Comm) – (MPI_Comm)
MPIcommunicator - Point & p0 (const) – (
Point) First point. - Point & p1 (const) – (
Point) Second point. - nx (std::size_t) – (double) Number of cells in x-direction.
- ny (std::size_t) – (double) Number of cells in y-direction.
- nz (std::size_t) – (double) Number of cells in z-direction.
-
static
create()¶ Create a uniform finite element
Meshover 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)
MPIcommunicator - 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: - comm (MPI_Comm) – (MPI_Comm)
-
thisown¶ The membership flag
- comm (MPI_Comm) – (MPI_Comm)