BoxMesh.h

Note

The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.

class BoxMesh

Parent class(es)

Tetrahedral mesh of the 3D rectangular prism [x0, x1] x [y0, y1] x [z0, z1]. 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).

BoxMesh(double x0, double y0, double z0, double x1, double y1, double z1, std::size_t nx, std::size_t ny, std::size_t nz)

Create a uniform finite element Mesh over the rectangular prism [x0, x1] x [y0, y1] x [z0, z1].

Arguments
x0 (double)
\(x\)-min.
y0 (double)
\(y\)-min.
z0 (double)
\(z\)-min.
x1 (double)
\(x\)-max.
y1 (double)
\(y\)-max.
z1 (double)
\(z\)-max.
xn (double)
Number of cells in \(x\)-direction.
yn (double)
Number of cells in \(y\)-direction.
zn (double)
Number of cells in \(z\)-direction.
Example
// Mesh with 6 cells in each direction on the
// set [-1,2] x [-1,2] x [-1,2].
BoxMesh mesh(-1, -1, -1, 2, 2, 2, 6, 6, 6);
BoxMesh(MPI_Comm comm, double x0, double y0, double z0, double x1, double y1, double z1, std::size_t nx, std::size_t ny, std::size_t nz)

Create a uniform finite element Mesh over the rectangular prism [x0, x1] x [y0, y1] x [z0, z1].

Arguments
comm (MPI_Comm)
MPI communicator
x0 (double)
\(x\)-min.
y0 (double)
\(y\)-min.
z0 (double)
\(z\)-min.
x1 (double)
\(x\)-max.
y1 (double)
\(y\)-max.
z1 (double)
\(z\)-max.
xn (double)
Number of cells in \(x\)-direction.
yn (double)
Number of cells in \(y\)-direction.
zn (double)
Number of cells in \(z\)-direction.
Example
// Mesh with 6 cells in each direction on the
// set [-1,2] x [-1,2] x [-1,2].
BoxMesh mesh(MPI_COMM_WORLD, -1, -1, -1, 2, 2,
             2, 6, 6, 6);