File hybrid.H
Functions
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void linear_to_hybrid (const GpuArray< Real, 3 > &loc, const GpuArray< Real, 3 > &linear_mom, GpuArray< Real, 3 > &hybrid_mom)
For hybrid momentum advection, convert the linear momentum into the hybrid / angular momentum components
- Parameters:
loc – spatial location
linear_mom – linear momentum
hybrid_mom – hybrid / angular momentum
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void hybrid_to_linear (const GpuArray< Real, 3 > &loc, const GpuArray< Real, 3 > &hybrid_mom, GpuArray< Real, 3 > &linear_mom)
Convert the hybrid / angular momentum back to linear momentum
- Parameters:
loc – spatial location
hybrid_mom – hybrid / angular momentum
linear_mom – linear momentum
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void set_hybrid_momentum_source (const GpuArray< Real, 3 > &loc, const GpuArray< Real, 3 > &linear_source, GpuArray< Real, 3 > &hybrid_source)
Create the hydrodynamic source term for the hybrid momenta based on the input linear momentum source term
- Parameters:
loc – spatial location
linear_source – linear momentum source term
hybrid_source – hybrid / angular momentum source term
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void compute_hybrid_flux (const GpuArray< Real, NGDNV > &state, const GeometryData &geomdata, int idir, int i, int j, int k, GpuArray< Real, NUM_STATE > &flux, bool cell_centered=false)
Compute and store the flux of the hybrid momentum components
- Parameters:
state – the Godunov state
geomdata – the Castro geometry data object
idir – coordinate direction for flux computation (0 = x, 1 = y, 2 = z)
i – x zone index
j – y zone index
k – z zone indxe
flux – hydrodynamic flux in direction idir
cell_centered – is this a cell-centered flux or an interface flux?