MeshEntity

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

Bases: object

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

Friends: MeshEntityIterator, MeshEntityIteratorBase, SubsetIterator.

Constructor

Parameters:
  • Mesh & mesh (const) – (Mesh ) The mesh.
  • dim (std::size_t) – (std::size_t) The topological dimension.
  • index (std::size_t) – (std::size_t) The index.
dim()

Return topological dimension

Return type:std::size_t
Returns:std::size_t The dimension.
entities(dim)

Return number of incident mesh entities of given topological dimension

global_index()

Return global index of mesh entity

Return type:std::int64_t
Returns:std::size_t 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

Parameters:MeshEntity & entity (const) – (MeshEntity ) The entity.
Return type:bool
Returns:bool True if the given entity is incident
index()

Return index of mesh entity

Return type:std::size_t
Returns:std::size_t The index.
init()

Initialize mesh entity with given data

Parameters:
  • Mesh & mesh (const) – (Mesh ) The mesh.
  • dim (std::size_t) – (std::size_t) The topological dimension.
  • index (std::size_t) – (std::size_t) The index.
Return type:

void

is_ghost()

Determine whether an entity is a ‘ghost’ from another process

Return type:bool
Returns:bool True if entity is a ghost entity
is_shared()

Determine if an entity is shared or not

Return type:bool
Returns:bool True if entity is shared
mesh()

Return mesh associated with mesh entity

Return type:const Mesh &
Returns:Mesh The mesh.
mesh_id()

Return unique mesh ID

Return type:std::size_t
Returns:std::size_t The unique mesh ID.
midpoint()

Compute midpoint of cell

Return type:Point
Returns:Point The midpoint of the cell.
num_entities()

Return local number of incident mesh entities of given topological dimension

Parameters:dim (std::size_t) – (std::size_t) The topological dimension.
Return type:std::size_t
Returns:std::size_t The number of local incident MeshEntity objects of given dimension.
num_global_entities()

Return global number of incident mesh entities of given topological dimension

Parameters:dim (std::size_t) – (std::size_t) The topological dimension.
Return type:std::size_t
Returns:std::size_t The number of global incident MeshEntity objects of given dimension.
owner()

Get ownership of this entity - only really valid for cells

Return type:unsigned int
Returns:unsigned int Owning process
sharing_processes()

Return set of sharing processes

Return type:std::set< unsigned int >
Returns:std::set<unsigned int> List of sharing processes
str()

Return informal string representation (pretty-print)

Parameters:verbose (bool) – (bool) Flag to turn on additional output.
Return type:std::string
Returns:std::string An informal representation of the function space.
thisown

The membership flag