source: src/units/particle/interpolation.hpp@ cd0fed

Last change on this file since cd0fed was cd0fed, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Fixed some warnings.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1804 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 999 bytes
Line 
1#ifndef INTERPOLATION_HPP_
2#define INTERPOLATION_HPP_
3
4#include <vector>
5
6#include "base/index.hpp"
7#include "base/vector.hpp"
8
9namespace VMG
10{
11
12class Grid;
13
14namespace Particle
15{
16
17class Particle;
18
19class Interpolation
20{
21public:
22 Interpolation(const int& degree);
23 ~Interpolation();
24
25 void ComputeCoefficients(const Grid& grid, const Index& index);
26 void Evaluate(Particle& p);
27
28 vmg_float EvaluatePotentialLR(const Particle& p);
29
30private:
31 vmg_float& _access_coeff(const Index& index)
32 {
33 return coeff[index.Z() + deg_1 * (index.Y() + deg_1 * index.X())];
34 }
35
36 vmg_float& _access_coeff(const int& i, const int& j, const int& k)
37 {
38 return coeff[k + deg_1 * (j + deg_1 * i)];
39 }
40
41 void _compute_coefficients_1d(const Index& index, const unsigned int& direction);
42
43 vmg_float* coeff;
44 vmg_float* coeff_buffer;
45 int deg, deg_1;
46 Vector pos_begin;
47 Vector h;
48 std::vector<Vector> buffer;
49 std::vector< std::vector<Vector> > buffer_diff;
50};
51
52}
53
54}
55
56#endif /* INTERPOLATION_HPP_ */
Note: See TracBrowser for help on using the repository browser.