Backported the new interface to the chemistry from the COLIBRE fork.
This is an update that comes from our higher-resolution model fork but that I'd like to backport as it is useful in general but it touches the chemistry API.
The idea is to add a bunch of functions to the chemisty interface that return what Z and what the individual metal array is to be used in the different sections of the code (SF, feedback, cooling). The idea is then that these modules do not have to know what the exact structure of the chemistry data is. In our case it allows us to switch between a model that uses smoothed metals and one that doesn't just by changing the compilation flag for chemistry.
It does not break GEAR but maybe you want to adopt the same chemistry functions as well. Feel free to push to this branch if you want to.
Merge request reports
Activity
mentioned in commit 2c1f9b5a
@matthieu, I am currently implementing it. But unfortunately, I will not be able to totally follow your interface. In GEAR, we are not using at the same place the complete array of metals than you are (and the inverse).
What are the differences?
We provide two functions: one that returns Z and one that returns the full abundance arrays. And then we have different functions for the different processes for instance if one wants smoothed or un-smoothed metals in different parts of the code.
We can provide more functions to the general interface if needed.