Skip to content

Change gradient loops

Josh Borrow requested to merge change-gradient-loops into master

This MR aims to change the gradient loops to be a bit more user-friendly. Previously we had:

  1. Density Loop
  2. hydro_end_density G
  3. hydro_prepare_force G
  4. hydro_reset_acceleration G
  5. Gradient Loop
  6. hydro_end_gradient EG
  7. Force Loop
  8. hydro_end_force

Now this is changed to:

  1. Density Loop
  2. hydro_end_density G
  3. hydro_prepare_gradient G
  4. hydro_reset_gradient G
  5. Gradient Loop
  6. hydro_end_gradient EG
  7. hydro_prepare_force EG
  8. hydro_reset_acceleration EG
  9. Force Loop
  10. hydro_end_force

with G=Ghost, and EG=Extra Ghost.

@bvandenbroucke I have made the appropriate changes for GIZMO-MFV and GIZMO-MFM; you may still want to refactor after this change as I imagine there is a bit more that you could be doing to leverage this new system.

I guess this will need quite a bit of testing. The changed GIZMO schemes both run the SodShock_1D just fine, as does the GADGET-2 scheme.

Merge request reports