aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Gather/GetExternalFields.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/Gather/GetExternalFields.cpp')
-rw-r--r--Source/Particles/Gather/GetExternalFields.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Particles/Gather/GetExternalFields.cpp b/Source/Particles/Gather/GetExternalFields.cpp
index 0808bd6c1..03c4dc2b8 100644
--- a/Source/Particles/Gather/GetExternalFields.cpp
+++ b/Source/Particles/Gather/GetExternalFields.cpp
@@ -29,6 +29,21 @@ GetExternalEField::GetExternalEField (const WarpXParIter& a_pti, int a_offset) n
m_yfield_partparser = mypc.m_Ey_particle_parser->compile<4>();
m_zfield_partparser = mypc.m_Ez_particle_parser->compile<4>();
}
+ else if (mypc.m_E_ext_particle_s=="repeated_plasma_lens")
+ {
+ m_type = RepeatedPlasmaLens;
+ m_dt = warpx.getdt(a_pti.GetLevel());
+ m_get_position = GetParticlePosition(a_pti, a_offset);
+ auto& attribs = a_pti.GetAttribs();
+ m_ux = attribs[PIdx::ux].dataPtr() + a_offset;
+ m_uy = attribs[PIdx::uy].dataPtr() + a_offset;
+ m_uz = attribs[PIdx::uz].dataPtr() + a_offset;
+ m_repeated_plasma_lens_period = mypc.m_repeated_plasma_lens_period;
+ m_n_lenses = static_cast<int>(mypc.h_repeated_plasma_lens_starts.size());
+ m_repeated_plasma_lens_starts = mypc.d_repeated_plasma_lens_starts.data();
+ m_repeated_plasma_lens_lengths = mypc.d_repeated_plasma_lens_lengths.data();
+ m_repeated_plasma_lens_strengths = mypc.d_repeated_plasma_lens_strengths.data();
+ }
}
GetExternalBField::GetExternalBField (const WarpXParIter& a_pti, int a_offset) noexcept