OGS
FaceRule.cpp
Go to the documentation of this file.
1
11#include "FaceRule.h"
12
13#include <Eigen/Geometry>
14
15#include "Element.h"
16#include "MathLib/MathTools.h"
17#include "MeshLib/Node.h"
18
19namespace MeshLib
20{
22{
23 return getSurfaceNormal(e)[2] < 0;
24}
25
27{
28 Eigen::Vector3d const v =
30 return v;
31}
32
34{
35 Eigen::Vector3d const v =
37 return v;
38}
39
40Eigen::Vector3d FaceRule::getSurfaceNormal(Element const& e)
41{
42 Eigen::Vector3d const u = getFirstSurfaceVector(e);
43 Eigen::Vector3d const v = getSecondSurfaceVector(e);
44 return u.cross(v);
45}
46
47} // namespace MeshLib
Definition of the Element class.
Definition of the Node class.
Eigen::Vector3d const & asEigenVector3d() const
Definition Point3d.h:64
virtual const Node * getNode(unsigned idx) const =0
static bool testElementNodeOrder(Element const &e)
Definition FaceRule.cpp:21
static Eigen::Vector3d getSecondSurfaceVector(Element const &e)
Definition FaceRule.cpp:33
static Eigen::Vector3d getFirstSurfaceVector(Element const &e)
Definition FaceRule.cpp:26
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
Definition FaceRule.cpp:40