MeshEntity

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

Bases: object

A MeshEntity represents a mesh entity associated with a specific topological dimension of some Mesh.

Overloaded versions

  • MeshEntity()

    Default Constructor

  • MeshEntity(mesh, dim, index)

    Constructor

    Arguments
    mesh (Mesh)

    The mesh.

    dim (int)

    The topological dimension.

    index (int)

    The index.

dim()

Return topological dimension

Returns
int
The dimension.
entities(dim)

Return number of incident mesh entities of given topological dimension

global_index()

Return global index of mesh entity

Returns
int
The global index. Set to std::numerical_limits<std::size_t>::max() if global index has not been computed
incident()

Check if given entity is incident

Arguments
entity (MeshEntity)
The entity.
Returns
bool
True if the given entity is incident
index()

Overloaded versions

  • index()

    Return index of mesh entity

    Returns
    int

    The index.

  • index(entity)

    Compute local index of given incident entity (error if not found)

    Arguments
    entity (MeshEntity)

    The mesh entity.

    Returns
    int

    The local index of given entity.

init()

Initialize mesh entity with given data

Arguments
mesh (Mesh)
The mesh.
dim (int)
The topological dimension.
index (int)
The index.
mesh()

Return mesh associated with mesh entity

Returns
Mesh
The mesh.
mesh_id()

Return unique mesh ID

Returns
int
The unique mesh ID.
midpoint()

Compute midpoint of cell

Returns
Point
The midpoint of the cell.
num_entities()

Return local number of incident mesh entities of given topological dimension

Arguments
dim (int)
The topological dimension.
Returns
int

The number of local incident MeshEntity objects of given dimension.

num_global_entities()

Return global number of incident mesh entities of given topological dimension

Arguments
dim (int)
The topological dimension.
Returns
int
The number of global incident MeshEntity objects of given dimension.
str()

Return informal string representation (pretty-print)

Arguments
verbose (bool)
Flag to turn on additional output.
Returns
str
An informal representation of the function space.
thisown

The membership flag