1. The Enzo Project
  2. Untitled project
  3. enzo-dev
  4. Pull requests

Pull requests

#188 Merged
Deleted repository
week-of-code (a1adf301204a)

Dark Particle Splittling

  1. John Regan

I've replaced the Fortran routine (particle_splitter.F) with Grid_CreateChildParticles.C. The algorithm is essentially identical, with only minor modifications to the Fortran algorithm. The C version requires significantly less arguments and I've also hard coded the number of children in macrosandparameters.h as that makes more sense. I've tested only the DM particle splittling although star particle splittling is also possible. In fact it appears that previously the code was incompatible with a DM only particle splittling. That is now fixed but untested with stars.

  • Learn about pull requests

Comments (8)

  1. Brian O'Shea

    Just a followup on this: I've now tested this PR for a cosmology dataset, and it works for both dark matter and particle splitting, and appears to maintain particle attributes correctly across the split. So, I am ready to accept this PR as soon as you address the other questions.

  2. Greg Bryan

    Thanks John! This looks good to me except for the following issue. There are a number of variables which should be declared "FLOAT" rather than "float" to match the Enzo mixed-type convention. These are all in Grid_CreateChildParticles and include: ParticlePosition, RefineRegionLeftEdge, RefineRegionRightEdge, CellLeftEdge.

  3. John Wise

    Hi John, I read over your changes again, and I saw that you're passing some global variables (RefineRegionLeftEdge, RefineRegionRightEdge, NumberOfParticleAttributes) into the grid::CreateChildParticles routine. They should be accessible in the routine, unlike the original Fortran routine. After addressing Greg's and my concerns, then I think it's ready to go.

  4. John Regan author

    Greg & John,

    Thanks for reviewing and picking up on those issues. I've updated the source and pushed the changes now. Let me know if you see anything else.