diff options
author | 2019-02-01 08:26:06 -0800 | |
---|---|---|
committer | 2019-02-01 08:26:06 -0800 | |
commit | 415bcd342181240b3c87e1ea3506c0e8118ef42e (patch) | |
tree | 347f771726e2e43aa7ab4bc93f971645473db38c /Source/WarpXParticleContainer.cpp | |
parent | f79b63ea740be6a5c3cdc097f5bca419db06588c (diff) | |
download | WarpX-415bcd342181240b3c87e1ea3506c0e8118ef42e.tar.gz WarpX-415bcd342181240b3c87e1ea3506c0e8118ef42e.tar.zst WarpX-415bcd342181240b3c87e1ea3506c0e8118ef42e.zip |
add function interface and add guard cells J
Diffstat (limited to 'Source/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/WarpXParticleContainer.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Source/WarpXParticleContainer.cpp b/Source/WarpXParticleContainer.cpp index c19653287..e15a73e58 100644 --- a/Source/WarpXParticleContainer.cpp +++ b/Source/WarpXParticleContainer.cpp @@ -878,3 +878,52 @@ WarpXParticleContainer::PushX (int lev, Real dt) } } } + +void +WarpXParticleContainer::particlePostLocate(ParticleType& p, + const ParticleLocData& pld, + const int lev) +{ + // Print()<<"in WarpXParticleContainer::particlePostLocate"<<'\n'; + //Print()<<p.id()<<'\n'; + if (pld.m_lev == lev+1){ + Print()<<"particle goes to higher level"<<'\n'; + //p.id() = -777; + p.m_idata.id = SplitParticleID; + //p.id() = -777; + /* + std::array<Real,PIdx::nattribs> attribs; + attribs = p.attribs(); + attribs.fill(0.0); + attribs[PIdx::w ] = dens * scale_fac / (AMREX_D_TERM(fac, *fac, *fac)); + attribs[PIdx::ux] = u[0]; + attribs[PIdx::uy] = u[1]; + attribs[PIdx::uz] = u[2]; +#ifdef WARPX_STORE_OLD_PARTICLE_ATTRIBS +attribs[PIdx::xold] = x; +attribs[PIdx::yold] = y; +attribs[PIdx::zold] = z; +attribs[PIdx::uxold] = u[0]; +attribs[PIdx::uyold] = u[1]; +attribs[PIdx::uzold] = u[2]; +#endif +AddOneParticle(lev, grid_id, tile_id, x, y, z, attribs); + */ + + /* + const int grid_id = mfi.index(); + const int tile_id = mfi.LocalTileIndex(); + locateParticle(p, pld, lev_min, lev_max, nGrow, local ? grid : -1); + */ + /* + AddOneParticle(pld.m_lev, 0, 0, x, 0, z, attribs); + WarpXParticleContainer::AddOneParticle (int lev, int grid, int tile, + Real x, Real y, Real z, + const std::array<Real,PIdx::nattribs>& attribs) + */ + } + if (pld.m_lev == lev-1){ + Print()<<"particle goes to lower level"<<'\n'; + Print()<<"Do not do anything"<<'\n'; + } +} |