UnitIntervalMesh.h

Note

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

class UnitIntervalMesh

Parent class(es)

A mesh of the unit interval (0, 1) with a given number of cells (nx) in the axial direction. The total number of intervals will be nx and the total number of vertices will be (nx + 1).

static Mesh create(std::size_t n)

Factory

@param n (std::size_t)
The number of cells.
@code{.cpp}
// Create a mesh of 25 cells in the interval [0,1] auto mesh = UnitIntervalMesh::create(25);

@endcode

static Mesh create(MPI_Comm comm, std::size_t n)

Factory

@param comm (MPI_Comm)
MPI communicator
@param n (std::size_t)
The number of cells.

@code{.cpp}

// Create a mesh of 25 cells in the interval [0,1] auto mesh = UnitIntervalMesh::create(MPI_COMM_WORLD, 25);

@endcode

UnitIntervalMesh(std::size_t nx)

Constructor

@param nx (std::size_t)
The number of cells.
@code{.cpp}
// Create a mesh of 25 cells in the interval [0,1] UnitIntervalMesh mesh(25);

@endcode

UnitIntervalMesh(MPI_Comm comm, std::size_t nx)

Constructor

@param comm (MPI_Comm)
MPI communicator
@param nx (std::size_t)
The number of cells.

@code{.cpp}

// Create a mesh of 25 cells in the interval [0,1] UnitIntervalMesh mesh(MPI_COMM_WORLD, 25);

@endcode