DOLFIN
DOLFIN C++ interface
Public Member Functions | Protected Attributes | Friends | List of all members
dolfin::MeshEntity Class Reference

#include <MeshEntity.h>

Inheritance diagram for dolfin::MeshEntity:
Inheritance graph
[legend]
Collaboration diagram for dolfin::MeshEntity:
Collaboration graph
[legend]

Public Member Functions

 MeshEntity ()
 Default Constructor.
 
 MeshEntity (const Mesh &mesh, std::size_t dim, std::size_t index)
 
virtual ~MeshEntity ()
 Destructor.
 
void init (const Mesh &mesh, std::size_t dim, std::size_t index)
 
bool operator== (const MeshEntity &e) const
 
bool operator!= (const MeshEntity &e) const
 
const Meshmesh () const
 
std::size_t dim () const
 
std::size_t index () const
 
std::int64_t global_index () const
 
std::size_t num_entities (std::size_t dim) const
 
std::size_t num_global_entities (std::size_t dim) const
 
const unsigned int * entities (std::size_t dim) const
 
std::size_t mesh_id () const
 
bool incident (const MeshEntity &entity) const
 
std::size_t index (const MeshEntity &entity) const
 
Point midpoint () const
 
bool is_ghost () const
 
std::set< unsigned int > sharing_processes () const
 
bool is_shared () const
 
unsigned int owner () const
 
std::string str (bool verbose) const
 

Protected Attributes

Mesh const * _mesh
 
std::size_t _dim
 
std::size_t _local_index
 

Friends

class MeshEntityIterator
 
template<typename T >
class MeshEntityIteratorBase
 
class SubsetIterator
 

Detailed Description

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

Constructor & Destructor Documentation

◆ MeshEntity()

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

Constructor

Parameters
mesh(Mesh) The mesh.
dim(std::size_t) The topological dimension.
index(std::size_t) The index.

Member Function Documentation

◆ dim()

std::size_t dolfin::MeshEntity::dim ( ) const
inline

Return topological dimension

Returns
std::size_t The dimension.

◆ entities()

const unsigned int* dolfin::MeshEntity::entities ( std::size_t  dim) const
inline

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

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

◆ global_index()

std::int64_t dolfin::MeshEntity::global_index ( ) const
inline

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

◆ incident()

bool MeshEntity::incident ( const MeshEntity entity) const

Check if given entity is incident

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

◆ index() [1/2]

std::size_t dolfin::MeshEntity::index ( ) const
inline

Return index of mesh entity

Returns
std::size_t The index.

◆ index() [2/2]

std::size_t MeshEntity::index ( const MeshEntity entity) const

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

Parameters
entity(MeshEntity) The mesh entity.
Returns
std::size_t The local index of given entity.

◆ init()

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

Initialize mesh entity with given data

Parameters
mesh(Mesh) The mesh.
dim(std::size_t) The topological dimension.
index(std::size_t) The index.

◆ is_ghost()

bool dolfin::MeshEntity::is_ghost ( ) const
inline

Determine whether an entity is a 'ghost' from another process

Returns
bool True if entity is a ghost entity

◆ is_shared()

bool dolfin::MeshEntity::is_shared ( ) const
inline

Determine if an entity is shared or not

Returns
bool True if entity is shared

◆ mesh()

const Mesh& dolfin::MeshEntity::mesh ( ) const
inline

Return mesh associated with mesh entity

Returns
Mesh The mesh.

◆ mesh_id()

std::size_t dolfin::MeshEntity::mesh_id ( ) const
inline

Return unique mesh ID

Returns
std::size_t The unique mesh ID.

◆ midpoint()

Point MeshEntity::midpoint ( ) const

Compute midpoint of cell

Returns
Point The midpoint of the cell.

◆ num_entities()

std::size_t dolfin::MeshEntity::num_entities ( std::size_t  dim) const
inline

Return local number of incident mesh entities of given topological dimension

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

◆ num_global_entities()

std::size_t dolfin::MeshEntity::num_global_entities ( std::size_t  dim) const
inline

Return global number of incident mesh entities of given topological dimension

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

◆ operator!=()

bool dolfin::MeshEntity::operator!= ( const MeshEntity e) const
inline

Comparison Operator

Parameters
e(MeshEntity) Another mesh entity.
Returns
bool True if the two mesh entities are NOT equal.

◆ operator==()

bool dolfin::MeshEntity::operator== ( const MeshEntity e) const
inline

Comparison Operator

Parameters
e(MeshEntity) Another mesh entity
Returns
bool True if the two mesh entities are equal.

◆ owner()

unsigned int MeshEntity::owner ( ) const

Get ownership of this entity - only really valid for cells

Returns
unsigned int Owning process

◆ sharing_processes()

std::set<unsigned int> dolfin::MeshEntity::sharing_processes ( ) const
inline

Return set of sharing processes

Returns
std::set<unsigned int> List of sharing processes

◆ str()

std::string MeshEntity::str ( bool  verbose) const

Return informal string representation (pretty-print)

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

The documentation for this class was generated from the following files: