UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_prgrid3d.hpp
1 /* u3d_prgrid3d.hpp */
2 /* $Id: u3d_prgrid3d.hpp,v 1.4 2008/10/28 08:12:31 hasher Exp $ */
3 #ifndef __u3d_prgrid3d_hpp
4 #define __u3d_prgrid3d_hpp
5 
6 #include <mth/u3d_point4d.hpp>
7 #include "u3d_prgrid2d.hpp"
8 
14 {
15 public:
16 
18  U3dPRGrid3d(const U3dPoints4dAr &points, double g_step);
19 
21  U3dPRGrid3d(const U3dPRGrid3d &obj);
22 
24  virtual ~U3dPRGrid3d();
25 
26 
29  void construct(const U3dPoints4dAr &points, double g_step);
30 
31 
36  int getGridPoint(int i, int j, int k, U3dPoint4d &p) const;
37 
39  int getGridX1Size() const {
40  return grd_x1.size();
41  }
42 
44  int getGridX2Size() const {
45  return grd_x2.size();
46  }
47 
49  int getGridX3Size() const {
50  return grd_x3.size();
51  }
52 
55  void setMinGridStep(double eps) {
56  minGridEps = (eps < 0.)?(0.):(eps);
57  }
58 
61  double getMinGridStep() {
62  return minGridEps;
63  }
64 
67  virtual void getAreaSize(U3dPoint4d &min, U3dPoint4d &max);
68 
69 protected:
70 
75  {
76  public:
79 
81  virtual double calc(double x4);
82 
84  void setInitialPoints(U3dPoints4dAr &ips)
85  {m_ips = &ips;}
86 
88  void setPCoords(double px1, double px2, double px3)
89  {m_x1 = px1; m_x2 = px2; m_x3 = px3;}
90 
91  protected:
92 
94  U3dPoints4dAr *m_ips;
95 
97  double m_x1, m_x2, m_x3;
98  };
99 
101  struct Area4d
102  {
103  double x1mn, x1mx;
104  double x2mn, x2mx;
105  double x3mn, x3mx;
106  double x4mn, x4mx;
107  } area4d;
108 
110  std::vector<U3dPRGrid2d::GridMatrix> grid;
111 
113  std::vector<double> grd_x1, grd_x2, grd_x3;
114 
117  double minGridEps;
118 
121 
123  double m_prev_x4mn, m_prev_x4mx;
124 
126  U3dPoints4dAr m_ips;
127 
129  U3dPoints4dAr m_grd_ips;
130 
134 
137 
140  void push_ip(U3dPoint4d *point);
141 
146  void add_grid_cell(int ix1, int jx2, int kx3, U3dPRGrid2d::GridCell &cell);
147 
151  double calc_nip_x4(double x1, double x2, double x3);
152 
154  void clear();
155 };
156 
157 
158 #endif /* u3d_prgrid3d.hpp */
void construct(const U3dPoints4dAr &points, double g_step)
void setInitialPoints(U3dPoints4dAr &ips)
Definition: u3d_prgrid3d.hpp:84
double minGridEps
Definition: u3d_prgrid3d.hpp:117
Definition: u3d_prgrid3d.hpp:101
U3dPoints4dAr m_ips
Definition: u3d_prgrid3d.hpp:126
std::vector< double > grd_x1
Definition: u3d_prgrid3d.hpp:113
UEqDiv2Solve m_grd_eq_solver
Definition: u3d_prgrid3d.hpp:136
int getGridX3Size() const
Definition: u3d_prgrid3d.hpp:49
void add_grid_cell(int ix1, int jx2, int kx3, U3dPRGrid2d::GridCell &cell)
Definition: geometry.H:16
U3dPRGrid3d(const U3dPoints4dAr &points, double g_step)
U3dPoints4dAr m_grd_ips
Definition: u3d_prgrid3d.hpp:129
Definition: u3d_prgrid3d.hpp:13
Definition: u3d_point4d.hpp:11
double getMinGridStep()
Definition: u3d_prgrid3d.hpp:61
std::vector< U3dPRGrid2d::GridMatrix > grid
Definition: u3d_prgrid3d.hpp:110
int getGridX2Size() const
Definition: u3d_prgrid3d.hpp:44
double m_x1
Definition: u3d_prgrid3d.hpp:97
Definition: u3d_abstract_prgrid2d.hpp:116
void setPCoords(double px1, double px2, double px3)
Definition: u3d_prgrid3d.hpp:88
double m_prev_x4mn
Definition: u3d_prgrid3d.hpp:123
Definition: u_base_math.hpp:136
void setMinGridStep(double eps)
Definition: u3d_prgrid3d.hpp:55
U3dIntEq4dLeftPart m_grd_eq_lp
Definition: u3d_prgrid3d.hpp:133
Definition: u3d_prgrid3d.hpp:74
int m_grd_ip_num
Definition: u3d_prgrid3d.hpp:120
double calc_nip_x4(double x1, double x2, double x3)
virtual void getAreaSize(U3dPoint4d &min, U3dPoint4d &max)
U3dPoints4dAr * m_ips
Definition: u3d_prgrid3d.hpp:94
void clear()
Definition: u_base_math.hpp:88
int getGridPoint(int i, int j, int k, U3dPoint4d &p) const
int getGridX1Size() const
Definition: u3d_prgrid3d.hpp:39
virtual double calc(double x4)
virtual ~U3dPRGrid3d()
void push_ip(U3dPoint4d *point)