bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::utils::geom::MeshTopology< spacedim > Class Template Reference

#include <mesh_topology.h>

Public Types

typedef std::vector< MeshConnectivity >::iterator element_connectivity_iterator
 
typedef element_traits< Element< spacedim > >::edge_ptr_t edge_ptr_t
 
typedef element_traits< Element< spacedim > >::face_ptr_t face_ptr_t
 
typedef element_traits< Element< spacedim > >::cedge_ptr_t cedge_ptr_t
 
typedef element_traits< Element< spacedim > >::cface_ptr_t cface_ptr_t
 
typedef std::vector< Node< spacedim > * >::iterator node_iterator
 
typedef std::vector< Node< spacedim > * >::const_iterator const_node_iterator
 
typedef std::vector< Element< spacedim > * >::iterator element_iterator
 
typedef std::vector< Element< spacedim > * >::const_iterator const_element_iterator
 
typedef std::vector< edge_ptr_t >::iterator edge_iterator
 
typedef std::vector< edge_ptr_t >::const_iterator const_edge_iterator
 
typedef std::vector< face_ptr_t >::iterator face_iterator
 
typedef std::vector< face_ptr_t >::const_iterator const_face_iterator
 

Public Member Functions

 MeshTopology ()
 Constructor.
 
 ~MeshTopology ()
 Constructor.
 
void reserve_n_nodes (uint_t n)
 reserve memory for n nodes
 
void reserve_n_elements (uint_t n)
 reserve memory for n elements
 
void reserve_n_edges (uint_t n)
 reserve memory for n edges
 
void reserve_n_faces (uint_t n)
 reserve memory for n edges
 
Node< spacedim > * add_node (Node< spacedim > *n)
 add a new node to the mesh and get back the pointer
 
Element< spacedim > * add_element (Element< spacedim > *e)
 add a new element in the mesh and get back the pointer
 
edge_ptr_t add_edge (edge_ptr_t edge)
 add a new edge in the mesh and get back the pointer
 
face_ptr_t add_face (face_ptr_t face)
 add a new face in the mesh and get back the pointer
 
void clear_topology_nodes ()
 delete the nodes of the topology
 
void clear_topology_elements ()
 delete the elements of the topology
 
void clear_topology_edges ()
 delete the edges of the topology
 
void clear_topology_faces ()
 delete the faces of the topology
 
void clear_topology ()
 clear the topology
 
uint_t n_nodes () const
 get the number of nodes in the mesh
 
uint_t n_elements () const
 get the number of elements in the mesh
 
uint_t n_edges () const
 get the number of edges in the mesh
 
uint_t n_faces () const
 get the number of edges in the mesh
 
Node< spacedim > * node (uint_t i)
 read/write access to the i-th node of the mesh
 
const Node< spacedim > * node (uint_t i) const
 read access to the i-th node of the mesh
 
Element< spacedim > * element (uint_t i)
 read/write access to the i-th element of the mesh
 
const Element< spacedim > * element (uint_t i) const
 read access to the i-th element of the mesh
 
edge_ptr_t edge (uint_t i)
 
face_ptr_t face (uint_t f)
 
void faces (const MeshConnectivity &faces_idx, std::vector< cface_ptr_t > &faces_ptr) const
 
node_iterator nodes_begin ()
 
node_iterator nodes_end ()
 
const_node_iterator nodes_begin () const
 
const_node_iterator nodes_end () const
 
element_iterator elements_begin ()
 
element_iterator elements_end ()
 
const_element_iterator elements_begin () const
 
const_element_iterator elements_end () const
 
edge_iterator edges_begin ()
 
edge_iterator edges_end ()
 
const_edge_iterator edges_begin () const
 
const_edge_iterator edges_end () const
 
face_iterator faces_begin ()
 
face_iterator faces_end ()
 
const_face_iterator faces_begin () const
 
const_face_iterator faces_end () const
 
void clear_topology_edges ()
 
void clear_topology_faces ()
 
MeshTopology< 1 >::edge_ptr_t edge (uint_t i)
 
MeshTopology< 1 >::face_ptr_t face (uint_t i)
 
