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

Arguments
mesh (Mesh)
The mesh.
dim (std::size_t)
The topological dimension.
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

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

Comparison Operator

Arguments
another (MeshEntity)
Another mesh entity
Returns
bool
True if the two mesh entities are equal.
bool operator!=(const MeshEntity &e) const

Comparison Operator

Arguments
another (MeshEntity)
Another mesh entity.
Returns
bool
True if the two mesh entities are NOT equal.
const Mesh &mesh() const

Return mesh associated with mesh entity

Returns
Mesh
The mesh.
std::size_t dim() const

Return topological dimension

Returns
std::size_t
The dimension.
std::size_t index() const

Return index of mesh entity

Returns
std::size_t
The index.
std::int64_t global_index() const

Return global index of mesh entity

Returns
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

Arguments
dim (std::size_t)
The topological dimension.
Returns
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

Arguments
dim (std::size_t)
The topological dimension.
Returns
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

Arguments
dim (std::size_t)
The topological dimension.
Returns
std::size_t
The index for incident mesh entities of given dimension.
std::size_t mesh_id() const

Return unique mesh ID

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

Check if given entity is incident

Arguments
entity (MeshEntity)
The entity.
Returns
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)

Arguments
entity (MeshEntity)
The mesh entity.
Returns
std::size_t
The local index of given entity.
Point midpoint() const

Compute midpoint of cell

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

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

std::set<unsigned int> sharing_processes() const

Return set of sharing processes

bool is_shared() const

Determine if an entity is shared or not

unsigned int owner() const

Get ownership of this entity - only really valid for cells

std::string str(bool verbose) const

Return informal string representation (pretty-print)

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