diff options
author | 2020-09-30 13:57:49 -0700 | |
---|---|---|
committer | 2020-09-30 13:57:49 -0700 | |
commit | 82cfaf9ae48f2fc9c0c6c67bd37e98a0eff1c467 (patch) | |
tree | 9d20cf834b61f825ace8c62d42df4868d47be62f /Source/FieldSolver/ElectrostaticSolver.cpp | |
parent | 1c20a09ba6268b2e7d23041c09060bcf1df23628 (diff) | |
download | WarpX-82cfaf9ae48f2fc9c0c6c67bd37e98a0eff1c467.tar.gz WarpX-82cfaf9ae48f2fc9c0c6c67bd37e98a0eff1c467.tar.zst WarpX-82cfaf9ae48f2fc9c0c6c67bd37e98a0eff1c467.zip |
Use fewer guard cells for deposition (#1368)
* Use fewer guard cells for deposition
* Update some CI benchmarks
* Revert "Update some CI benchmarks"
This reverts commit 2f40062557d75e3f6b2d3ba284332b8a92a0d404.
* Check if shapes and guard cells are compatible only for rho
* Do not allocate one extra guard cell for J
* Add more relaxed check on shapes and guard cells for J
Diffstat (limited to 'Source/FieldSolver/ElectrostaticSolver.cpp')
-rw-r--r-- | Source/FieldSolver/ElectrostaticSolver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/FieldSolver/ElectrostaticSolver.cpp b/Source/FieldSolver/ElectrostaticSolver.cpp index 676d89b1f..25f672f90 100644 --- a/Source/FieldSolver/ElectrostaticSolver.cpp +++ b/Source/FieldSolver/ElectrostaticSolver.cpp @@ -47,11 +47,12 @@ WarpX::AddSpaceChargeField (WarpXParticleContainer& pc) const int num_levels = max_level + 1; Vector<std::unique_ptr<MultiFab> > rho(num_levels); Vector<std::unique_ptr<MultiFab> > phi(num_levels); - const int ng = WarpX::nox; + // Use number of guard cells used for local deposition of rho + const int ng = guard_cells.ng_depos_rho.max(); for (int lev = 0; lev <= max_level; lev++) { BoxArray nba = boxArray(lev); nba.surroundingNodes(); - rho[lev].reset(new MultiFab(nba, dmap[lev], 1, ng)); // Make ng big enough/use rho from sim + rho[lev].reset(new MultiFab(nba, dmap[lev], 1, ng)); phi[lev].reset(new MultiFab(nba, dmap[lev], 1, 1)); phi[lev]->setVal(0.); } |