Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DetectorData.hpp
Go to the documentation of this file.
1 /*
2  * DetectorFrequency.hpp
3  *
4  * Created on: Jan 5, 2015
5  * Author: imabit
6  */
7 
8 #ifndef DETECTORDATA_HPP_
9 #define DETECTORDATA_HPP_
10 
11 #include <vector>
12 #include <string>
13 #include <cmath>
14 
15 namespace phoxonics {
16 namespace core {
17 
18 // represents a detector frequency and its flux with flux
20  inline DetectorData(double freq) {
21  this->freq = freq;
22  double ddx = 0.01;
23  double dt = ddx / 6e8;
24  this->arg = 2 * M_PI * this->freq * dt;
25  }
26 
27  inline DetectorData(double omega, int n_omegas) {
28  this->omega = omega;
29  this->n_omegas = n_omegas;
30  }
31 
32  // used for hertz
33  double freq { 0.0 };
34  double arg { 0.0 };
35 
36  // normalized units
37  double omega { 0.0 };
38  double n_omegas { 0.0 };
39 
40  double real { 0.0 };
41  double imaginary { 0.0 };
42  double amplitude { 0.0 };
43  double phase { 0.0 };
44 
45  // prints object data
46  inline void print_me() override {
47  this->log_.log_info(fmt_() << "freq:" << this->freq);
48  this->log_.log_info(fmt_() << "arg:" << this->arg);
49  this->log_.log_info(fmt_() << "omega:" << this->omega);
50  this->log_.log_info(fmt_() << "n_omegas:" << this->n_omegas);
51  this->log_.log_info(fmt_() << "real:" << this->real);
52  this->log_.log_info(fmt_() << "imaginary:" << this->imaginary);
53  this->log_.log_info(fmt_() << "amplitude:" << this->amplitude);
54  this->log_.log_info(fmt_() << "phase:" << this->phase);
55  this->log_.log_info(fmt_() << "------------------------------------------------------");
56  };
57 };
58 
59 }
60 }
61 
62 #endif /* DETECTORDATA_HPP_ */
double arg
Definition: DetectorData.hpp:34
phoxonics::common::Logger log_
Definition: SimulationItemBase.hpp:35
double amplitude
Definition: DetectorData.hpp:42
Definition: CommonBase.hpp:14
double real
Definition: DetectorData.hpp:40
double n_omegas
Definition: DetectorData.hpp:38
double omega
Definition: DetectorData.hpp:37
double phase
Definition: DetectorData.hpp:43
Definition: SimulationItemBase.hpp:22
double freq
Definition: DetectorData.hpp:33
phoxonics::common::Formatter fmt_
Definition: SimulationItemBase.hpp:36
void print_me() override
Definition: DetectorData.hpp:46
double imaginary
Definition: DetectorData.hpp:41
void log_info(std::string message)
Definition: Logger.cpp:32
Definition: DetectorData.hpp:19
DetectorData(double omega, int n_omegas)
Definition: DetectorData.hpp:27
DetectorData(double freq)
Definition: DetectorData.hpp:20