23 Phonon(
signed char sign,
double lifetime,
Cell* cell);
25 [[nodiscard]]
signed char getSign() const noexcept {
28 [[nodiscard]] std::pair<double, double>
getPosition() const noexcept {
31 [[nodiscard]] std::pair<double, double>
getVelVector() const noexcept {
32 return { dx_ * velocity_, dy_ * velocity_ };
34 [[nodiscard]] std::pair<double, double>
getDirection() const noexcept {
40 [[nodiscard]]
double getFreq() const noexcept {
53 return cell_ ==
nullptr;
72 void drift(
double time) noexcept;
85 friend std::ostream& operator<<(std::ostream& os, const
Phonon& phonon) {
86 os <<
"px: " << phonon.px_ <<
" py: " << phonon.py_ <<
"\nvx_: " << phonon.dx_ * phonon.velocity_
87 <<
" vy_: " << phonon.dy_ * phonon.velocity_;
94 std::size_t lifestep_{ 0 };
101 std::size_t freq_index_{ 0 };
103 double velocity_{ 0. };
106 Cell* cell_{
nullptr };
void setRandPoint(double r1, double r2)
Definition: phonon.cpp:97
RelaxRates getRelaxRates(std::size_t step) const
Definition: phonon.cpp:63
void setCell(Cell *cell) noexcept
Definition: phonon.h:65
static constexpr std::size_t NUM_RELAX_RATES
Definition: phonon.h:18
std::pair< double, double > getPosition() const noexcept
Definition: phonon.h:28
bool outsideCell() const noexcept
Definition: phonon.h:52
std::array< Geometry::Line, 3 > getCellBoundaryLines() const
Definition: phonon.cpp:70
void handleSurfaceCollision(const Geometry::Point &poi, double step_time)
Definition: phonon.cpp:78
Phonon(signed char sign, double lifetime, Cell *cell)
Definition: phonon.cpp:13
double getCellHeatCapacityAtFreq(std::size_t index) const
Definition: phonon.cpp:56
Polarization
Definition: phonon.h:19
void scatterUpdate()
Definition: phonon.cpp:85
std::size_t getFreqIndex() const noexcept
Definition: phonon.h:37
std::size_t getCellMaterialID() const
Definition: phonon.cpp:49
void updateCellHeatParams(std::size_t step) const
Definition: phonon.cpp:90
signed char getSign() const noexcept
Definition: phonon.h:25
std::pair< double, double > getVelVector() const noexcept
Definition: phonon.h:31
void setDirection(double dx, double dy) noexcept
Definition: phonon.h:61
Polarization getPolar() const noexcept
Definition: phonon.h:43
double getLifetime() const noexcept
Definition: phonon.h:46
std::size_t getCellSensorID() const
Definition: phonon.cpp:42
std::size_t getLifeStep() const noexcept
Definition: phonon.h:49
void drift(double time) noexcept
Definition: phonon.cpp:30
double getFreq() const noexcept
Definition: phonon.h:40
void setPosition(double px, double py) noexcept
Definition: phonon.h:57
void setLifeStep(std::size_t step)
Definition: phonon.h:68
std::pair< double, double > getDirection() const noexcept
Definition: phonon.h:34
void setRandDirection() noexcept
Definition: phonon.cpp:36
std::array< double, NUM_RELAX_RATES > RelaxRates
Definition: phonon.h:21
Definition: geometry.h:13
Definition: geometry.h:39
Definition: geometry.h:23