MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / transformParticles

Function transformParticles

Tests/Particles/ParticleTransformations/main.cpp:238–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236
237template <typename PC, typename F>
238void 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
260template <typename PC, typename F>
261void twoWayTransformParticles (PC& dst1, PC& dst2, const PC& src, F const& f)

Callers 2

twoWayTransformParticlesFunction · 0.70
testTransformFunction · 0.70

Calls 5

finestLevelMethod · 0.45
isValidMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected