HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MeshND::MeshObject< space_dim, object_dim > Class Template Reference

Generic class to describe a cell, face, edge or vertex. More...

#include <MeshObject.hpp>

Public Member Functions

 MeshObject (size_t index, Simplices< space_dim, object_dim > simplices)
 Constructor for a MeshObject defined by its simplices.
 
 MeshObject (size_t index, Simplex< space_dim, object_dim > simplex)
 Constructor for a Simplex.
 
 MeshObject (size_t index, VectorRd< space_dim > vertex)
 Constructor for a MeshObject defined by a single coordinate (Vertex)
 
 MeshObject ()
 Null constructor.
 
 ~MeshObject ()
 Destructor.
 
size_t global_index () const
 Returns the global index of the MeshObject.
 
double diam () const
 Returns the diameter of the MeshObject.
 
VectorRd< space_dim > center_mass () const
 Returns the center mass of the MeshObject.
 
double measure () const
 
Simplices< space_dim, object_dim > get_simplices () const
 Returns the simplices making up the MeshObject.
 
Simplices< space_dim, object_dim > & set_simplices ()
 
void set_global_index (const size_t idx)
 Set the global index.
 
bool is_boundary () const
 Returns true if MeshObject is a boundary object, false otherwise.
 
void set_boundary (bool val)
 Set the boundary value of the MeshObject.
 
bool is_flat () const
 Returns true if MeshObject is flat (only relevant for faces), false otherwise.
 
std::vector< MeshObject< space_dim, 0 > * > get_vertices () const
 Returns the vertices of the MeshObject.
 
std::vector< MeshObject< space_dim, 1 > * > get_edges () const
 Returns the edges of the MeshObject.
 
std::vector< MeshObject< space_dim, space_dim - 1 > * > get_faces () const
 Returns the faces of the MeshObject.
 
std::vector< MeshObject< space_dim, space_dim > * > get_cells () const
 Return the cells of the MeshObject.
 
size_t n_vertices () const
 Returns the number of vertices of the MeshObject.
 
size_t n_edges () const
 Returns the number of edges of the MeshObject.
 
size_t n_faces () const
 Returns the number of faces of the MeshObject.
 
size_t n_cells () const
 Returns the number of cells of the MeshObject.
 
MeshObject< space_dim, 0 > * vertex (const size_t i) const
 Returns the i-th vertex of the MeshObject.
 
MeshObject< space_dim, 1 > * edge (const size_t i) const
 Returns the i-th edge of the MeshObject.
 
MeshObject< space_dim, space_dim - 1 > * face (const size_t i) const
 Returns the i-th face of the MeshObject.
 
MeshObject< space_dim, space_dim > * cell (const size_t i) const
 Returns the i-th cell of the MeshObject.
 
void add_vertex (MeshObject< space_dim, 0 > *vertex)
 Add a vertex to the MeshObject.
 
void add_edge (MeshObject< space_dim, 1 > *edge)
 Add an edge to the MeshObject.
 
void add_face (MeshObject< space_dim, space_dim - 1 > *face)
 Add a face to the MeshObject.
 
void add_cell (MeshObject< space_dim, space_dim > *cell)
 Add a cell to the MeshObject.
 
int index_vertex (const MeshObject< space_dim, 0 > *vertex) const
 Returns the local index of a vertex.
 
int index_edge (const MeshObject< space_dim, 1 > *edge) const
 Returns the local index of an edge.
 
int index_face (const MeshObject< space_dim, space_dim - 1 > *face) const
 Returns the local index of a face.
 
int index_cell (const MeshObject< space_dim, space_dim > *cell) const
 Returns the local index of a cell.
 
VectorRd< space_dim > coords () const
 Return the coordinates of a Vertex.
 
void set_coords (const VectorRd< space_dim > &x)
 Set the coordinates of a Vertex.
 
VectorRd< space_dim > face_normal (const size_t face_index) const
 Return the outer normal of a Cell towards the Face located at face_index.
 
VectorRd< space_dim > edge_normal (const size_t edge_index) const
 Return the edge normal of a 2D object.
 
int face_orientation (const size_t face_index) const
 Return the orientation of a Face.
 
int edge_orientation (const size_t edge_index) const
 Return the orientation of a Edge (multiplied by edge_normal, gives the outer normal to the face)
 
int induced_orientation (const size_t index) const
 Return 1 if the volume form on the boundary is positively oriented, -1 else.
 
VectorRd< space_dim > normal () const
 Return the normal of a Face.
 
VectorRd< space_dim > tangent () const
 Return the tangent of a Edge.
 
Eigen::Matrix< double, space_dim, 2 > face_tangent () const
 Return the tangent space of a Face.
 
void construct_face_orientations ()
 Set the directions of the face normals of a cell.
 

Detailed Description

template<size_t space_dim, size_t object_dim>
class MeshND::MeshObject< space_dim, object_dim >

Generic class to describe a cell, face, edge or vertex.

MeshObject is a templated class describing, in the most general sense, an object of a mesh. It takes in two template parameters: space_dim - the dimension of the space the object is embedded in, and object_dim - the dimension of the object itself.


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