Template Class Mesh

Inheritance Relationships

Base Type

  • private boost::noncopyable

Class Documentation

template<int spacedim>
class Mesh : private boost::noncopyable

A class that represents a mesh.

Public Types

typedef MeshTopology<spacedim>::edge_ptr_t edge_ptr_t
typedef MeshTopology<spacedim>::face_ptr_t face_ptr_t
typedef MeshTopology<spacedim>::cedge_ptr_t cedge_ptr_t
typedef MeshTopology<spacedim>::cface_ptr_t cface_ptr_t
typedef std::vector<Node<spacedim>*>::iterator node_iterator_impl

Node iteration.

typedef std::vector<Node<spacedim>*>::const_iterator cnode_iterator_impl
typedef std::vector<Element<spacedim>*>::iterator element_iterator_impl

Element iteration.

typedef std::vector<Element<spacedim>*>::const_iterator celement_iterator_impl
typedef std::vector<edge_ptr_t>::iterator edge_iterator_impl

Edge iteration.

typedef std::vector<edge_ptr_t>::const_iterator cedge_iterator_impl
typedef std::vector<face_ptr_t>::iterator face_iterator_impl

Face iteration.

typedef std::vector<face_ptr_t>::const_iterator cface_iterator_impl

Public Functions

Mesh()

Constructor. Creates an empty Mesh.

virtual ~Mesh()

dtor

inline void reserve_n_nodes(uint_t n)
inline void reserve_n_elements(uint_t n)
inline void reserve_n_edges(uint_t n)
inline void reserve_n_faces(uint_t n)
Node<spacedim> *create_vertex(const GeomPoint<spacedim, real_t> &point, uint_t global_id = bitrl::consts::INVALID_ID, uint_t pid = 0)

\detailed create a vertex by passing in the coordinates of the vertex. This will create a Node so optionally we can pass in the global id and the processor id of the created node

Node<spacedim> *create_node(const GeomPoint<spacedim, real_t> &point, uint_t global_id = bitrl::consts::INVALID_ID, uint_t pid = 0)

\detailed create a Node

Element<spacedim> *create_element(ElementType::sub_type t, uint_t global_id = bitrl::consts::INVALID_ID, uint_t pid = 0)

\detailed create an Element and get back the pointer

edge_ptr_t create_edge(ElementType::sub_type t, uint_t global_id = bitrl::consts::INVALID_ID, uint_t pid = 0)

\detailed create an edge and get back the pointer

face_ptr_t create_face(ElementType::sub_type t, uint_t global_id = bitrl::consts::INVALID_ID, uint_t pid = 0)

\detailed create a face and get back the pointer

inline void set_n_boundaries(uint_t nb)

\detailed set the number of boundaries for the mesh

inline Node<spacedim> *node(uint_t n)

\detailed read/write acces to the n-th node

inline const Node<spacedim> *node(uint_t n) const

\detailed read acces to the n-th node

inline Element<spacedim> *element(uint_t e)

\detailed read/write access to the n-th element

inline const Element<spacedim> *element(uint_t e) const

\detailed read access to the n-th element

uint_t n_vertices() const

\detailed how many vertices the mesh has

inline uint_t n_nodes() const

\detailed how many nodes the mesh has

inline uint_t n_elements() const

\detailed how many elements the mesh has

inline uint_t n_edges() const

How many edges the mesh has.

inline uint_t n_faces() const

how many faces the mesh has

uint_t n_active_faces() const

get the active faces of the mesh

inline MeshTopology<spacedim> *topology()

Return read/write access to the topology of the mesh.

inline const MeshTopology<spacedim> *topology() const

Read access to the topology of the mesh.

inline void faces(const MeshConnectivity &faces_idx, std::vector<cface_ptr_t> &faces_ptr) const

Get the pointers to the faces described by the given MeshConnectivity.

inline uint_t n_boundaries() const

Get the number of boundaries of the mesh.

inline node_iterator_impl nodes_begin()

Raw node iteration.

inline node_iterator_impl nodes_end()
inline cnode_iterator_impl nodes_begin() const

Raw node iteration.

inline cnode_iterator_impl nodes_end() const
inline element_iterator_impl elements_begin()

Raw elements iteration.

inline element_iterator_impl elements_end()
inline celement_iterator_impl elements_begin() const

Raw elements iteration.

inline celement_iterator_impl elements_end() const
inline edge_iterator_impl edges_begin()

Raw faces iteration.

inline edge_iterator_impl edges_end()
inline cedge_iterator_impl edges_begin() const

Raw faces iteration.

inline cedge_iterator_impl edges_end() const
inline face_iterator_impl faces_begin()

Raw faces iteration.

inline face_iterator_impl faces_end()
inline cface_iterator_impl faces_begin() const

Raw faces iteration.

inline cface_iterator_impl faces_end() const
inline uint_t n_edges() const
inline uint_t n_faces() const

Public Static Attributes

static const int dimension = spacedim