diff options
author | 2019-07-11 14:26:38 -0700 | |
---|---|---|
committer | 2019-07-11 14:26:38 -0700 | |
commit | 57d4f470b58203a978f02af0fb44142a71d57fd5 (patch) | |
tree | 2b99e5da3dd2b8585a19350cdbc50d110fff1979 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 661c5dfcc6975facc7cd03da22bac88c4aec37bb (diff) | |
download | WarpX-57d4f470b58203a978f02af0fb44142a71d57fd5.tar.gz WarpX-57d4f470b58203a978f02af0fb44142a71d57fd5.tar.zst WarpX-57d4f470b58203a978f02af0fb44142a71d57fd5.zip |
option use_picsar_deposition
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index df08d77a7..86cd0827f 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1529,16 +1529,30 @@ PhysicalParticleContainer::Evolve (int lev, // // Current Deposition // - // Deposit inside domains - DepositCurrent(pti, wp, uxp, uyp, uzp, &jx, &jy, &jz, - 0, np_current, thread_num, - lev, lev, dt); - if (has_buffer){ - // Deposit in buffers - DepositCurrent(pti, wp, uxp, uyp, uzp, cjx, cjy, cjz, - np_current, np-np_current, thread_num, - lev, lev-1, dt); + if (WarpX::use_picsar_deposition) { + // Deposit inside domains + DepositCurrentFortran(pti, wp, uxp, uyp, uzp, &jx, &jy, &jz, + 0, np_current, thread_num, + lev, lev, dt); + if (has_buffer){ + // Deposit in buffers + DepositCurrentFortran(pti, wp, uxp, uyp, uzp, cjx, cjy, cjz, + np_current, np-np_current, thread_num, + lev, lev-1, dt); + } + } else { + // Deposit inside domains + DepositCurrent(pti, wp, uxp, uyp, uzp, &jx, &jy, &jz, + 0, np_current, thread_num, + lev, lev, dt); + if (has_buffer){ + // Deposit in buffers + DepositCurrent(pti, wp, uxp, uyp, uzp, cjx, cjy, cjz, + np_current, np-np_current, thread_num, + lev, lev-1, dt); + } } + // // copy particle data back // |