HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Public Member Functions | List of all members
HArDCore2D::Edge Class Reference

The Edge class provides description of an edge. More...

#include <edge.hpp>

Public Member Functions

 Edge (size_t iE, std::vector< size_t > vertices, Mesh *mesh, Cell *cell)
 
size_t global_index () const
 returns the edge global index
 
size_t n_cells () const
 returns the number of cells neighbouring the edge
 
std::vector< Cell * > get_cells () const
 list of cells that are neighbours of the edge
 
std::vector< Vertex * > get_vertices () const
 list of vertices of the edge
 
Cellcell (size_t i) const
 returns pointer to the i-th cell neighbour of the edge
 
Vertexvertex (size_t i) const
 returns a pointer to the i-th vertex of the edge
 
double measure () const
 length of the edge More...
 
double diam () const
 length of the edge More...
 
Vector2d center_mass () const
 get the midpoint of the edge
 
Vector2d tangent () const
 get the tangent to the edge
 
bool is_boundary () const
 getter to see if edge is boundary edge
 
void add_cell (Cell *cell)
 Add a new cell to the edge.
 
void set_global_index (size_t idx)
 Set the global index of the edge to idx. Used to re-index the edges, should essentially only be used inside Mesh::renum.
 

Detailed Description

The Edge class provides description of an edge.

Constructor & Destructor Documentation

◆ Edge()

Edge::Edge ( size_t  iE,
std::vector< size_t >  vertices,
Mesh mesh,
Cell cell 
)

A class representing an edge of a 2D mesh. Contains a pointer to the mesh, as well as to the vertices and cells connected to that edge Default constructor

Parameters
iEglobal edge number
verticeslist of vertices making up edge
meshpointer to the mesh
cellpointer to the cell the edge belongs to

Member Function Documentation

◆ diam()

double Edge::diam ( ) const

length of the edge

Measure and diameter are the same for an edge, but for consistency with the way schemes are usually defined, we provide two functions. For translation of each scheme's code to 3D (with edges becoming faces), it is better to use the proper one depending if the measure or diameter is expected

◆ measure()

double Edge::measure ( ) const

length of the edge

Measure and diameter are the same for an edge, but for consistency with the way schemes are usually defined, we provide two functions. For translation of each scheme's code to 3D (with edges becoming faces), it is better to use the proper one depending if the measure or diameter is expected


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