This merge request reinstates the conservative flux exchange for GIZMO particle interactions. With these changes, the conservative variables for a particle (mass, momentum, energy) can only be changed by exchanging a flux with another particle, so that the sum of the conserved variables for the particle pair remains exactly the same (up to machine precision). This guarantees conservation of mass, momentum and energy up to machine precision for hydro-only tests.
The conservative flux exchange depends on a few assumptions:
The second point is currently not guaranteed for MPI runs, where an active particle on node A cannot update the fluxes for an inactive particle on node B if the latter is part of a cell that only has inactive particles, since the corresponding task will simply not exist on node B. This needs to be addressed.
The drift for the primitive variables (density, velocity, pressure) is currently broken, because it depends on knowledge of the fluxes - a rate of change of the conserved quantities - while the flux variables now (confusingly?) store the time-integrated fluxes - a change in conserved quantities. This is again crucial to correctly account for fluxes in inactive particles. The old drift could be restored by introducing new variables, but I don't know if this is worth the effort and extra memory footprint.
To do: