#188 Merged at ee05ee3
Deleted repository
week-of-code (a1adf301204a)
  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.

Comments (8)

  1. John Wise

    Hi John,

    This looks great. I haven't had the chance to test it, but once I do, I'll approve your addition.

  2. Brian OShea

    Could you remove particle_splitter.F from this PR? It's not being used any more so it should go.

  3. Brian OShea

    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.

  4. 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.

  5. 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.

  6. 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.

  7. Brian OShea

    The updated PR looks good to me. @jwise77 and @gbryan , could you guys please take a look and then hit 'accept' if you like what you see?