Microphysics icon indicating copy to clipboard operation
Microphysics copied to clipboard

Add a templating equivalent to EXTRA_THERMO

Open maxpkatz opened this issue 2 years ago • 2 comments

The functionality is demonstrated in Helmholtz.

In order to make test_eos work with USE_EXTRA_THERMO=FALSE, the code that actually does the work needs to be in a templated function (since if constexpr only skips checking the validity of the false condition inside template functions).

maxpkatz avatar Sep 15 '21 02:09 maxpkatz

Note: this does not yet actually remove EXTRA_THERMO, it just makes some parts of Microphysics agnostic as to whether the eos_t object has dpdA, etc., in the type. When this is complete (in both Microphysics and Castro/Maestro) then we will be easily able to define a new type inheriting from eos_t that has the extra thermo components and then everything should just work without needing the ifdef.

maxpkatz avatar Sep 15 '21 02:09 maxpkatz

tests: http://groot.astro.sunysb.edu/Microphysics/test-suite/gfortran/2021-09-15-002/index.html

zingale avatar Sep 15 '21 13:09 zingale