44 if (i < e->getNumberOfFaces())
47 auto** nodes =
new Node*[nFaceNodes];
48 for (
unsigned j = 0; j < nFaceNodes; j++)
60 ERR(
"Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
67 *_nodes[0], *_nodes[1], *_nodes[2], *_nodes[4]) +
69 *_nodes[2], *_nodes[3], *_nodes[0], *_nodes[4]);
77 pnt, *nodes[0], *nodes[1], *nodes[2], *nodes[4], eps) ||
79 pnt, *nodes[0], *nodes[2], *nodes[3], *nodes[4], eps));
85 for (
unsigned i = 0; i < 5; i++)
88 for (
unsigned j = 0; j < 4; j++)
90 for (
unsigned k = 0; k < 3; k++)
104 return std::numeric_limits<unsigned>::max();
112 std::unique_ptr<MeshLib::Quad const>
const base{
116 error_code |= base->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 bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
static const unsigned face_nodes[5][4]
Constant: Local node index table for faces.
static unsigned identifyFace(Node const *const *, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
static double computeVolume(Node const *const *_nodes)
Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra.
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
static ElementErrorCode validate(const Element *e)
static const unsigned edge_nodes[8][2]
Constant: Local node index table for edge.
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