48 auto** nodes =
new Node*[nFaceNodes];
49 for (
unsigned j = 0; j < nFaceNodes; j++)
59 return new Quad(nodes);
61 ERR(
"Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
68 *_nodes[0], *_nodes[1], *_nodes[2], *_nodes[3]) +
70 *_nodes[1], *_nodes[4], *_nodes[2], *_nodes[3]) +
72 *_nodes[2], *_nodes[4], *_nodes[5], *_nodes[3]);
80 pnt, *nodes[0], *nodes[1], *nodes[2], *nodes[3], eps) ||
82 pnt, *nodes[1], *nodes[4], *nodes[2], *nodes[3], eps) ||
84 pnt, *nodes[2], *nodes[4], *nodes[5], *nodes[3], eps));
90 for (
unsigned i = 0; i < 5; i++)
93 for (
unsigned j = 0; j < 4; j++)
95 for (
unsigned k = 0; k < 3; k++)
109 return std::numeric_limits<unsigned>::max();
117 for (
unsigned i = 1; i < 4; ++i)
122 error_code |= quad->validate();
void ERR(char const *fmt, Args const &... args)
Definition of the Node class.
Definition of the Quad class.
Definition of the Tri class.
Collects error flags for mesh elements.
void set(ElementErrorFlag e)
Set a specific flag.
virtual const Node * getNode(unsigned idx) 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 ElementErrorCode validate(const Element *e)
static const unsigned face_nodes[5][4]
Constant: Local node index table for faces.
static const unsigned n_faces
Constant: The number of faces.
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
static const unsigned edge_nodes[9][2]
Constant: Local node index table for edge.
static double computeVolume(Node const *const *_nodes)
Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra.
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
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.
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::TriRule3 > Tri
TemplateElement< MeshLib::QuadRule4 > Quad