MeshTopology< 1 >::edge_ptr_t add_edge (MeshTopology< 1 >::edge_ptr_t edge)
 
MeshTopology< 1 >::face_ptr_t add_face (MeshTopology< 1 >::face_ptr_t face)
 
void faces (const MeshConnectivity &faces_idx, std::vector< MeshTopology< 1 >::cface_ptr_t > &faces_ptr) const
 
void clear_topology_edges ()
 
void clear_topology_faces ()
 
MeshTopology< 2 >::edge_ptr_t edge (uint_t i)
 
MeshTopology< 2 >::face_ptr_t face (uint_t i)
 
MeshTopology< 2 >::edge_ptr_t add_edge (MeshTopology< 2 >::edge_ptr_t edge)
 
MeshTopology< 2 >::face_ptr_t add_face (MeshTopology< 2 >::face_ptr_t face)
 
void faces (const MeshConnectivity &faces_idx, std::vector< MeshTopology< 2 >::cface_ptr_t > &faces_ptr) const
 
MeshTopology< 2 >::face_iterator faces_begin ()
 
MeshTopology< 2 >::face_iterator faces_end ()
 
MeshTopology< 2 >::const_face_iterator faces_begin () const
 
MeshTopology< 2 >::const_face_iterator faces_end () const
 
void reserve_n_faces (uint_t n)
 
uint_t n_faces () const
 

Detailed Description

template<int spacedim>
class bitrl::utils::geom::MeshTopology< spacedim >

MeshTopology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relations for the mesh entities). Note that the mesh entities don't need to be stored, only the number of entities and the connectivity.

A mesh entity e may be identified globally as a pair e = (dim, i), where dim is the topological dimension and i is the index of the entity within that topological dimension.

As a minimum we assume that we know the nodes of the elements in the mesh

Member Typedef Documentation

◆ cedge_ptr_t

template<int spacedim>
typedef element_traits<Element<spacedim>>::cedge_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::cedge_ptr_t

◆ cface_ptr_t

template<int spacedim>
typedef element_traits<Element<spacedim>>::cface_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::cface_ptr_t

◆ const_edge_iterator

template<int spacedim>
typedef std::vector<edge_ptr_t>::const_iterator bitrl::utils::geom::MeshTopology< spacedim >::const_edge_iterator

◆ const_element_iterator

template<int spacedim>
typedef std::vector<Element<spacedim>*>::const_iterator bitrl::utils::geom::MeshTopology< spacedim >::const_element_iterator

◆ const_face_iterator

template<int spacedim>
typedef std::vector<face_ptr_t>::const_iterator bitrl::utils::geom::MeshTopology< spacedim >::const_face_iterator

◆ const_node_iterator

template<int spacedim>
typedef std::vector<Node<spacedim>*>::const_iterator bitrl::utils::geom::MeshTopology< spacedim >::const_node_iterator

◆ edge_iterator

template<int spacedim>
typedef std::vector<edge_ptr_t>::iterator bitrl::utils::geom::MeshTopology< spacedim >::edge_iterator

◆ edge_ptr_t

template<int spacedim>
typedef element_traits<Element<spacedim>>::edge_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::edge_ptr_t

◆ element_connectivity_iterator

template<int spacedim>
typedef std::vector<MeshConnectivity>::iterator bitrl::utils::geom::MeshTopology< spacedim >::element_connectivity_iterator

◆ element_iterator

template<int spacedim>
typedef std::vector<Element<spacedim>*>::iterator bitrl::utils::geom::MeshTopology< spacedim >::element_iterator

◆ face_iterator

template<int spacedim>
typedef std::vector<face_ptr_t>::iterator bitrl::utils::geom::MeshTopology< spacedim >::face_iterator

◆ face_ptr_t

template<int spacedim>
typedef element_traits<Element<spacedim>>::face_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::face_ptr_t

◆ node_iterator

template<int spacedim>
typedef std::vector<Node<spacedim>*>::iterator bitrl::utils::geom::MeshTopology< spacedim >::node_iterator

Constructor & Destructor Documentation

◆ MeshTopology()

template<int spacedim>
bitrl::utils::geom::MeshTopology< spacedim >::MeshTopology ( )
inline

