diff options
author | 2019-09-04 14:59:39 -0700 | |
---|---|---|
committer | 2019-09-04 14:59:39 -0700 | |
commit | 424588663931d457289f89ced2a2d38c7705b2f4 (patch) | |
tree | 5e88c6463ce6832389b6a95786d243f4a02cb94c /Source/Laser/LaserParticleContainer.cpp | |
parent | affd4ed397c6537d713f3380c8299502d9b8444d (diff) | |
download | WarpX-424588663931d457289f89ced2a2d38c7705b2f4.tar.gz WarpX-424588663931d457289f89ced2a2d38c7705b2f4.tar.zst WarpX-424588663931d457289f89ced2a2d38c7705b2f4.zip |
add laser particles on level 0 instead of max level
Diffstat (limited to 'Source/Laser/LaserParticleContainer.cpp')
-rw-r--r-- | Source/Laser/LaserParticleContainer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp index d4abb40db..f6ed12fed 100644 --- a/Source/Laser/LaserParticleContainer.cpp +++ b/Source/Laser/LaserParticleContainer.cpp @@ -244,6 +244,8 @@ LaserParticleContainer::UpdateContinuousInjectionPosition(Real dt) void LaserParticleContainer::InitData () { + // Call InitData on max level to inject one laser particle per + // finest cell. InitData(maxLevel()); } @@ -379,7 +381,8 @@ LaserParticleContainer::InitData (int lev) RealVector particle_uz(np, 0.0); if (Verbose()) amrex::Print() << "Adding laser particles\n"; - AddNParticles(lev, + // Add particles on level 0. They will be redistributed afterwards + AddNParticles(0, np, particle_x.dataPtr(), particle_y.dataPtr(), particle_z.dataPtr(), particle_ux.dataPtr(), particle_uy.dataPtr(), particle_uz.dataPtr(), 1, particle_w.dataPtr(), 1); |