Skip to content

Commit 826aa1b

Browse files
authored
Fix: AddPlasmaFlux w/ RT Components (#5694)
Temporary particle container did not use the same component names as the created particles yet. Follow-up #5481
1 parent 346bebd commit 826aa1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Particles/PhysicalParticleContainer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1365,8 +1365,8 @@ PhysicalParticleContainer::AddPlasmaFlux (PlasmaInjector const& plasma_injector,
13651365
// we will then call Redistribute on this new container and finally
13661366
// add the new particles to the original container.
13671367
PhysicalParticleContainer tmp_pc(&WarpX::GetInstance());
1368-
for (int ic = 0; ic < NumRuntimeRealComps(); ++ic) { tmp_pc.AddRealComp(false); }
1369-
for (int ic = 0; ic < NumRuntimeIntComps(); ++ic) { tmp_pc.AddIntComp(false); }
1368+
for (int ic = 0; ic < NumRuntimeRealComps(); ++ic) { tmp_pc.AddRealComp(GetRealSoANames()[ic + NArrayReal], false); }
1369+
for (int ic = 0; ic < NumRuntimeIntComps(); ++ic) { tmp_pc.AddIntComp(GetIntSoANames()[ic + NArrayInt], false); }
13701370
tmp_pc.defineAllParticleTiles();
13711371

13721372
Box fine_injection_box;

0 commit comments

Comments
 (0)