Gizmo refactoring
Compare changes
File renamed with no changes. Show file contents
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/MFV
and hydro/Gizmo/MFM
, that implement flavour specific stuff.
While refactoring the code, a few additional changes were made:
hydro.h
to hydro_getters.h
and hydro_setters.h
to reduce the length of hydro.h
.hydro_lloyd.h
was 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.struct
s in the MFV hydro part were removed to make sure both Gizmo schemes uses the same variable names for most quantitiesv
and fluid_v
in Gizmo MFMThe code still passes all the tests I tried, so in principle these changes have not changed any of the functionality.