AMReX-Astro/Microphysics

regenerate the helmtable without needing std::log10

Opened this issue · 1 comments

One of the most expensive parts of the Helmholtz EOS (on GPUs) is taking the log to T, rho each time we need to find the index into the electron table. We should regenerate the table with a different spacing that doesn't require the log. Some ideas are contained in this paper:

https://arxiv.org/abs/2206.08957

and the code appears here:

https://github.com/lanl/singularity-eos/blob/2ea3957cc18cd4709b926f415dd68a8d4daf8821/singularity-eos/base/fast-math/logs.hpp#L38C3-L38C3

This will require us to write a standalone EOS that computes the F-D integrals to tabulate the electron-positron values. This would be nice to have in any case, because it would allow us to sync up the values of the fundamental constants.

It might also be possible to replace all of these kinds of tabular interpolations with DNNs. In any case, it would be fun to try.