OGS
TetRule10.cpp
Go to the documentation of this file.
1
11#include "TetRule10.h"
12
13#include <array>
14
15#include "BaseLib/Logging.h"
16#include "MeshLib/Node.h"
17#include "Tri.h"
18
19namespace MeshLib
20{
21const Element* TetRule10::getFace(const Element* e, unsigned i)
22{
23 if (i < n_faces)
24 {
25 std::array<Node*, 6> nodes{};
26 for (unsigned j = 0; j < 6; j++)
27 {
28 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
29 }
30 return new Tri6(nodes, e->getID());
31 }
32 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
33 return nullptr;
34}
35
36} // end namespace MeshLib
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
Definition of the Node class.
Definition of the Tri class.
virtual const Node * getNode(unsigned idx) const =0
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:91
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition TetRule10.cpp:21
static constexpr const unsigned face_nodes[4][6]
Constant: Local node index table for faces.
Definition TetRule10.h:51
static const unsigned n_faces
Constant: The number of faces.
Definition TetRule.h:30
TemplateElement< MeshLib::TriRule6 > Tri6
Definition Tri.h:27