Constructor.

◆ ~MeshTopology()

Constructor.

Member Function Documentation

◆ add_edge() [1/3]

template<int spacedim>
edge_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::add_edge ( edge_ptr_t  edge)

add a new edge in the mesh and get back the pointer

◆ add_edge() [2/3]

◆ add_edge() [3/3]

◆ add_element()

template<int spacedim>
Element< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::add_element ( Element< spacedim > *  e)

add a new element in the mesh and get back the pointer

◆ add_face() [1/3]

template<int spacedim>
face_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::add_face ( face_ptr_t  face)

add a new face in the mesh and get back the pointer

◆ add_face() [2/3]

◆ add_face() [3/3]

◆ add_node()

template<int spacedim>
Node< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::add_node ( Node< spacedim > *  n)

add a new node to the mesh and get back the pointer

◆ clear_topology()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::clear_topology ( )

clear the topology

◆ clear_topology_edges() [1/3]

void bitrl::utils::geom::MeshTopology< 1 >::clear_topology_edges ( )

◆ clear_topology_edges() [2/3]

void bitrl::utils::geom::MeshTopology< 2 >::clear_topology_edges ( )

◆ clear_topology_edges() [3/3]

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::clear_topology_edges ( )

delete the edges of the topology

◆ clear_topology_elements()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::clear_topology_elements ( )

delete the elements of the topology

◆ clear_topology_faces() [1/3]

void bitrl::utils::geom::MeshTopology< 1 >::clear_topology_faces ( )

◆ clear_topology_faces() [2/3]

void bitrl::utils::geom::MeshTopology< 2 >::clear_topology_faces ( )

◆ clear_topology_faces() [3/3]

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::clear_topology_faces ( )

delete the faces of the topology

◆ clear_topology_nodes()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::clear_topology_nodes ( )

delete the nodes of the topology

◆ edge() [1/3]

◆ edge() [2/3]

◆ edge() [3/3]

template<int spacedim>
edge_ptr_t bitrl::utils::geom::MeshTopology< spacedim >::edge ( uint_t  i)

\detailed read/write access to the i-th edge of the mesh

◆ edges_begin() [1/2]

template<int spacedim>
MeshTopology< spacedim >::edge_iterator bitrl::utils::geom::MeshTopology< spacedim >::edges_begin ( )
inline

◆ edges_begin() [2/2]

template<int spacedim>
MeshTopology< spacedim >::const_edge_iterator bitrl::utils::geom::MeshTopology< spacedim >::edges_begin ( ) const
inline

◆ edges_end() [1/2]

template<int spacedim>
MeshTopology< spacedim >::edge_iterator bitrl::utils::geom::MeshTopology< spacedim >::edges_end ( )
inline

◆ edges_end() [2/2]

template<int spacedim>
MeshTopology< spacedim >::const_edge_iterator bitrl::utils::geom::MeshTopology< spacedim >::edges_end ( ) const
inline

◆ element() [1/2]

template<int spacedim>
Element< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::element ( uint_t  i)
inline

read/write access to the i-th element of the mesh

◆ element() [2/2]

template<int spacedim>
const Element< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::element ( uint_t  i) const
inline

read access to the i-th element of the mesh

◆ elements_begin() [1/2]

template<int spacedim>
element_iterator bitrl::utils::geom::MeshTopology< spacedim >::elements_begin ( )
inline

◆ elements_begin() [2/2]

template<int spacedim>
const_element_iterator bitrl::utils::geom::MeshTopology< spacedim >::elements_begin ( ) const
inline

◆ elements_end() [1/2]

template<int spacedim>
element_iterator bitrl::utils::geom::MeshTopology< spacedim >::elements_end ( )
inline

◆ elements_end() [2/2]

template<int spacedim>
const_element_iterator bitrl::utils::geom::MeshTopology< spacedim >::elements_end ( ) const
inline

◆ face() [1/3]

\detailed read/write access to the i-th face of the mesh

◆ face() [2/3]

◆ face() [3/3]

◆ faces() [1/3]

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::faces ( const MeshConnectivity faces_idx,
std::vector< cface_ptr_t > &  faces_ptr 
) const

