-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathResult_manager.hpp
More file actions
103 lines (86 loc) · 2.68 KB
/
Result_manager.hpp
File metadata and controls
103 lines (86 loc) · 2.68 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef INCLUDED_RESULT_MANAGER
#define INCLUDED_RESULT_MANAGER
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <ostream>
#include <tuple>
#include <Eigen/Dense>
#ifndef INCLUDED_INCIDENT_WAVE
#include "Incident_Wave.hpp"
#endif
#ifndef INCLUDED_TARGET
#include "Target.hpp"
#endif
#ifndef INCLUDED_TARGET_MANAGER
#include "Target_manager.hpp"
#endif
#ifndef INCLUDED_BASIC_STATS
#include "Basic_Stats.hpp"
#endif
#ifndef INCLUDED_MATERIAL_NAME
#include "Material_Name.hpp"
#endif
#include "gmie.hpp"
struct Result {
int wl0_index;
int target_index;
double wl0;
double N_inc;
Material_Name material_name_medium;
complex<double> eper_medium;
complex<double> mper_medium;
std::string target_fname;
bool is_homogeneous; // true if target is homogeneous material
Material_Name material_name_particle;
complex<double> eper_particle;
complex<double> mper_particle;
double volume_particle; //um3
double mass_particle;
double density_particle;
double ve_radius_particle; //um
double ve_cross_section_particle; //um2
Material_Name material_name_core;
complex<double> eper_core;
complex<double> mper_core;
double volume_core; //um3
double mass_core; //g
double density_core;
double ve_radius_core; //um
double ve_cross_section_core; //um2
Material_Name material_name_coat;
complex<double> eper_coat;
complex<double> mper_coat;
double volume_coat; //um3
double coat_to_core_vratio;
std::vector<double> Cext;
std::vector<double> Cabs;
std::vector<double> Csca;
std::vector<double> Qext;
std::vector<double> Qabs;
std::vector<double> Qsca;
std::vector<double> SSA; // Csca/Cext
std::vector<double> MAC; // mass_absorption_cross_section of core (m2/g)
int f;
int nx;
int ny;
int nz;
int num_element_cuboid;
int num_element_occupy;
double DDA_solver_time;
};
class Result_manager {
std::vector<Result> result_queue;
public:
void add_to_result_queue(const Target& target, const Incident_Wave& incwave, const Material& medium, const int wl0_index, const int target_index);
Result pick_result(int result_index) {return result_queue[result_index];}
Result pick_result(const Target_manager& target_manager, int wl0_index, int target_index){
int result_index= wl0_index*target_manager.get_queue_size()+target_index;
return result_queue[result_index];
}
//void compute_total_cross_sections(const Target&, const Incident_Wave&);
tuple<double,double,double,double> volume_equivalent_Mie_result(const Result& result);
};
std::ostream& operator<<(std::ostream& os, const Result& result);
#endif