-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBspline.h
68 lines (49 loc) · 1.06 KB
/
Bspline.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef BSPLINE_H
#define BSPLINE_H
template <typename T> class Bspline {
private:
// Length of the B-spline data arrays
int thetax_len;
int thetay_len;
int thetaz_len;
int dthetax_len;
int dthetay_len;
int dthetaz_len;
// Size of the FFT
int nfftx;
int nffty;
int nfftz;
// B-spline order
int order;
// Length of the data arrays
int gix_len;
int giy_len;
int giz_len;
int charge_len;
// Reciprocal vectors
T* recip;
public:
// B-spline data
T *thetax;
T *thetay;
T *thetaz;
T *dthetax;
T *dthetay;
T *dthetaz;
// Grid positions and charge of the atoms
int *gix;
int *giy;
int *giz;
T *charge;
private:
void set_ncoord(const int ncoord);
public:
Bspline(const int ncoord, const int order, const int nfftx, const int nffty, const int nfftz);
~Bspline();
template <typename B>
void set_recip(const B *recip);
void fill_bspline(const float4 *xyzq, const int ncoord);
void print_dtheta(int start, int end);
bool compare_dtheta(Bspline &a, int ncoord, double tol);
};
#endif // BSPLINE_H