diff options
author | 2018-10-08 15:11:10 -0700 | |
---|---|---|
committer | 2018-10-08 15:11:10 -0700 | |
commit | 76a2753ca442d4138a117406ba422ca3453bccf7 (patch) | |
tree | 307e8514163b5b9760afbc2ac29edabb6bd24dfc /Source/WarpX.cpp | |
parent | 78b2f28655309cadd0abe3693b0baf0ded183a98 (diff) | |
parent | 129eb13c2798467ede32cce1ceb80330d8067b75 (diff) | |
download | WarpX-76a2753ca442d4138a117406ba422ca3453bccf7.tar.gz WarpX-76a2753ca442d4138a117406ba422ca3453bccf7.tar.zst WarpX-76a2753ca442d4138a117406ba422ca3453bccf7.zip |
Merge pull request #9 from ECP-WarpX/depositonmaingrid
Allow species to always deposit on level 0
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index fc226a1b4..a2590de84 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -520,14 +520,18 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d #if (AMREX_SPACEDIM == 3) IntVect ngE(ngx,ngy,ngz); IntVect ngJ(ngx,ngy,ngz_nonci); - IntVect ngRho = ngJ + 1; // One extra ghost cell, so that it's safe to deposit charge density - // after pushing particle. #elif (AMREX_SPACEDIM == 2) IntVect ngE(ngx,ngz); IntVect ngJ(ngx,ngz_nonci); - IntVect ngRho = ngJ + 1; #endif + IntVect ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density + // after pushing particle. + + if (mypc->nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { + n_current_deposition_buffer = 1; + } + if (n_current_deposition_buffer < 0) { n_current_deposition_buffer = ngJ.max(); } |