dolfin.generation

Simple mesh generation module

Functions

BoxMesh(comm, points, n[, cell_type, ghost_mode])

Create box mesh

IntervalMesh(comm, nx, points[, ghost_mode])

Create an interval mesh

RectangleMesh(comm, points, n[, cell_type, …])

Create rectangle mesh

UnitCubeMesh(comm, nx, ny, nz[, cell_type, …])

Create a mesh of a unit cube with coordinate mapping attached

UnitIntervalMesh(comm, nx[, ghost_mode])

Create a mesh on the unit interval with coordinate mapping attached

UnitSquareMesh(comm, nx, ny[, cell_type, …])

Create a mesh of a unit square with coordinate mapping attached

dolfin.generation.IntervalMesh(comm, nx: int, points: list, ghost_mode=GhostMode.none)[source]

Create an interval mesh

Parameters
  • comm – MPI communicator

  • nx – Number of cells

  • point – Coordinates of the end points

  • ghost_mode

Note

Coordinate mapping is not attached

dolfin.generation.UnitIntervalMesh(comm, nx, ghost_mode=GhostMode.none)[source]

Create a mesh on the unit interval with coordinate mapping attached

Parameters
  • comm – MPI communicator

  • nx – Number of cells

dolfin.generation.RectangleMesh(comm, points: List[numpy.array], n: list, cell_type=CellType.triangle, ghost_mode=GhostMode.none, diagonal: str = 'right')[source]

Create rectangle mesh

Parameters
  • comm – MPI communicator

  • points – List of Points representing vertices

  • n – List of number of cells in each direction

  • diagonal – Direction of diagonal

Note

Coordinate mapping is not attached

dolfin.generation.UnitSquareMesh(comm, nx, ny, cell_type=CellType.triangle, ghost_mode=GhostMode.none, diagonal='right')[source]

Create a mesh of a unit square with coordinate mapping attached

Parameters
  • comm – MPI communicator

  • nx – Number of cells in “x” direction

  • ny – Number of cells in “y” direction

  • diagonal – Direction of diagonal

dolfin.generation.BoxMesh(comm, points: List[numpy.array], n: list, cell_type=CellType.tetrahedron, ghost_mode=GhostMode.none)[source]

Create box mesh

Parameters
  • comm – MPI communicator

  • points – List of points representing vertices

  • n – List of cells in each direction

Note

Coordinate mapping is not attached

dolfin.generation.UnitCubeMesh(comm, nx, ny, nz, cell_type=CellType.tetrahedron, ghost_mode=GhostMode.none)[source]

Create a mesh of a unit cube with coordinate mapping attached

Parameters
  • comm – MPI communicator

  • nx – Number of cells in “x” direction

  • ny – Number of cells in “y” direction

  • nz – Number of cells in “z” direction