diff options
author | 2021-08-11 22:24:21 -0700 | |
---|---|---|
committer | 2021-08-11 22:24:21 -0700 | |
commit | e31f5cd801e17842a11c75043b36ee3b96674f69 (patch) | |
tree | 6abd44b632363e8c265d94c5bf62d7eb58d78180 /Source/Particles/Gather/GetExternalFields.cpp | |
parent | d3fbc10a69f745331a8c7c0751e82376f4159ead (diff) | |
download | WarpX-e31f5cd801e17842a11c75043b36ee3b96674f69.tar.gz WarpX-e31f5cd801e17842a11c75043b36ee3b96674f69.tar.zst WarpX-e31f5cd801e17842a11c75043b36ee3b96674f69.zip |
For plasma lens, mapped particle to lab frame (#2190)
* For plasma lens, mapped particle to lab frame
* Updated documentation for plasma lens
Diffstat (limited to 'Source/Particles/Gather/GetExternalFields.cpp')
-rw-r--r-- | Source/Particles/Gather/GetExternalFields.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Particles/Gather/GetExternalFields.cpp b/Source/Particles/Gather/GetExternalFields.cpp index d97a69985..fc1110936 100644 --- a/Source/Particles/Gather/GetExternalFields.cpp +++ b/Source/Particles/Gather/GetExternalFields.cpp @@ -8,6 +8,7 @@ #include <string> +using namespace amrex::literals; GetExternalEField::GetExternalEField (const WarpXParIter& a_pti, int a_offset) noexcept { @@ -32,6 +33,9 @@ GetExternalEField::GetExternalEField (const WarpXParIter& a_pti, int a_offset) n else if (mypc.m_E_ext_particle_s=="repeated_plasma_lens") { m_type = RepeatedPlasmaLens; + m_time = warpx.gett_new(a_pti.GetLevel()); + m_gamma_boost = WarpX::gamma_boost; + m_uz_boost = std::sqrt(WarpX::gamma_boost*WarpX::gamma_boost - 1._rt)*PhysConst::c; m_lens_is_electric = 1; m_dt = warpx.getdt(a_pti.GetLevel()); m_get_position = GetParticlePosition(a_pti, a_offset); @@ -70,6 +74,9 @@ GetExternalBField::GetExternalBField (const WarpXParIter& a_pti, int a_offset) n else if (mypc.m_B_ext_particle_s=="repeated_plasma_lens") { m_type = RepeatedPlasmaLens; + m_time = warpx.gett_new(a_pti.GetLevel()); + m_gamma_boost = WarpX::gamma_boost; + m_uz_boost = std::sqrt(WarpX::gamma_boost*WarpX::gamma_boost - 1._rt)*PhysConst::c; m_lens_is_electric = 0; m_dt = warpx.getdt(a_pti.GetLevel()); m_get_position = GetParticlePosition(a_pti, a_offset); |