Skip to content
Discussion options

You must be logged in to vote

I would try adding the particles to a temporary ParticleTile that lives in host memory:

using HostTile = typename ContainerLike<std::allocator>::ParticleTileType;
HostTile host_tile;

Then, after adding the particles to the host_tile, you can copy them to the permanent one.

auto& particle_tile = DefineAndReturnParticleTile(lev, pti);
particle_tile.resize(new_size);
amrex::copyParticles(particle_tile, host_tile);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Afraid31
Comment options

Answer selected by Afraid31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants