From 6d067bd9ac6cf6127076c1edf3024c9de80ee703 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 9 Jul 2019 17:57:07 -0700 Subject: works for order 1, direct deposition 2D --- Source/Particles/WarpXParticleContainer.cpp | 115 +++++++++++++--------------- 1 file changed, 54 insertions(+), 61 deletions(-) (limited to 'Source/Particles/WarpXParticleContainer.cpp') diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index d383ab6f4..69f7aa3d0 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -292,7 +292,6 @@ WarpXParticleContainer::AddNParticles (int lev, * \param lev : Level of box that contains particles * \param depos_lev : Level on which particles deposit (if buffers are used) * \param dt : Time step for particle level - * \param ngJ : Number of ghosts cells (of lev) */ void WarpXParticleContainer::DepositCurrent(WarpXParIter& pti, @@ -336,10 +335,10 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti, // Lower corner of tile box physical domain // const std::array& xyzmin_tile = WarpX::LowerCorner(tilebox, depos_lev); // const std::array& xyzmin = xyzmin_tile; + tilebox.grow(ngJ); const std::array& xyzmin = WarpX::LowerCorner(tilebox, depos_lev);; // Print()<<" xyzmin_tile "<& xyzminx = WarpX::LowerCorner(tbx, depos_lev);; + const std::array& xyzminy = WarpX::LowerCorner(tby, depos_lev);; + const std::array& xyzminz = WarpX::LowerCorner(tbz, depos_lev);; + Print()<<"ngJ "<charge; Real stagger_shift = j_is_nodal ? 0.0 : 0.5; - Print()<<"xmin "<array(pti); */ - // const auto& jx_arr = local_jx[thread_num].array(); - // const auto& jy_arr = local_jy[thread_num].array(); - // const auto& jz_arr = local_jz[thread_num].array(); - - //Array4 const& jx_arr = local_jx[thread_num].array(tbx); - //Array4 const& jy_arr = local_jy[thread_num].array(tby); - //Array4 const& jz_arr = local_jz[thread_num].array(tbz); Array4 const& jx_arr = local_jx[thread_num].array(); Array4 const& jy_arr = local_jy[thread_num].array(); Array4 const& jz_arr = local_jz[thread_num].array(); - Dim3 lox = lbound(jx_arr); - Dim3 loy = lbound(jy_arr); - Dim3 loz = lbound(jz_arr); - /* - Dim3 loy = lbound(local_jy[thread_num]); - Dim3 loz = lbound(local_jz[thread_num]); - Dim3 hix = hbound(local_jx[thread_num]); - Dim3 hiy = hbound(local_jy[thread_num]); - Dim3 hiz = hbound(local_jz[thread_num]); - */ - Print()<<" lox "<