IntervalMesh

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

Bases: dolfin.cpp.mesh.Mesh

Interval mesh of the 1D line [a,b]. Given the number of cells (n) in the axial direction, the total number of intervals will be n and the total number of vertices will be (n + 1).

Constructor

// Create a mesh of 25 cells in the interval [-1,1]
IntervalMesh mesh(MPI_COMM_WORLD, 25, -1.0, 1.0);
Parameters:
  • comm (MPI_Comm) – (MPI_Comm) MPI communicator
  • n (std::size_t) – (std::size_t) The number of cells.
  • a (double) – (double) The minimum point (inclusive).
  • b (double) – (double) The maximum point (inclusive).
static create()

Factory

// Create a mesh of 25 cells in the interval [-1,1]
IntervalMesh mesh(MPI_COMM_WORLD, 25, -1.0, 1.0);
Parameters:
  • comm (MPI_Comm) – (MPI_Comm) MPI communicator
  • n (std::size_t) – (std::size_t) The number of cells.
  • double, 2 > x (std::array<) – (std::array<double, 2>) The end points
Return type:

Mesh

thisown

The membership flag