Gadget-2 particles memory footprint
Particles could be made a tiny bit leaner by doing the following:
- Move
div_vto thedensitysub-structure. - Replace
curl_vin theforcesub-structure by the Balsara term and compute it in thehydro_prepare_force()routine. - Move
entropy_dtto theforcesub-structure. - Move
a_hydroandh_dtto the force sub-structure. Although that might have consequence on the other schemes. - Replace
pressurewithP_over_rhowhich then has to be computed in thehydro_predict_extra()routine.
That last one is not a space optimisation but a speed optimisation.
Doing this implies modifying critical part of the physics implementation as well as the corresponding unit tests.