CMS 3D CMS Logo

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