cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
60 stars 32 forks source link

Move location of temperature floor #362

Open evaneschneider opened 5 months ago

evaneschneider commented 5 months ago

Right now the temperature floor is applied as a kernel call at the very end of each hydro integrator. I propose that instead, it be added as a single function call in the Grid3D::Update_Hydro_Grid function. If added right after the current Execute_Hydro_Integrator function, it shouldn't change the existing logic at all, but would reduce the number of function calls significantly (and allow it to be used for 1D and 2D simulations, a functionality that is currently missing.) This would require adding a new wrapper (host) function to call the kernel (as was done for other functions that were moved out of the integrators, e.g. cooling or the time step calculation).