Add new must-refine particle option

#424 Merged at bc76c0b
Repository
brittonsmith
Branch
week-of-code
Repository
enzo
Branch
week-of-code
Author
  1. Britton Smith
Reviewers
Description

This add MustRefineParticlesCreateParticles option 4.

When using MustRefineParticlesCreateParticles = 3, dark matter particles from two different nested levels occupying the same cell will cause that cell to be refined to the higher of the two levels. This can add a lot of extra AMR near level boundaries in zoom-in simulations as coarse particles enter higher resolution regions.

With MustRefineParticlesCreateParticles = 4, the opposite strategy is taken, where a cell will be refined to the coarsest level of the contained dark matter particles.

Below is a crude example of a must-refine particle simulation with 2 initial nested levels.

MustRefineParticlesCreateParticles = 3

MustRefineParticlesCreateParticles = 4

This is implemented by creating a set of “antirules”, similar to the refinement rules set up for determining when to refine. The antirules determine when refinement, perhaps flagged by another particle, should be overridden. The antiflagging field is then cic deposited and layered on top of the original flagging field.

  • Commit status

Comments (3)