OGS
MeshLib::LinearEdgeReturn Class Reference

Detailed Description

Returns linear order edge.

Definition at line 23 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 13 of file EdgeReturn.cpp.

14{
15 if (i < e->getNumberOfEdges())
16 {
17 auto** nodes = new Node*[2];
18 nodes[0] = const_cast<Node*>(e->getEdgeNode(i, 0));
19 nodes[1] = const_cast<Node*>(e->getEdgeNode(i, 1));
20 return new Line(nodes, e->getID());
21 }
22 ERR("Error in MeshLib::Element::getEdge() - Index does not exist.");
23 return nullptr;
24}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
TemplateElement< MeshLib::LineRule2 > Line
Definition Line.h:14

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


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