\detailed get the faces described by the given indices

◆ faces() [2/3]

void bitrl::utils::geom::MeshTopology< 1 >::faces ( const MeshConnectivity faces_idx,
std::vector< MeshTopology< 1 >::cface_ptr_t > &  faces_ptr 
) const

◆ faces() [3/3]

void bitrl::utils::geom::MeshTopology< 2 >::faces ( const MeshConnectivity faces_idx,
std::vector< MeshTopology< 2 >::cface_ptr_t > &  faces_ptr 
) const

◆ faces_begin() [1/4]

template<int spacedim>
MeshTopology< spacedim >::face_iterator bitrl::utils::geom::MeshTopology< spacedim >::faces_begin ( )
inline

◆ faces_begin() [2/4]

◆ faces_begin() [3/4]

template<int spacedim>
MeshTopology< spacedim >::const_face_iterator bitrl::utils::geom::MeshTopology< spacedim >::faces_begin ( ) const
inline

◆ faces_begin() [4/4]

◆ faces_end() [1/4]

template<int spacedim>
MeshTopology< spacedim >::face_iterator bitrl::utils::geom::MeshTopology< spacedim >::faces_end ( )
inline

◆ faces_end() [2/4]

◆ faces_end() [3/4]

template<int spacedim>
MeshTopology< spacedim >::const_face_iterator bitrl::utils::geom::MeshTopology< spacedim >::faces_end ( ) const
inline

◆ faces_end() [4/4]

◆ n_edges()

template<int spacedim>
uint_t bitrl::utils::geom::MeshTopology< spacedim >::n_edges ( ) const
inline

get the number of edges in the mesh

◆ n_elements()

template<int spacedim>
uint_t bitrl::utils::geom::MeshTopology< spacedim >::n_elements ( ) const
inline

get the number of elements in the mesh

◆ n_faces() [1/2]

template<int spacedim>
uint_t bitrl::utils::geom::MeshTopology< spacedim >::n_faces ( ) const
inline

get the number of edges in the mesh

◆ n_faces() [2/2]

uint_t bitrl::utils::geom::MeshTopology< 2 >::n_faces ( ) const
inline

◆ n_nodes()

template<int spacedim>
uint_t bitrl::utils::geom::MeshTopology< spacedim >::n_nodes ( ) const
inline

get the number of nodes in the mesh

◆ node() [1/2]

template<int spacedim>
Node< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::node ( uint_t  i)
inline

read/write access to the i-th node of the mesh

◆ node() [2/2]

template<int spacedim>
const Node< spacedim > * bitrl::utils::geom::MeshTopology< spacedim >::node ( uint_t  i) const
inline

read access to the i-th node of the mesh

◆ nodes_begin() [1/2]

template<int spacedim>
node_iterator bitrl::utils::geom::MeshTopology< spacedim >::nodes_begin ( )
inline

◆ nodes_begin() [2/2]

template<int spacedim>
const_node_iterator bitrl::utils::geom::MeshTopology< spacedim >::nodes_begin ( ) const
inline

◆ nodes_end() [1/2]

template<int spacedim>
node_iterator bitrl::utils::geom::MeshTopology< spacedim >::nodes_end ( )
inline

◆ nodes_end() [2/2]

template<int spacedim>
const_node_iterator bitrl::utils::geom::MeshTopology< spacedim >::nodes_end ( ) const
inline

◆ reserve_n_edges()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::reserve_n_edges ( uint_t  n)
inline

reserve memory for n edges

◆ reserve_n_elements()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::reserve_n_elements ( uint_t  n)
inline

reserve memory for n elements

◆ reserve_n_faces() [1/2]

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::reserve_n_faces ( uint_t  n)
inline

reserve memory for n edges

◆ reserve_n_faces() [2/2]

void bitrl::utils::geom::MeshTopology< 2 >::reserve_n_faces ( uint_t  n)
inline

◆ reserve_n_nodes()

template<int spacedim>
void bitrl::utils::geom::MeshTopology< spacedim >::reserve_n_nodes ( uint_t  n)
inline

reserve memory for n nodes


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