Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
wavepacketkinematics.cpp
Go to the documentation of this file.
1/**
2 * @file wavepacketkinematics.cpp
3 * @brief Implements the wavepacketkinematics physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/wavepacketkinematics.cpp. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
13
14#include <cmath>
15
16namespace qpe {
17
19 double momentumY,
20 double mass) noexcept
21{
22 if (!(mass > 0.0) || !std::isfinite(mass) ||
23 !std::isfinite(momentumX) || !std::isfinite(momentumY)) {
24 return 0.0;
25 }
26
27 return (momentumX * momentumX + momentumY * momentumY) / (2.0 * mass);
28}
29
31 double mass) noexcept
32{
33 if (!(mass > 0.0) || !std::isfinite(mass) || !std::isfinite(momentumX)) {
34 return 0.0;
35 }
36
37 return (momentumX * momentumX) / (2.0 * mass);
38}
39
40} // namespace qpe
static double kineticEnergy(double momentumX, double momentumY, double mass) noexcept
Performs kinetic energy.
static double kineticEnergyX(double momentumX, double mass) noexcept
Performs kinetic energy x.
Declares the wavepacketkinematics physics/numerical component used by QPE experiments.