UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_svrg_math_abstract_surf4d.hpp
1 /* u3d_svrg_math_abstract_surf4d.hpp */
2 /* $Id: u3d_svrg_math_abstract_surf4d.hpp,v 1.6 2008/09/29 10:39:28 ibadm Exp $ */
3 #ifndef __u3d_svrg_math_abstract_surf4d_hpp
4 #define __u3d_svrg_math_abstract_surf4d_hpp
5 
6 #include "u3d_svrg_math_abstract_surface.hpp"
7 
8 class U3dPoint4d;
9 
11 typedef std::vector<U3dPoint4d*> U3dPoints4dAr;
12 
13 //------------------------------------------------------------------------------------------
18 {
19 public:
22 
24  virtual double calc(double x4);
25 
27  void setInitialPoints(U3dPoints4dAr &ips)
28  {m_ips = &ips;}
29 
31  void setPCoords(double px1, double px2, double px3)
32  {m_x1 = px1; m_x2 = px2; m_x3 = px3;}
33 
34 protected:
35 
37  U3dPoints4dAr *m_ips;
38 
40  double m_x1, m_x2, m_x3;
41 };
42 
43 //------------------------------------------------------------------------------------------
51 {
52 public:
53 
55  U3dSVRGMathAbstractSurf4d(U3dPoints4dAr &points, double g_step);
56 
59 
62 
65  virtual bool getPoint(double p, double q, double r, U3dPoint4d &pnt) = 0;
66 
71  int getGridPoint(int i, int j, int k, U3dPoint4d &p);
72 
74  int getGridX1Size() {
75  return grd_x1.size();
76  }
77 
79  int getGridX2Size() {
80  return grd_x2.size();
81  }
82 
84  int getGridX3Size() {
85  return grd_x3.size();
86  }
87 
90  void setMinGridStep(double eps) {
91  minGridEps = (eps < 0.)?(0.):(eps);
92  }
93 
96  double getMinGridStep() {
97  return minGridEps;
98  }
99 
102  virtual void getAreaSize(U3dPoint4d &min, U3dPoint4d &max);
103 
104 protected:
105 
107  struct Area4d
108  {
109  double x1mn, x1mx;
110  double x2mn, x2mx;
111  double x3mn, x3mx;
112  double x4mn, x4mx;
113  } area4d;
114 
116  std::vector<U3dSVRGMathAbstractSurface::GridMatrix> grid;
117 
119  std::vector<double> grd_x1, grd_x2, grd_x3;
120 
123  double minGridEps;
124 
127 
129  double m_prev_x4mn, m_prev_x4mx;
130 
132  U3dPoints4dAr m_ips;
133 
135  U3dPoints4dAr m_grd_ips;
136 
140 
143 
146  void construct_grid(U3dPoints4dAr &points);
147 
150  void push_ip(U3dPoint4d *point);
151 
156  void add_grid_cell(int ix1, int jx2, int kx3, U3dSVRGMathAbstractSurface::GridCell &cell);
157 
161  double calc_nip_x4(double x1, double x2, double x3);
162 };
163 
164 //------------------------------------------------------------------------------------------
165 
169 class U3dPoint4d
170 {
171 public:
172 
175  m_x1 = m_x2 = m_x3 = m_x4 = 0.;
176  }
177 
179  U3dPoint4d(double x1, double x2, double x3, double x4);
180 
182  U3dPoint4d(const U3dPoint4d &p);
183 
184 
186  double getX1() { return m_x1;}
187 
189  double getX2() { return m_x2;}
190 
192  double getX3() { return m_x3;}
193 
195  double getX4() { return m_x4;}
196 
197 
199  void setX1(double x1) { m_x1 = x1;}
200 
202  void setX2(double x2) { m_x2 = x2;}
203 
205  void setX3(double x3) { m_x3 = x3;}
206 
208  void setX4(double x4) { m_x4 = x4;}
209 
211  void setCoords(double x1, double x2, double x3, double x4) {
212  m_x1 = x1;
213  m_x2 = x2;
214  m_x3 = x3;
215  m_x4 = x4;
216  }
217 
219  U3dPoint4d operator= (const U3dPoint4d& p);
220 
221 protected:
222 
224  double m_x1, m_x2, m_x3, m_x4;
225 };
226 
227 #endif /* u3d_svrg_math_abstract_surf4d.hpp */
void push_ip(U3dPoint4d *point)
double m_x1
Definition: u3d_point4d.hpp:63
void construct_grid(U3dPoints4dAr &points)
U3dPoint4d()
Definition: u3d_svrg_math_abstract_surf4d.hpp:174
void setX4(double x4)
Definition: u3d_svrg_math_abstract_surf4d.hpp:208
U3dSVRGMathAbstractSurf4d(const U3dSVRGMathAbstractSurf4d &surf)
Definition: u3d_svrg_math_abstract_surf4d.hpp:58
void setX2(double x2)
Definition: u3d_svrg_math_abstract_surf4d.hpp:202
void setInitialPoints(U3dPoints4dAr &ips)
Definition: u3d_svrg_math_abstract_surf4d.hpp:27
void setPCoords(double px1, double px2, double px3)
Definition: u3d_svrg_math_abstract_surf4d.hpp:31
double calc_nip_x4(double x1, double x2, double x3)
void setCoords(double x1, double x2, double x3, double x4)
Definition: u3d_svrg_math_abstract_surf4d.hpp:211
std::vector< double > grd_x1
Definition: u3d_svrg_math_abstract_surf4d.hpp:119
U3dPoints4dAr * m_ips
Definition: u3d_svrg_math_abstract_surf4d.hpp:37
Definition: geometry.H:16
void setMinGridStep(double eps)
Definition: u3d_svrg_math_abstract_surf4d.hpp:90
std::vector< U3dSVRGMathAbstractSurface::GridMatrix > grid
Definition: u3d_svrg_math_abstract_surf4d.hpp:116
double minGridEps
Definition: u3d_svrg_math_abstract_surf4d.hpp:123
Definition: u3d_point4d.hpp:11
void add_grid_cell(int ix1, int jx2, int kx3, U3dSVRGMathAbstractSurface::GridCell &cell)
double getMinGridStep()
Definition: u3d_svrg_math_abstract_surf4d.hpp:96
Definition: u3d_svrg_math_abstract_surf4d.hpp:107
int getGridPoint(int i, int j, int k, U3dPoint4d &p)
double m_x1
Definition: u3d_svrg_math_abstract_surf4d.hpp:40
U3dIntEq4dLeftPart m_grd_eq_lp
Definition: u3d_svrg_math_abstract_surf4d.hpp:139
void setX3(double x3)
Definition: u3d_svrg_math_abstract_surf4d.hpp:205
U3dPoints4dAr m_grd_ips
Definition: u3d_svrg_math_abstract_surf4d.hpp:135
U3dPoints4dAr m_ips
Definition: u3d_svrg_math_abstract_surf4d.hpp:132
virtual double calc(double x4)
double getX2()
Definition: u3d_svrg_math_abstract_surf4d.hpp:189
Definition: u3d_nl_eqsolve.hpp:47
Definition: u3d_svrg_math_abstract_surf4d.hpp:50
double m_prev_x4mn
Definition: u3d_svrg_math_abstract_surf4d.hpp:129
Definition: u3d_nl_eqsolve.hpp:5
U3dEqDiv2Solve m_grd_eq_solver
Definition: u3d_svrg_math_abstract_surf4d.hpp:142
Definition: u3d_svrg_math_abstract_surf4d.hpp:17
virtual bool getPoint(double p, double q, double r, U3dPoint4d &pnt)=0
double getX3()
Definition: u3d_svrg_math_abstract_surf4d.hpp:192
int getGridX2Size()
Definition: u3d_svrg_math_abstract_surf4d.hpp:79
U3dPoint4d operator=(const U3dPoint4d &p)
int m_grd_ip_num
Definition: u3d_svrg_math_abstract_surf4d.hpp:126
U3dSVRGMathAbstractSurf4d(U3dPoints4dAr &points, double g_step)
double getX4()
Definition: u3d_svrg_math_abstract_surf4d.hpp:195
int getGridX1Size()
Definition: u3d_svrg_math_abstract_surf4d.hpp:74
int getGridX3Size()
Definition: u3d_svrg_math_abstract_surf4d.hpp:84
virtual ~U3dSVRGMathAbstractSurf4d()
void setX1(double x1)
Definition: u3d_svrg_math_abstract_surf4d.hpp:199
double getX1()
Definition: u3d_svrg_math_abstract_surf4d.hpp:186
Definition: u3d_svrg_math_abstract_surface.hpp:95
virtual void getAreaSize(U3dPoint4d &min, U3dPoint4d &max)