ug4
ug::Edge Class Reference

Base-class for edges. More...

#include <grid_base_objects.h>

+ Inheritance diagram for ug::Edge:

Public Types

typedef Edge grid_base_object
 
typedef Face higher_dim_base_object
 
typedef Vertex lower_dim_base_object
 
typedef Vertex side
 
typedef Face sideof
 
- Public Types inherited from ug::IVertexGroup
typedef Vertex *const * ConstVertexArray
 

Public Member Functions

virtual int base_object_id () const
 
virtual int container_section () const
 
bool get_opposing_side (Vertex *v, Vertex **vrtOut)
 retrieves the vertex on the opposing side to the specified one. More...
 
bool get_opposing_side (Vertex *v, VertexDescriptor &vrtOut)
 
uint num_sides () const
 
virtual ReferenceObjectID reference_object_id () const
 
virtual bool refine (std::vector< Edge * > &vNewEdgesOut, Vertex *newVertex, Vertex **pSubstituteVrts=NULL)
 
virtual ~Edge ()
 
- Public Member Functions inherited from ug::GridObject
virtual GridObjectcreate_empty_instance () const
 create an instance of the derived type More...
 
uint grid_data_index () const
 Returns the grid attachment data index of a geometric object. More...
 
virtual bool is_constrained () const
 returns true if the object is constrained by other objects. More...
 
virtual bool is_constraining () const
 returns the id of the reference-object. More...
 
virtual ~GridObject ()
 
virtual void remove_constraint_link (const Vertex *vrt)
 removes a constraint link to the grid object. More...
 
virtual void remove_constraint_link (const Edge *e)
 removes a constraint link to the grid object. More...
 
virtual void remove_constraint_link (const Face *f)
 removes a constraint link to the grid object. More...
 
- Public Member Functions inherited from ug::EdgeVertices
virtual size_t num_vertices () const
 
Vertexoperator[] (size_t index) const
 returns the i-th vertex. More...
 
size_t size () const
 returns the number of vertices. More...
 
virtual Vertexvertex (size_t index) const
 
virtual ConstVertexArray vertices () const
 
virtual ~EdgeVertices ()
 
- Public Member Functions inherited from ug::IVertexGroup
Vertexoperator[] (size_t index) const
 returns the i-th vertex. More...
 
size_t size () const
 returns the number of vertices. More...
 
virtual ~IVertexGroup ()
 

Static Public Member Functions

static bool type_match (GridObject *pObj)
 

Static Public Attributes

static const int BASE_OBJECT_ID = EDGE
 
static const bool CAN_BE_SIDE = true
 
static const int dim = 1
 reference dimension More...
 
static const bool HAS_SIDES = true
 
static const size_t NUM_VERTICES = 2
 

Protected Member Functions

void set_vertex (uint index, Vertex *pVrt)
 
- Protected Member Functions inherited from ug::GridObject
void set_grid_data_index (uint index)
 ATTENTION: Use this method with extreme care! More...
 
- Protected Member Functions inherited from ug::EdgeVertices
void assign_edge_vertices (const EdgeVertices &ev)
 

Friends

class Grid
 

Additional Inherited Members

- Protected Attributes inherited from ug::GridObject
uint m_gridDataIndex
 
- Protected Attributes inherited from ug::EdgeVertices
Vertexm_vertices [2]
 

Detailed Description

Base-class for edges.

Edge is the base class of all 1-dimensional geometric objects. Edges connect two vertices.

Member Typedef Documentation

◆ grid_base_object

◆ higher_dim_base_object

◆ lower_dim_base_object

◆ side

◆ sideof

Constructor & Destructor Documentation

◆ ~Edge()

virtual ug::Edge::~Edge ( )
inlinevirtual

Member Function Documentation

◆ base_object_id()

virtual int ug::Edge::base_object_id ( ) const
inlinevirtual

Implements ug::GridObject.

References ug::EDGE.

◆ container_section()

◆ get_opposing_side() [1/2]

bool ug::Edge::get_opposing_side ( Vertex v,
Vertex **  vrtOut 
)

retrieves the vertex on the opposing side to the specified one.

If the specified vertex is not part of the edge, false is returned. If it is, then vrtOut is filled with the opposing vertex and true is returned.

References ug::EdgeVertices::m_vertices.

Referenced by ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), and ug::GetOpposingSide().

◆ get_opposing_side() [2/2]

bool ug::Edge::get_opposing_side ( Vertex v,
VertexDescriptor vrtOut 
)

◆ num_sides()

uint ug::Edge::num_sides ( ) const
inline

◆ reference_object_id()

virtual ReferenceObjectID ug::Edge::reference_object_id ( ) const
inlinevirtual

A reference object represents a class of geometric objects. Tetrahedrons, Triangles etc are such classes. Reference ids should be defined in the file in which concrete geometric objects are defined.

Implements ug::GridObject.

Reimplemented in ug::ConstrainingEdge, ug::ConstrainedEdge, and ug::RegularEdge.

References ug::ROID_UNKNOWN.

◆ refine()

virtual bool ug::Edge::refine ( std::vector< Edge * > &  vNewEdgesOut,
Vertex newVertex,
Vertex **  pSubstituteVrts = NULL 
)
inlinevirtual

create 2 new edges, connecting the original edges end-points with vrtNew. Newly created edges have to be registered at a grid manually by the caller. If the caller does not register the edges in vGeomOut at a grid, he is responsible to free the associated memory (delete each element in vNewEdgesOut). Please note that refining an edge using this method does not automatically refine associated elements. Be sure to store the new edges in the right order. vNewEdgesOut should contain the edge connecting vertex(0) and newVertex first.

You may pass an array of 2 vertices to pSubstituteVrts. If you do so, Those vertices will be used instead of the original ones.

Reimplemented in ug::ConstrainingEdge, ug::ConstrainedEdge, and ug::RegularEdge.

Referenced by ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::Refine(), and ug::HangingNodeRefinerBase< TSelector >::refine_edge_with_normal_vertex().

◆ set_vertex()

void ug::Edge::set_vertex ( uint  index,
Vertex pVrt 
)
inlineprotected

◆ type_match()

static bool ug::Edge::type_match ( GridObject pObj)
inlinestatic

Friends And Related Function Documentation

◆ Grid

friend class Grid
friend

Member Data Documentation

◆ BASE_OBJECT_ID

const int ug::Edge::BASE_OBJECT_ID = EDGE
static

◆ CAN_BE_SIDE

const bool ug::Edge::CAN_BE_SIDE = true
static

◆ dim

const int ug::Edge::dim = 1
static

reference dimension

◆ HAS_SIDES

const bool ug::Edge::HAS_SIDES = true
static

◆ NUM_VERTICES

const size_t ug::Edge::NUM_VERTICES = 2
static

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