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

#include <quad_element.h>

Inheritance diagram for bitrl::utils::geom::Quad< 2 >:
Collaboration diagram for bitrl::utils::geom::Quad< 2 >:

Public Types

typedef Element< 2 >::node_ptr_t node_ptr_t
 
typedef Element< 2 >::neighbor_ptr_t neighbor_ptr_t
 
typedef Element< 2 >::neighbor_ref_t neighbor_ref_t
 
typedef Element< 2 >::edge_ptr_t edge_ptr_t
 
typedef Element< 2 >::cedge_ptr_t cedge_ptr_t
 
typedef Element< 2 >::edge_ref_t edge_ref_t
 
typedef Element< 2 >::cedge_ref_t cedge_ref_t
 
typedef Element< 2 >::face_ptr_t face_ptr_t
 
typedef Element< 2 >::cface_ptr_t cface_ptr_t
 
typedef Element< 2 >::face_ref_t face_ref_t
 
typedef Element< 2 >::cface_ref_t cface_ref_t
 
- Public Types inherited from bitrl::utils::geom::Element< 2 >
typedef Element< dim > * neighbor_ptr_t
 
typedef Element< dim > & neighbor_ref_t
 
typedef const Element< dim > & cneighbor_ref_t
 
typedef Node< dim > * node_ptr_t
 
typedef element_traits< Element< dim > >::edge_ptr_t edge_ptr_t
 
typedef element_traits< Element< dim > >::cedge_ptr_t cedge_ptr_t
 
typedef element_traits< Element< dim > >::edge_ref_t edge_ref_t
 
typedef element_traits< Element< dim > >::cedge_ref_t cedge_ref_t
 
typedef element_traits< Element< dim > >::face_ptr_t face_ptr_t
 
typedef element_traits< Element< dim > >::cface_ptr_t cface_ptr_t
 
typedef element_traits< Element< dim > >::face_ref_t face_ref_t
 
typedef element_traits< Element< dim > >::cface_ref_t cface_ref_t
 

Public Member Functions

 Quad (uint_t nnodes=4)
 ctor
 
 Quad (uint_t id, uint_t pid, const std::any &data, uint_t n=4)
 Constructor.
 
virtual uint_t n_nodes () const override final
 Returns the total number of nodes for the element.
 
virtual uint_t n_vertices () const override final
 A quad has 4 vertices independent of the dimension.
 
virtual uint_t n_neighbors () const override final
 A quad has 4 neighbors independent of the dimension.
 
virtual void resize_faces ()
 Resize the space for the faces.
 
virtual void set_face (uint_t f, face_ptr_t face) override final
 Set the f-th face of the element.
 
virtual uint_t n_faces () const final
 A quad has 4 sides independent of the dimension.
 
virtual cface_ref_t get_face (uint_t f) const override
 Returns the f-face.
 
virtual face_ref_t get_face (uint_t f) override
 Returns the f-face.
 
virtual uint_t n_edges () const final
 A quad has 4 edges independent of the dimension.
 
virtual void face_vertices (uint_t f, std::vector< uint_t > &ids) const override
 Returns the node ids of the vertices of the given face.
 
virtual real_t volume () const override final
 Returns the volume of the element.
 
virtual uint_t which_face_am_i (cface_ref_t face) const override final
 Returns the local id relevant to the calling object of the passed object.
 
virtual const DynVec< real_tface_normal_vector (uint_t f) const override final
 Returns the face normal vector.
 
- Public Member Functions inherited from bitrl::utils::geom::Element< 2 >
virtual ~Element ()
 Destructor.
 
virtual void set_node (uint_t i, node_ptr_t node)
 Set the i-th node.
 
virtual void append_node (node_ptr_t node)
 Append a node to the nodes list.
 
virtual void resize_nodes ()
 Reserve space for nodes.
 
virtual node_ptr_t get_node (uint_t n)
 Returns the i-th node.
 
virtual void set_face (uint_t f, face_ptr_t face)=0
 Set the f-th face of the element.
 
virtual void set_neighbor (uint_t n, neighbor_ptr_t neigh)
 Set the i-th neighbor.
 
virtual void resize_neighbors ()
 Reserve space for neighbors.
 
virtual cneighbor_ref_t get_neighbor (uint_t n) const
 Access the n-th neighbor.
 
virtual neighbor_ptr_t neighbor_ptr (uint_t n)
 Access the n-th neighbor pointer.
 
virtual const neighbor_ptr_t neighbor_ptr (uint_t n) const
 Access the n-th neighbor pointer.
 
virtual GeomPoint< dim > centroid () const
 Returns the average location of the vertices of the element.
 
virtual uint_t which_face_am_i (cface_ref_t face) const=0
 Returns the local id relevant to the calling object of the passed object.
 
uint_t which_neighbor_am_i (const Element< dim > &element) const
 Returns the local id relevant to the calling object of the passed object.
 
std::vector< node_ptr_tget_vertices () const
 Return the vertices of the element.
 
- Public Member Functions inherited from bitrl::utils::geom::MeshEntity
 MeshEntity ()
 Constructor.
 
 MeshEntity (uint_t id, uint_t pid, const std::any &data)
 Constructor.
 
uint_t get_id () const
 Returns the id of the element.
 
void set_id (uint_t id)
 Set the id of the element.
 
uint_t get_pid () const
 Returns the id of the element.
 
void set_pid (uint_t id)
 Set the id of the element.
 
bool has_valid_id () const
 
bool is_active () const
 
void set_active_flag (bool f)
 

Additional Inherited Members

