UnitCubeMesh

class dolfin.cpp.mesh.UnitCubeMesh(*args)

Bases: dolfin.cpp.mesh.BoxMesh

Tetrahedral/hexahedral mesh of the 3D unit cube [0,1] x [0,1] x [0,1]. 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).

Create a uniform finite element Mesh over the unit cube [0,1] x [0,1] x [0,1].

UnitCubeMesh mesh(MPI_COMM_WORLD, 32, 32, 32);
Parameters:
  • comm (MPI_Comm) – (MPI_Comm) MPI communicator
  • nx (std::size_t) – (std::size_t) Number of cells in \(x\) direction.
  • ny (std::size_t) – (std::size_t) Number of cells in \(y\) direction.
  • nz (std::size_t) – (std::size_t) Number of cells in \(z\) direction.
static create()
Parameters:
  • comm (MPI_Comm) –
  • nx (std::size_t) –
  • ny (std::size_t) –
  • nz (std::size_t) –
  • cell_type (CellType::Type) –
Return type:

Mesh

thisown

The membership flag