Skip to content

How to handle ElectrostaticParticleContainer after mesh refinement (AMR)? #4543

Answered by atmyers
Afraid31 asked this question in Q&A
Discussion options

You must be logged in to vote

If you use that constructor, then you will need to change the grids every time the hierarchy changes. This is mostly for single level simulations or simulations where the particles use a different set of grids than the fluid. However, there is another constructor that takes an AmrCore*, and that one will automatically track changes to the fluid grids. You can see it used here. You'll still need to call Redistribute() on the particle container after the grids change. The AMR Advection tutorial with tracer particles linked above is a good example to look at for using particles in an AMR context.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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