21template<
class Tvec,
class Tgr
idVec>
26 using namespace shamrock::patch;
29 const InstantBarotropic *cfg
30 = std::get_if<InstantBarotropic>(&solver_config.cooling_config.config);
36 const Tscal gamma = solver_config.get_eos_gamma();
44 scheduler().for_each_patchdata_nonempty(
46 shamlog_debug_ln(
"[AMR Flux]",
"barotropic energy reset patch", p.
id_patch);
63 const Tscal *__restrict rho,
64 const Tvec *__restrict rhov,
65 Tscal *__restrict rhoe) {
67 auto prim = barotrope.cons_to_prim(
70 rhoe[id_a] = shammath::prim_to_cons(prim, gamma).rhoe;
Internal energy reset onto the barotrope of the InstantBarotropic cooling.
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory).
A SYCL queue associated with a device and a context.
FluidStateSpec implementation for a barotropic equation of state that is isothermal below a threshold...
Overwrite the gas internal energy by the barotropic one (CoolingConfig::InstantBarotropic).
void reset_energy()
Apply the reset, does nothing if the cooling is not CoolingConfig::InstantBarotropic.
u32 get_field_idx(const std::string &field_name) const
Get the field id if matching name & type.
PatchDataLayer container class, the layout is described in patchdata_layout.
u32 get_obj_cnt() const
get the number of objects (particles) stored in this layer
void kernel_call(sham::DeviceQueue &q, RefIn in, RefOut in_out, u32 n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
Submit a kernel to a SYCL queue.
Gas and dust conservative/primitive states and axis-transform helpers shared by every gas and dust Ri...
shambase::details::BasicStackEntry StackEntry
Alias for shambase::details::BasicStackEntry.
A class that references multiple buffers or similar objects.
Instantaneous cooling onto a barotrope (RAMSES-like).
Patch object that contain generic patch information.
u64 id_patch
unique key that identify the patch