OGS
MeshLib::LinearEdgeReturn Class Reference

Detailed Description

Returns linear order edge.

Definition at line 30 of file EdgeReturn.h.

#include <EdgeReturn.h>

Static Public Member Functions

static const ElementgetEdge (const Element *e, unsigned i)
 Returns i-th edge of the given element.
 

Member Function Documentation

◆ getEdge()

const Element * MeshLib::LinearEdgeReturn::getEdge ( const Element * e,
unsigned i )
static

Returns i-th edge of the given element.

Definition at line 20 of file EdgeReturn.cpp.

21{
22 if (i < e->getNumberOfEdges())
23 {
24 auto** nodes = new Node*[2];
25 nodes[0] = const_cast<Node*>(e->getEdgeNode(i, 0));
26 nodes[1] = const_cast<Node*>(e->getEdgeNode(i, 1));
27 return new Line(nodes, e->getID());
28 }
29 ERR("Error in MeshLib::Element::getEdge() - Index does not exist.");
30 return nullptr;
31}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
TemplateElement< MeshLib::LineRule2 > Line
Definition Line.h:25

References ERR(), MeshLib::Element::getEdgeNode(), and MeshLib::Element::getID().


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