| 236 | |
| 237 | template <typename PC, typename F> |
| 238 | void transformParticles (PC& pc, F const& f) |
| 239 | { |
| 240 | BL_PROFILE("transformParticles"); |
| 241 | |
| 242 | using ParIter = typename PC::ParConstIterType; |
| 243 | using ParticleTileType = typename PC::ParticleTileType; |
| 244 | |
| 245 | for (int lev = 0; lev <= pc.finestLevel(); ++lev) |
| 246 | { |
| 247 | for(ParIter pti(pc, lev); pti.isValid(); ++pti) |
| 248 | { |
| 249 | auto& ptile = pc.ParticlesAt(lev, pti); |
| 250 | |
| 251 | ParticleTileType ptile_tmp; |
| 252 | ptile_tmp.resize(ptile.size()); |
| 253 | |
| 254 | amrex::transformParticles(ptile_tmp, ptile, f); |
| 255 | ptile.swap(ptile_tmp); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | template <typename PC, typename F> |
| 261 | void twoWayTransformParticles (PC& dst1, PC& dst2, const PC& src, F const& f) |
no test coverage detected