aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXConst.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Utils/WarpXConst.H')
-rw-r--r--Source/Utils/WarpXConst.H24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/Utils/WarpXConst.H b/Source/Utils/WarpXConst.H
index 4e226e55f..6901d4629 100644
--- a/Source/Utils/WarpXConst.H
+++ b/Source/Utils/WarpXConst.H
@@ -3,20 +3,24 @@
#include <AMReX_REAL.H>
-// Physical constants
-namespace PhysConst
+// Math constants
+namespace MathConst
{
- static constexpr amrex::Real c = 299792458.;
- static constexpr amrex::Real ep0 = 8.854187817e-12;
- static constexpr amrex::Real mu0 = 1.2566370614359173e-06;
- static constexpr amrex::Real q_e = 1.6021764620000001e-19;
- static constexpr amrex::Real m_e = 9.10938291e-31;
- static constexpr amrex::Real m_p = 1.6726231000000001e-27;
+ static constexpr amrex::Real pi = 3.14159265358979323846;
}
-namespace MathConst
+// Physical constants
+namespace PhysConst
{
- static constexpr amrex::Real pi = 3.14159265358979323846;
+ static constexpr amrex::Real c = 299792458.;
+ static constexpr amrex::Real ep0 = 8.854187817e-12;
+ static constexpr amrex::Real mu0 = 1.2566370614359173e-06;
+ static constexpr amrex::Real q_e = 1.6021764620000001e-19;
+ static constexpr amrex::Real m_e = 9.10938291e-31;
+ static constexpr amrex::Real m_p = 1.6726231000000001e-27;
+ static constexpr amrex::Real hbar = 1.05457180010e-34;
+ static constexpr amrex::Real alpha = mu0/(4*MathConst::pi)*q_e*q_e*c/hbar;
+ static constexpr amrex::Real r_e = 1./(4*MathConst::pi*ep0) * q_e*q_e/(m_e*c*c);
}
#endif