diff options
author | 2019-08-21 09:14:21 -0700 | |
---|---|---|
committer | 2019-08-21 09:14:21 -0700 | |
commit | 16dd4d0491b32fb669a1ee07ed2866f68aafd6da (patch) | |
tree | bc3fcb1c4617df10b3ad047ae8034e44ca9625e7 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 5ec7a45b2a2ae43b83b4c695db1e7b2a3bbb805c (diff) | |
download | WarpX-16dd4d0491b32fb669a1ee07ed2866f68aafd6da.tar.gz WarpX-16dd4d0491b32fb669a1ee07ed2866f68aafd6da.tar.zst WarpX-16dd4d0491b32fb669a1ee07ed2866f68aafd6da.zip |
charge deposition depends on ionization level
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 4562b5c0a..3db413104 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1179,9 +1179,18 @@ PhysicalParticleContainer::Evolve (int lev, BL_PROFILE_VAR_STOP(blp_copy); if (rho) { - DepositCharge(pti, wp, rho, 0, 0, np_current, thread_num, lev, lev); + + int* AMREX_RESTRICT ion_lev; + if (do_field_ionization){ + ion_lev = pti.GetiAttribs(particle_icomps["ionization_level"]).dataPtr(); + } else { + ion_lev = nullptr; + } + DepositCharge(pti, wp, ion_lev, rho, 0, 0, + np_current, thread_num, lev, lev); if (has_buffer){ - DepositCharge(pti, wp, crho, 0, np_current, np-np_current, thread_num, lev, lev-1); + DepositCharge(pti, wp, ion_lev, crho, 0, np_current, + np-np_current, thread_num, lev, lev-1); } } @@ -1327,9 +1336,17 @@ PhysicalParticleContainer::Evolve (int lev, } if (rho) { - DepositCharge(pti, wp, rho, 1, 0, np_current, thread_num, lev, lev); + int* AMREX_RESTRICT ion_lev; + if (do_field_ionization){ + ion_lev = pti.GetiAttribs(particle_icomps["ionization_level"]).dataPtr(); + } else { + ion_lev = nullptr; + } + DepositCharge(pti, wp, ion_lev, rho, 1, 0, + np_current, thread_num, lev, lev); if (has_buffer){ - DepositCharge(pti, wp, crho, 1, np_current, np-np_current, thread_num, lev, lev-1); + DepositCharge(pti, wp, ion_lev, crho, 1, np_current, + np-np_current, thread_num, lev, lev-1); } } |