20 std::size_t num_measurements,
27 area_covered_ += area;
30 [[nodiscard]]
bool resetRequired(
double t_final, std::vector<double>&& final_temps = {}) noexcept;
32 [[nodiscard]] std::size_t
getID() const noexcept {
36 return controller_->getMaterial();
39 return controller_->getHeatCapacity(step);
42 return controller_->getHeatCapacityAtFreq(freq_index);
45 return controller_->getInitTemp();
47 [[nodiscard]]
double getSteadyTemp(std::size_t step = 0) const noexcept {
48 return controller_->getSteadyTemp(step);
50 [[nodiscard]]
double getArea() const noexcept {
53 [[nodiscard]]
const std::vector<std::array<double, 2>>&
getFluxes() const noexcept {
56 [[nodiscard]]
const std::vector<int>&
getEnergies() const noexcept {
66 void reset() noexcept;
68 controller_->updateTables();
73 std::unique_ptr<SensorController> controller_;
74 double area_covered_{ 0. };
76 std::vector<int> inc_energy_;
77 std::vector<std::array<double, 2>> inc_flux_;
78 std::unique_ptr<std::mutex> updateMutex_;
Definition: material.h:15
std::array< std::pair< double, double >, NUM_FREQ_BINS > Table
Definition: material.h:20
void reset() noexcept
Definition: sensor.cpp:63
bool resetRequired(double t_final, std::vector< double > &&final_temps={}) noexcept
Definition: sensor.cpp:48
std::size_t getID() const noexcept
Definition: sensor.h:32
double getHeatCapacityAtFreq(std::size_t freq_index) const noexcept
Definition: sensor.h:41
double getInitTemp() const noexcept
Definition: sensor.h:44
SimulationType
Definition: sensor.h:16
void updateTables()
Definition: sensor.h:67
void updateHeatParams(const Phonon &p, std::size_t step) noexcept
Definition: sensor.cpp:52
const std::vector< std::array< double, 2 > > & getFluxes() const noexcept
Definition: sensor.h:53
const std::vector< int > & getEnergies() const noexcept
Definition: sensor.h:56
void addToArea(double area) noexcept
Definition: sensor.h:26
const Material & getMaterial() const noexcept
Definition: sensor.h:35
void scatterUpdate(Phonon &p) const noexcept
Definition: sensor.cpp:44
double getArea() const noexcept
Definition: sensor.h:50
Sensor(std::size_t ID, const Material &material, SimulationType type, std::size_t num_measurements, double t_init)
Definition: sensor.cpp:12
double getSteadyTemp(std::size_t step=0) const noexcept
Definition: sensor.h:47
void initialUpdate(Phonon &p, const Material::Table &table) const noexcept
Definition: sensor.cpp:36
double getHeatCapacity(std::size_t step=0) const noexcept
Definition: sensor.h:38
double std_t_steady
Definition: sensor.h:84
std::vector< double > final_temps
Definition: sensor.h:90
double std_x_flux
Definition: sensor.h:86
double std_y_flux
Definition: sensor.h:88
std::vector< std::array< double, 2 > > final_fluxes
Definition: sensor.h:91
double y_flux
Definition: sensor.h:87
double t_steady
Definition: sensor.h:83
double x_flux
Definition: sensor.h:85