- Protected Member Functions inherited from bitrl::utils::geom::Element< 2 >
 Element ()
 Constructor.
 
 Element (uint_t id, uint_t pid)
 Constructor.
 
 Element (uint_t id, uint_t pid, const std::any &data)
 Constructor.
 
- Protected Attributes inherited from bitrl::utils::geom::Element< 2 >
std::vector< neighbor_ptr_tneginbors_
 The neighbors of the element.
 
std::vector< node_ptr_tnodes_
 The nodes of the element.
 

Member Typedef Documentation

◆ cedge_ptr_t

typedef Element<2>::cedge_ptr_t bitrl::utils::geom::Quad< 2 >::cedge_ptr_t

◆ cedge_ref_t

typedef Element<2>::cedge_ref_t bitrl::utils::geom::Quad< 2 >::cedge_ref_t

◆ cface_ptr_t

typedef Element<2>::cface_ptr_t bitrl::utils::geom::Quad< 2 >::cface_ptr_t

◆ cface_ref_t

typedef Element<2>::cface_ref_t bitrl::utils::geom::Quad< 2 >::cface_ref_t

◆ edge_ptr_t

typedef Element<2>::edge_ptr_t bitrl::utils::geom::Quad< 2 >::edge_ptr_t

◆ edge_ref_t

typedef Element<2>::edge_ref_t bitrl::utils::geom::Quad< 2 >::edge_ref_t

◆ face_ptr_t

typedef Element<2>::face_ptr_t bitrl::utils::geom::Quad< 2 >::face_ptr_t

◆ face_ref_t

typedef Element<2>::face_ref_t bitrl::utils::geom::Quad< 2 >::face_ref_t

◆ neighbor_ptr_t

typedef Element<2>::neighbor_ptr_t bitrl::utils::geom::Quad< 2 >::neighbor_ptr_t

◆ neighbor_ref_t

typedef Element<2>::neighbor_ref_t bitrl::utils::geom::Quad< 2 >::neighbor_ref_t

◆ node_ptr_t

typedef Element<2>::node_ptr_t bitrl::utils::geom::Quad< 2 >::node_ptr_t

Constructor & Destructor Documentation

◆ Quad() [1/2]

bitrl::utils::geom::Quad< 2 >::Quad ( uint_t  nnodes = 4)
explicit

ctor

◆ Quad() [2/2]

bitrl::utils::geom::Quad< 2 >::Quad ( uint_t  id,
uint_t  pid,
const std::any &  data,
uint_t  n = 4 
)
explicit

Constructor.

Member Function Documentation

◆ face_normal_vector()

const DynVec< real_t > bitrl::utils::geom::Quad< 2 >::face_normal_vector ( uint_t  f) const
finaloverridevirtual

Returns the face normal vector.

right side of the quadrilateral

top side of the quadrilateral

left side of the quadrilateral

Implements bitrl::utils::geom::Element< 2 >.

◆ face_vertices()

void bitrl::utils::geom::Quad< 2 >::face_vertices ( uint_t  f,
std::vector< uint_t > &  ids 
) const
overridevirtual

Returns the node ids of the vertices of the given face.

Implements bitrl::utils::geom::Element< 2 >.

◆ get_face() [1/2]

Quad< 2 >::cface_ref_t bitrl::utils::geom::Quad< 2 >::get_face ( uint_t  f) const
overridevirtual

Returns the f-face.

Implements bitrl::utils::geom::Element< 2 >.

◆ get_face() [2/2]

Quad< 2 >::face_ref_t bitrl::utils::geom::Quad< 2 >::get_face ( uint_t  f)
overridevirtual

Returns the f-face.

Implements bitrl::utils::geom::Element< 2 >.

◆ n_edges()

virtual uint_t bitrl::utils::geom::Quad< 2 >::n_edges ( ) const
inlinefinalvirtual

A quad has 4 edges independent of the dimension.

Implements bitrl::utils::geom::Element< 2 >.

◆ n_faces()

virtual uint_t bitrl::utils::geom::Quad< 2 >::n_faces ( ) const
inlinefinalvirtual

A quad has 4 sides independent of the dimension.

Implements bitrl::utils::geom::Element< 2 >.

◆ n_neighbors()

virtual uint_t bitrl::utils::geom::Quad< 2 >::n_neighbors ( ) const
inlinefinaloverridevirtual

A quad has 4 neighbors independent of the dimension.

Implements bitrl::utils::geom::Element< 2 >.

◆ n_nodes()

virtual uint_t bitrl::utils::geom::Quad< 2 >::n_nodes ( ) const
inlinefinaloverridevirtual

Returns the total number of nodes for the element.

Implements bitrl::utils::geom::Element< 2 >.

◆ n_vertices()

virtual uint_t bitrl::utils::geom::Quad< 2 >::n_vertices ( ) const
inlinefinaloverridevirtual

A quad has 4 vertices independent of the dimension.

Implements bitrl::utils::geom::Element< 2 >.

◆ resize_faces()

void bitrl::utils::geom::Quad< 2 >::resize_faces ( )
virtual

Resize the space for the faces.

Implements bitrl::utils::geom::Element< 2 >.

◆ set_face()

void bitrl::utils::geom::Quad< 2 >::set_face ( uint_t  f,
face_ptr_t  face 
)
finaloverridevirtual

Set the f-th face of the element.

◆ volume()

real_t bitrl::utils::geom::Quad< 2 >::volume ( ) const
finaloverridevirtual

Returns the volume of the element.

Implements bitrl::utils::geom::Element< 2 >.

◆ which_face_am_i()

uint_t bitrl::utils::geom::Quad< 2 >::which_face_am_i ( cface_ref_t  face) const
finaloverridevirtual

Returns the local id relevant to the calling object of the passed object.


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