physical_geometry.hpp
Go to the documentation of this file.
1 
6 #ifndef PHYSICAL_GEOMETRY_HPP
7 #define PHYSICAL_GEOMETRY_HPP 1
8 
9 #ifdef _MSC_VER
10 #define _USE_MATH_DEFINES
11 #endif
12 #include <cmath>
13 #include <vector>
14 #include "../../tessellation/Edge.hpp"
15 
16 using std::vector;
17 
20 {
21 public:
22 
27  virtual double calcArea(const Edge& edge) const = 0;
28 
33  virtual double calcVolume(const vector<Edge>& edge_list) const = 0;
34 
39  virtual double calcVolume(const vector<Vector2D>& chull) const = 0;
40 
45  virtual Vector2D calcCentroid(const vector<Vector2D>& chull) const = 0;
46 
47  virtual ~PhysicalGeometry(void);
48 };
49 
52 {
53 public:
54 
56  SlabSymmetry(void);
57 
58  double calcArea(const Edge& edge) const;
59 
60  double calcVolume(const vector<Edge>& edge_list) const;
61 
62  double calcVolume(const vector<Vector2D>& chull) const;
63 
64  Vector2D calcCentroid(const vector<Vector2D>& chull) const;
65 };
66 
68 class Axis
69 {
70 public:
71 
74 
77 
82  Axis(const Vector2D& origin_i,
83  const Vector2D& direction_i);
84 };
85 
88 {
89 public:
90 
95  CylindricalSymmetry(const Vector2D& origin,
96  const Vector2D& direction);
97 
98  double calcArea(const Edge& edge) const;
99 
100  double calcVolume(const vector<Edge>& edge_list) const;
101 
102  double calcVolume(const vector<Vector2D>& chull) const;
103 
104  Vector2D calcCentroid(const vector<Vector2D>& chull) const;
105 
109  const Axis& getAxis(void) const;
110 
111 private:
112  const Axis axis_;
113 };
114 
115 #endif // PHYSICAL_GEOMETRY_HPP
Slab symmetry.
virtual double calcArea(const Edge &edge) const =0
Calculates the physical area of an edge.
virtual double calcVolume(const vector< Edge > &edge_list) const =0
Calculates the physical volume of a cell.
Interface between two cells.
Definition: Edge.hpp:13
Axis of revolution.
const Vector2D direction
Positive direction of the axis.
virtual Vector2D calcCentroid(const vector< Vector2D > &chull) const =0
Calculates the centroid of a cell.
const Vector2D origin
Origin of the axis.
2D Mathematical vector
Definition: geometry.hpp:15
Cylindrical symmetry.
Base class for physical geometry.