Pop control implementation
Currently has two different versions. A quick implementation that calculates the distance from the current swarm to the original swarm and adds n particles which are sorted from furtherest to closest distance, where n is the difference between the original swarm and current swarm. A slower implementation that checks the number of particles in each cell, and either adds or deletes particles based on the current ppc. Also uses the initial layout and the distances between the original layout and current layout.
TODO:
- Make sure the addition and deletion of particles is done correctly.
TODO
- [x] Try moving delete particles to inf/-inf
- [ ] Try using the mesh proxy for material/variable interpolation
- [x] Test in parallel
Code hangs when a proc doesn't have to add a particle. Trying to fix now
updated functions. Wasn't able to test mesh proxy for material update as each level set is its own mesh var
Added in Eulerian_D_Dt function. Works well for unknown history, not so well for flux history
Will close this for now, branch is still available but the implementation needs revisiting