1 #ifndef PSIM_MODELSIMULATOR_H
2 #define PSIM_MODELSIMULATOR_H
19 using BuilderObj = std::variant<CellOriginBuilder, SurfaceOriginBuilder, PhasorBuilder>;
20 ModelSimulator(std::size_t measurement_steps,
double simulation_time,
bool phasor_sim);
23 void initPhononBuilders(std::vector<Cell>& cells,
double t_eq,
double eff_energy) noexcept;
24 [[nodiscard]] std::optional<double>
nextImpact(
Phonon& p,
double time)
const noexcept;
27 phonon_builders_.clear();
30 step_adjustment_ = step_adjustment;
34 std::vector<BuilderObj> phonon_builders_;
35 std::vector<double> step_times_;
38 std::size_t step_adjustment_{ 0 };
39 std::size_t total_phonons_{ 0 };
41 void runPhononByPhonon(
double t_eq);
42 void runUsingBuilders(
double t_eq);
43 static void scatter(
Phonon& p,
const std::array<double, 3>& relax_rates) noexcept;
44 void simulatePhonon(
Phonon&& p, std::size_t measurement_steps)
const;
45 std::optional<double> handleImpacts(
Phonon& p,
double drift_time, std::size_t sensor_id)
const;
Definition: phononBuilder.h:38
Definition: modelSimulator.h:17
std::optional< double > nextImpact(Phonon &p, double time) const noexcept
Definition: modelSimulator.cpp:100
void setStepAdjustment(std::size_t step_adjustment)
Definition: modelSimulator.h:29
ModelSimulator(std::size_t measurement_steps, double simulation_time, bool phasor_sim)
Definition: modelSimulator.cpp:42
void runSimulation(double t_eq)
Definition: modelSimulator.cpp:52
std::variant< CellOriginBuilder, SurfaceOriginBuilder, PhasorBuilder > BuilderObj
Definition: modelSimulator.h:19
void reset() noexcept
Definition: modelSimulator.h:25
void initPhononBuilders(std::vector< Cell > &cells, double t_eq, double eff_energy) noexcept
Definition: modelSimulator.cpp:56
Definition: phononBuilder.h:69
Definition: phononBuilder.h:53