-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSolver.hpp
More file actions
40 lines (31 loc) · 733 Bytes
/
Solver.hpp
File metadata and controls
40 lines (31 loc) · 733 Bytes
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
#ifndef INCLUDED_SOLVER
#define INCLUDED_SOLVER
#include <iostream>
#include <chrono>
#include <Eigen/Dense>
#include "fftw3.h"
#ifndef INCLUDED_MBT_UTILS
#include "MBT_utils.hpp"
#endif
#ifndef INCLUDED_TARGET
#include "Target.hpp"
#endif
#ifndef INCLUDED_INCIDENT_WAVE
#include "Incident_Wave.hpp"
#endif
#include "DDA_linear_solvers.hpp"
class Solver {
Eigen::VectorXcd Au_til;
Eigen::VectorXcd DIAG_A;
double tol= 1e-2;
int itermax= 300;
int fft_length;
fftw_plan plan_fwd;
fftw_plan plan_inv;
void fft_prep(const Target& target);
public:
void show_info();
void prepare_DDA_matrix(const Target& target, const Incident_Wave& incwave);
void DDA_solve(Target& target);
};
#endif