-
Notifications
You must be signed in to change notification settings - Fork 0
/
kernel.h
64 lines (60 loc) · 3.29 KB
/
kernel.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
#ifndef KERNEL_H
#define KERNEL_H
#include "element.h"
#include "complex_t.h"
#include <vector>
class Kernel
{
public:
Kernel(){}
virtual double direct(Element const & target, Element const & src) const = 0;
virtual std::vector<complex_t> calc_moments_cmp(std::vector<Element*> const & elements,
complex_t const & mom_center,
int num_moments) const = 0;
virtual std::vector<double> calc_moments(std::vector<Element*> const & elements,
Point const & mom_center,
int num_moments) const = 0;
virtual void M2L_cmp(std::vector<complex_t> const & moments,
complex_t const & mom_center,
std::vector<complex_t> & loc_exp,
complex_t const & loc_center) const = 0;
virtual void M2L(std::vector<double> const & moments,
Point const & mom_center,
std::vector<double> & loc_exp,
Point const & loc_center) const = 0;
virtual void L2L(std::vector<double> const & loc_in,
Point const & loc_in_center,
std::vector<double> & loc_out,
Point const & loc_out_center) const = 0;
virtual void L2L_cmp(std::vector<complex_t> const & loc_in,
complex_t const & loc_in_center,
std::vector<complex_t> & loc_out,
complex_t const & loc_out_center) const = 0;
virtual void M2M(std::vector<double> const & mom_in,
Point const & mom_in_center,
std::vector<double> & mom_out,
Point const & mom_out_center) const = 0;
virtual void M2M_cmp(std::vector<complex_t> const & mom_in,
complex_t const & mom_in_center,
std::vector<complex_t> & mom_out,
complex_t const & mom_out_center) const = 0;
virtual complex_t L2element_cmp(std::vector<complex_t> const & local_in,
complex_t const & local_center,
Element const & el) const = 0;
virtual double L2element(std::vector<double> const & local_in,
Point loc_in_center,
Element const & el) const = 0;
virtual std::vector<complex_t> calc_local_exp_cmp(std::vector<Element*> const & elements,
complex_t const & loc_center,
int num_loc_exps) const = 0;
virtual std::vector<double> calc_local_exp(std::vector<Element*> const & elements,
Point const & loc_center,
int num_loc_exps) const = 0;
virtual complex_t M2element_cmp(std::vector<complex_t> const & moments_in,
complex_t const & moment_center,
Element const & el) const = 0;
virtual double M2element(std::vector<double> const & moments_in,
Point const & moment_center,
Element const & el) const = 0;
};
#endif