Refactoring of the GIZMO schemes that should eliminate code duplication between the different flavours. The idea is to have one folder,
hydro/Gizmo that contains all of the functionality that is shared between flavours, and two subfolders,
hydro/Gizmo/MFM, that implement flavour specific stuff.
While refactoring the code, a few additional changes were made:
- getters and setters were moved from
hydro_setters.hto reduce the length of
- A new file,
hydro_lloyd.hwas created that contains the hacks required to run GizmoMFV in Lloyd's algorithm mode, where it will reduce the Poisson noise in a particle distribution by recursively moving particles to the centroid of their meshless cell.
structs in the MFV hydro part were removed to make sure both Gizmo schemes uses the same variable names for most quantities
- for the same reason, a union was created that allows the particle/fluid velocity to be accessed using both
fluid_vin Gizmo MFM
- some of the gradient and slope limiter code was simplified by moving operations to dedicated functions
The code still passes all the tests I tried, so in principle these changes have not changed any of the functionality.