.. Documentation for the header file dolfin/mesh/MeshEntity.h .. _programmers_reference_cpp_mesh_meshentity: MeshEntity.h ============ .. note:: The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded. .. cpp:class:: MeshEntity A MeshEntity represents a mesh entity associated with a specific topological dimension of some :cpp:class:`Mesh`. .. cpp:function:: MeshEntity() Default Constructor .. cpp:function:: MeshEntity(const Mesh& mesh, std::size_t dim, std::size_t index) Constructor @param mesh (:cpp:class:`Mesh`) The mesh. @param dim (std::size_t) The topological dimension. @param index (std::size_t) The index. .. cpp:function:: void init(const Mesh& mesh, std::size_t dim, std::size_t index) Initialize mesh entity with given data @param mesh (:cpp:class:`Mesh`) The mesh. @param dim (std::size_t) The topological dimension. @param index (std::size_t) The index. .. cpp:function:: bool operator==(const MeshEntity& e) const Comparison Operator @param e (MeshEntity) Another mesh entity @return bool True if the two mesh entities are equal. .. cpp:function:: 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. .. cpp:function:: const Mesh& mesh() const Return mesh associated with mesh entity @return Mesh The mesh. .. cpp:function:: std::size_t dim() const Return topological dimension @return std::size_t The dimension. .. cpp:function:: std::size_t index() const Return index of mesh entity @return std::size_t The index. .. cpp:function:: std::int64_t global_index() const Return global index of mesh entity @return std::size_t The global index. Set to std::numerical_limits::max() if global index has not been computed .. cpp:function:: 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. .. cpp:function:: 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. .. cpp:function:: 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. .. cpp:function:: std::size_t mesh_id() const Return unique mesh ID @return std::size_t The unique mesh ID. .. cpp:function:: bool incident(const MeshEntity& entity) const Check if given entity is incident @param entity (:cpp:class:`MeshEntity`) The entity. @return bool True if the given entity is incident .. cpp:function:: std::size_t index(const MeshEntity& entity) const Compute local index of given incident entity (error if not found) @param entity (:cpp:class:`MeshEntity`) The mesh entity. @return std::size_t The local index of given entity. .. cpp:function:: Point midpoint() const Compute midpoint of cell @return Point The midpoint of the cell. .. cpp:function:: bool is_ghost() const Determine whether an entity is a 'ghost' from another process @return bool True if entity is a ghost entity .. cpp:function:: std::set sharing_processes() const Return set of sharing processes @return std::set List of sharing processes .. cpp:function:: bool is_shared() const Determine if an entity is shared or not @return bool True if entity is shared .. cpp:function:: unsigned int owner() const Get ownership of this entity - only really valid for cells @return unsigned int Owning process .. cpp:function:: 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.