MeshEntity.h

Note

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

class MeshEntity

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

MeshEntity()

Default Constructor

MeshEntity(const Mesh &mesh, std::size_t dim, std::size_t index)

Constructor

@param mesh (Mesh)
The mesh.
@param dim (std::size_t)
The topological dimension.
@param index (std::size_t)
The index.
void init(const Mesh &mesh, std::size_t dim, std::size_t index)

Initialize mesh entity with given data

@param mesh (Mesh)
The mesh.
@param dim (std::size_t)
The topological dimension.
@param index (std::size_t)
The index.
bool operator==(const MeshEntity &e) const

Comparison Operator

@param e (MeshEntity)
Another mesh entity
@return bool
True if the two mesh entities are equal.
bool operator!=(const MeshEntity &e) const

Comparison Operator

@param e (MeshEntity)
Another mesh entity.
@return bool
True if the two mesh entities are NOT equal.
const Mesh &mesh() const

Return mesh associated with mesh entity

@return Mesh
The mesh.
std::size_t dim() const

Return topological dimension

@return std::size_t
The dimension.
std::size_t index() const

Return index of mesh entity

@return std::size_t
The index.
std::int64_t global_index() const

Return global index of mesh entity

@return std::size_t
The global index. Set to std::numerical_limits<std::size_t>::max() if global index has not been computed
std::size_t num_entities(std::size_t dim) const

Return local number of incident mesh entities of given topological dimension

@param dim (std::size_t)
The topological dimension.

@return std::size_t The number of local incident MeshEntity objects of given dimension.

std::size_t num_global_entities(std::size_t dim) const

Return global number of incident mesh entities of given topological dimension

@param dim (std::size_t)
The topological dimension.
@return std::size_t
The number of global incident MeshEntity objects of given dimension.
const unsigned int *entities(std::size_t dim) const

Return array of indices for incident mesh entities of given topological dimension

@param dim (std::size_t)
The topological dimension.
@return std::size_t
The index for incident mesh entities of given dimension.
std::size_t mesh_id() const

Return unique mesh ID

@return std::size_t
The unique mesh ID.
bool incident(const MeshEntity &entity) const

Check if given entity is incident

@param entity (MeshEntity)
The entity.
@return bool
True if the given entity is incident
std::size_t index(const MeshEntity &entity) const

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

@param entity (MeshEntity)
The mesh entity.
@return std::size_t
The local index of given entity.
Point midpoint() const

Compute midpoint of cell

@return Point
The midpoint of the cell.
bool is_ghost() const

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

True if entity is a ghost entity
std::set<unsigned int> sharing_processes() const

Return set of sharing processes @return std::set<unsigned int>

List of sharing processes
bool is_shared() const

Determine if an entity is shared or not @return bool

True if entity is shared
unsigned int owner() const

Get ownership of this entity - only really valid for cells @return unsigned int

Owning process
std::string str(bool verbose) const

Return informal string representation (pretty-print)

@param verbose (bool)
Flag to turn on additional output.
@return std::string
An informal representation of the function space.