File advection_util.H
-
namespace hydro
Functions
- AMREX_GPU_HOST_DEVICE AMREX_INLINE void src_to_prim (int i, int j, int k, const Real dt, Array4< Real const > const &U_arr, Array4< Real const > const &q_arr, Array4< Real const > const &old_src, Array4< Real const > const &src_corr, Array4< Real > const &srcQ)
- template<class T, class U> AMREX_GPU_HOST_DEVICE AMREX_INLINE void conservative_to_primitive (int i, int j, int k, Array4< Real const > const &uin, Array4< Real const > const &Bx, Array4< Real const > const &By, Array4< Real const > const &Bz, Array4< Real const > const &Erin, Array4< Real const > const &lam, T &q, U &qaux, const bool fill_passives)
Convert conservative variables to primitive variables. The method is templated so that q/qaux can either be either Array4 or Array1D.
- Parameters:
i – x index
j – y index
k – z index
uin – input conserved state
Bx – x-component of magentic field (if USE_MHD=TRUE)
By – y-component of magentic field (if USE_MHD=TRUE)
Bz – z-component of magentic field (if USE_MHD=TRUE)
Erin – radiation energy (if USE_RAD=TRUE)
lam – radiation flux limiter (if USE_RAD=TRUE)
q – output primitive state
qaux – output auxiliary quantities