Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PhxElectroMagGaussian2D.hpp
Go to the documentation of this file.
1 /*
2  * PhxElectroMagSinusoidal2D.hpp
3  *
4  * Created on: Dec 10, 2014
5  * Author: nano
6  */
7 
8 #ifndef PHXELECTROMAGSINUSOIDAL2D_HPP_
9 #define PHXELECTROMAGSINUSOIDAL2D_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 PhxElectroMagGaussian2D();
29  virtual ~PhxElectroMagGaussian2D();
30 
31  double t_0 { 0.0 };
32  double sigma { 0.0 };
33 
34  // configures object and initializes data from config
35  void configure(std::shared_ptr<ConfigBase> config_base) override final;
36 
37  // prints object data
38  void print_me() override final;
39 
40  // apply the source to the grid cells
41  void apply_source(std::shared_ptr<CellsBase> cells_base, double time) override final;
42 
43 private:
44  // casted cells
45  std::shared_ptr<ElectroMagCells2D> em_cells_2d_;
46 
47  // calculate source
48  double calculate_source(double time);
49 };
50 
51 } /* namespace core */
52 } /* namespace phoxonics */
53 
54 #endif /* PHXELECTROMAGSINUSOIDAL2D_HPP_ */
double sigma
Definition: PhxElectroMagGaussian2D.hpp:32
void print_me() overridefinal
Definition: PhxElectroMagGaussian2D.cpp:80
double t_0
Definition: PhxElectroMagGaussian2D.hpp:31
Definition: CellsBase.hpp:20
PhxElectroMagGaussian2D()
Definition: PhxElectroMagGaussian2D.cpp:15
Definition: ElectroMagCells2D.hpp:29
Definition: CommonBase.hpp:14
STL namespace.
virtual ~PhxElectroMagGaussian2D()
Definition: PhxElectroMagGaussian2D.cpp:19
void apply_source(std::shared_ptr< CellsBase > cells_base, double time) overridefinal
Definition: PhxElectroMagGaussian2D.cpp:85
virtual void configure()
Definition: SimulationItemBase.cpp:21
Definition: SourceBase.hpp:22
Definition: PhxElectroMagGaussian2D.hpp:26