ABLATE Source Documentation  0.12.34
triangle.hpp
1 #ifndef ABLATELIBRARY_TRIANGLE_HPP
2 #define ABLATELIBRARY_TRIANGLE_HPP
3 
4 #include <array>
5 #include "cylinderShell.hpp"
6 
7 namespace ablate::mathFunctions::geom {
8 
12 class Triangle : public Geometry {
13  private:
17  std::array<double, 3> point1 = {0, 0, 0};
18  std::array<double, 3> point2 = {0, 0, 0};
19  std::array<double, 3> point3 = {0, 0, 0};
20 
22  const double maxDistance;
23 
27  std::array<double, 3> sideNorm1 = {0, 0, 0};
28  std::array<double, 3> sideNorm2 = {0, 0, 0};
29  std::array<double, 3> sideNorm3 = {0, 0, 0};
30  std::array<double, 3> triangleNorm = {0, 0, 0};
31 
32  public:
33  Triangle(std::vector<double> pt0, std::vector<double> pt1, std::vector<double> pt2, double maxDistance = {}, const std::shared_ptr<mathFunctions::MathFunction>& insideValues = {},
34  const std::shared_ptr<mathFunctions::MathFunction>& outsideValues = {});
35 
36  bool InsideGeometry(const double* xyz, const int& ndims, const double& time) const override;
37 };
38 
39 } // namespace ablate::mathFunctions::geom
40 #endif // ABLATELIBRARY_TRIANGLE_HPP
Definition: geometry.hpp:9
Definition: triangle.hpp:12
bool InsideGeometry(const double *xyz, const int &ndims, const double &time) const override
Definition: triangle.cpp:44