51 std::array<Node*, 4> nodes{};
52 for (
unsigned j = 0; j < 4; j++)
58 ERR(
"Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
65 *_nodes[4], *_nodes[7], *_nodes[5], *_nodes[0]) +
67 *_nodes[5], *_nodes[3], *_nodes[1], *_nodes[0]) +
69 *_nodes[5], *_nodes[7], *_nodes[3], *_nodes[0]) +
71 *_nodes[5], *_nodes[7], *_nodes[6], *_nodes[2]) +
73 *_nodes[1], *_nodes[3], *_nodes[5], *_nodes[2]) +
75 *_nodes[3], *_nodes[7], *_nodes[5], *_nodes[2]);
83 pnt, *nodes[4], *nodes[7], *nodes[5], *nodes[0], eps) ||
85 pnt, *nodes[5], *nodes[3], *nodes[1], *nodes[0], eps) ||
87 pnt, *nodes[5], *nodes[7], *nodes[3], *nodes[0], eps) ||
89 pnt, *nodes[5], *nodes[7], *nodes[6], *nodes[2], eps) ||
91 pnt, *nodes[1], *nodes[3], *nodes[5], *nodes[2], eps) ||
93 pnt, *nodes[3], *nodes[7], *nodes[5], *nodes[2], eps));
98 for (
unsigned i = 0; i < 6; i++)
101 for (
unsigned j = 0; j < 4; j++)
103 for (
unsigned k = 0; k < 3; k++)
116 return std::numeric_limits<unsigned>::max();
124 for (
unsigned i = 0; i < 6; ++i)
126 if (error_code.all())
Definition of the Line class.
void ERR(char const *fmt, Args const &... args)
Definition of the Node class.
Definition of the Quad class.
Collects error flags for mesh elements.
virtual const Node * getNode(unsigned idx) const =0
virtual ElementErrorCode validate() const =0
virtual bool testElementNodeOrder() const =0
virtual const Element * getFace(unsigned i) const =0
Returns the i-th face of the element.
virtual std::size_t getID() const final
Returns the ID of the element.
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
static unsigned identifyFace(Node const *const *, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
static const unsigned edge_nodes[12][2]
Constant: Local node index table for edge.
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
static double computeVolume(Node const *const *_nodes)
Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra.
static ElementErrorCode validate(const Element *e)
static const unsigned face_nodes[6][4]
Constant: Local node index table for faces.
static const unsigned n_faces
Constant: The number of faces.
double calcTetrahedronVolume(MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, MathLib::Point3d const &d)
bool isPointInTetrahedron(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, MathLib::Point3d const &d, double eps)
bool hasZeroVolume(MeshLib::Element const &element)
Returns true if the element has zero length/area/volume.
TemplateElement< MeshLib::QuadRule4 > Quad