CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VectorFieldInterpolation.h
Go to the documentation of this file.
1 #ifndef VectorFieldInterpolation_H
2 #define VectorFieldInterpolation_H
3 
19 // ***************************************************************
20 // by droll (19/07/03)
21 //
22 // basic equation (1D example): y = y0 + (x-x0)/(x1-x0)*(y1-y0)
23 // find field value y at point x
24 // corner points x0 and x1 with field values
25 // field values y0 and y1 at points x0 and x1
26 //
27 // input should be organized like in the following sketch
28 // 3D interpolation cell (example Cartesian coordinates):
29 //
30 // (011) *-------------------* (111)
31 // /| /|
32 // / | / |
33 // / | / |
34 // / | / |
35 // / | / |
36 // / | / |
37 // (010) *-------------------* (110)|
38 // | | | |
39 // | | | |
40 // |(001) *------------|------* (101)
41 // | / | /
42 // | / | /
43 // | / | /
44 // | / | /
45 // | / | /
46 // |/ |/
47 // (000) *-------------------* (100)
48 //
49 // 1. iteration: interpolation cell -> interpolation plane
50 //
51 // 2. iteration: interpolation plane -> interpolation line
52 //
53 // 3. iteration: interpolation line -> interpolation at SC[3]
54 //
55 // ***************************************************************
56 
58 public:
59  // constructor
61  // destructor
63 
64 private:
65  // spatial coordinates, where the field has to be calculated
66  // X1 , X2 , X3
67  double SC[3]; // {0.0 ,0.0 ,0.0 };
68 
69  // values describing the 8 corners of an interpolation cell
70  // 6 dimensions: 3 space dimensions + 3 field dimensions
71  // X1 , X2 , X3 , F1 , F2 , F3
72  double CellPoint000[6]; // {0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 };
73  double CellPoint100[6];
74  double CellPoint010[6];
75  double CellPoint110[6];
76  double CellPoint001[6];
77  double CellPoint101[6];
78  double CellPoint011[6];
79  double CellPoint111[6];
80 
81  // 3 components of the interpolated vector field at spatial coordinates SC
82  // F1 , F2 , F3
83  double VF[3]; // {0.0 , 0.0 , 0.0 };
84 
85 
86 public:
87  // Accessors
89  void defineCellPoint000(double X1, double X2, double X3, double F1, double F2, double F3);
90  void defineCellPoint100(double X1, double X2, double X3, double F1, double F2, double F3);
91  void defineCellPoint010(double X1, double X2, double X3, double F1, double F2, double F3);
92  void defineCellPoint110(double X1, double X2, double X3, double F1, double F2, double F3);
93  void defineCellPoint001(double X1, double X2, double X3, double F1, double F2, double F3);
94  void defineCellPoint101(double X1, double X2, double X3, double F1, double F2, double F3);
95  void defineCellPoint011(double X1, double X2, double X3, double F1, double F2, double F3);
96  void defineCellPoint111(double X1, double X2, double X3, double F1, double F2, double F3);
98  void putSCoordGetVField(double X1, double X2, double X3, double &F1, double &F2, double &F3);
99 };
100 
101 #endif
void defineCellPoint100(double X1, double X2, double X3, double F1, double F2, double F3)
void defineCellPoint110(double X1, double X2, double X3, double F1, double F2, double F3)
void defineCellPoint101(double X1, double X2, double X3, double F1, double F2, double F3)
void putSCoordGetVField(double X1, double X2, double X3, double &F1, double &F2, double &F3)
receive the interpolated field (out) at any point in space (in)
void defineCellPoint010(double X1, double X2, double X3, double F1, double F2, double F3)
void defineCellPoint111(double X1, double X2, double X3, double F1, double F2, double F3)
void defineCellPoint000(double X1, double X2, double X3, double F1, double F2, double F3)
provide the interpolation algorithm with 8 points, where the field is known (in)
void defineCellPoint001(double X1, double X2, double X3, double F1, double F2, double F3)
void defineCellPoint011(double X1, double X2, double X3, double F1, double F2, double F3)