-
Notifications
You must be signed in to change notification settings - Fork 1
/
Box.hpp
53 lines (40 loc) · 1.13 KB
/
Box.hpp
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
#ifndef BOX_H
#define BOX_H
#include "General.hpp"
#include "Vec3.hpp"
#include "NFunction.hpp"
class Box
{
NFunction M; // Multipole (outgoing) expansion
NFunction L; // Local (incoming) expansion
public:
typedef vector<int> PointList;
typedef PointList::iterator pointIter;
int n; // The box number
Vec3 center; // The box center
Box* parent; // A pointer to this box's parent
PointList pointIndex; // If leaf, contains indices of points it contains
Box() {}
Box( int n_, const Vec3& center_ ) : n(n_), center(center_) {}
~Box() {}
inline void addPointIndex( int index ) {
pointIndex.push_back( index );
}
inline void makeMultipole( Quadrature* q ) {
M = NFunction(q);
}
inline void makeLocal( Quadrature* q ) {
L = NFunction(q);
}
inline NFunction& getMultipole() {
return M;
}
inline NFunction& getLocal() {
return L;
}
private:
// Disable Copy and Assignment
Box(const Box& S) { (void) S; }
void operator=(const Box& S) { (void) S; }
};
#endif