Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ElectroMagGaussian2D.hpp
Go to the documentation of this file.
1 /*
2  * ElectroMagGaussian2D.hpp
3  *
4  * Created on: Jun 25, 2014
5  * Author: nano
6  */
7 
8 #ifndef ELECTROMAGGAUSSIAN2D_HPP_
9 #define ELECTROMAGGAUSSIAN2D_HPP_
10 
11 #include "SourceBase.hpp"
12 #include "../config/ConfigBase.hpp"
13 #include "../config/SourceConfig.hpp"
14 #include "../cells/CellsBase.hpp"
15 #include "../cells/ElectroMagCells2D.hpp"
16 #include "SourceFactoryReg.hpp"
17 
18 #include <string>
19 #include <memory>
20 #include <iostream>
21 #include <cmath>
22 
23 namespace phoxonics {
24 namespace core {
25 
27 public:
28  explicit ElectroMagGaussian2D();
29  virtual ~ElectroMagGaussian2D();
30 
31  double resolution { 0.0 };
32  int spread { 0 };
33  int t_0 { 0 };
34 
35  // configures object and initializes data from config
36  void configure(std::shared_ptr<ConfigBase> config_base) override final;
37 
38  // prints object data
39  void print_me() override final;
40 
41  // apply the source to the grid cells
42  void apply_source(std::shared_ptr<CellsBase> cells_base, double time) override final;
43 
44 private:
45  // casted cells
46  std::shared_ptr<ElectroMagCells2D> em_cells_2d_;
47 
48  // calculate source
49  double calculate_source(double time);
50 };
51 
52 } /* namespace core */
53 } /* namespace phoxonics */
54 
55 #endif /* ELECTROMAGGAUSSIAN2D_HPP_ */
void print_me() overridefinal
Definition: ElectroMagGaussian2D.cpp:86
Definition: ElectroMagGaussian2D.hpp:26
Definition: CellsBase.hpp:20
int spread
Definition: ElectroMagGaussian2D.hpp:32
Definition: ElectroMagCells2D.hpp:29
Definition: CommonBase.hpp:14
STL namespace.
virtual ~ElectroMagGaussian2D()
Definition: ElectroMagGaussian2D.cpp:19
void apply_source(std::shared_ptr< CellsBase > cells_base, double time) overridefinal
Definition: ElectroMagGaussian2D.cpp:94
virtual void configure()
Definition: SimulationItemBase.cpp:21
int t_0
Definition: ElectroMagGaussian2D.hpp:33
Definition: SourceBase.hpp:22
ElectroMagGaussian2D()
Definition: ElectroMagGaussian2D.cpp:15
double resolution
Definition: ElectroMagGaussian2D.hpp:31