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 public:
83  // Accessors
85  void defineCellPoint000(double X1, double X2, double X3, double F1, double F2, double F3);
86  void defineCellPoint100(double X1, double X2, double X3, double F1, double F2, double F3);
87  void defineCellPoint010(double X1, double X2, double X3, double F1, double F2, double F3);
88  void defineCellPoint110(double X1, double X2, double X3, double F1, double F2, double F3);
89  void defineCellPoint001(double X1, double X2, double X3, double F1, double F2, double F3);
90  void defineCellPoint101(double X1, double X2, double X3, double F1, double F2, double F3);
91  void defineCellPoint011(double X1, double X2, double X3, double F1, double F2, double F3);
92  void defineCellPoint111(double X1, double X2, double X3, double F1, double F2, double F3);
94  void putSCoordGetVField(double X1, double X2, double X3, double &F1, double &F2, double &F3);
95 };
96 
97 #endif
VectorFieldInterpolation
Definition: VectorFieldInterpolation.h:54
VectorFieldInterpolation::~VectorFieldInterpolation
~VectorFieldInterpolation()
Definition: VectorFieldInterpolation.h:59
VectorFieldInterpolation::defineCellPoint011
void defineCellPoint011(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:64
VectorFieldInterpolation::VF
double VF[3]
Definition: VectorFieldInterpolation.h:80
VectorFieldInterpolation::CellPoint111
double CellPoint111[6]
Definition: VectorFieldInterpolation.h:76
VectorFieldInterpolation::CellPoint000
double CellPoint000[6]
Definition: VectorFieldInterpolation.h:69
VectorFieldInterpolation::putSCoordGetVField
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)
Definition: VectorFieldInterpolation.cc:84
VectorFieldInterpolation::CellPoint110
double CellPoint110[6]
Definition: VectorFieldInterpolation.h:72
VectorFieldInterpolation::defineCellPoint100
void defineCellPoint100(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:14
VectorFieldInterpolation::defineCellPoint111
void defineCellPoint111(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:74
VectorFieldInterpolation::defineCellPoint000
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)
Definition: VectorFieldInterpolation.cc:4
VectorFieldInterpolation::defineCellPoint110
void defineCellPoint110(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:34
VectorFieldInterpolation::CellPoint101
double CellPoint101[6]
Definition: VectorFieldInterpolation.h:74
VectorFieldInterpolation::CellPoint010
double CellPoint010[6]
Definition: VectorFieldInterpolation.h:71
VectorFieldInterpolation::SC
double SC[3]
Definition: VectorFieldInterpolation.h:64
VectorFieldInterpolation::CellPoint100
double CellPoint100[6]
Definition: VectorFieldInterpolation.h:70
VectorFieldInterpolation::defineCellPoint101
void defineCellPoint101(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:54
VectorFieldInterpolation::defineCellPoint010
void defineCellPoint010(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:24
VectorFieldInterpolation::CellPoint001
double CellPoint001[6]
Definition: VectorFieldInterpolation.h:73
VectorFieldInterpolation::VectorFieldInterpolation
VectorFieldInterpolation()
Definition: VectorFieldInterpolation.h:57
VectorFieldInterpolation::defineCellPoint001
void defineCellPoint001(double X1, double X2, double X3, double F1, double F2, double F3)
Definition: VectorFieldInterpolation.cc:44
VectorFieldInterpolation::CellPoint011
double CellPoint011[6]
Definition: VectorFieldInterpolation.h:75