From 3a784935639b246b61e1a76088073b8eb1fd7794 Mon Sep 17 00:00:00 2001 From: EyaDammak Date: Mon, 24 Feb 2025 13:06:40 +0100 Subject: [PATCH] update pcc.cpp --- src/particles/plasma/PlasmaParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index bf0e4715b4..34387fafcd 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -797,7 +797,7 @@ PlasmaToBeam (MultiBeam& beams, const amrex::Vector< std::string > beamnames, co [=] AMREX_GPU_DEVICE (int ip) { if (ptd_plasma.id(ip) != 2){ const long pid_beam = amrex::Gpu::Atomic::Add(p_ip_elec, 1u); - const long pidx_beam = pid + old_size; + const long pidx_beam = _beam + old_size; ptd_beam.rdata(BeamIdx::x)[pidx_beam] = ptd_plasma.pos(0, ip); ptd_beam.rdata(BeamIdx::y)[pidx_beam] = ptd_plasma.pos(1, ip); ptd_beam.rdata(BeamIdx::psi)[pidx_beam] = ptd_plasma.rdata(PlasmaIdx::psi)[ip];