10#include "../global/global.h"
17#ifdef AVERAGE_SLOW_CELLS
18 Real max_dti_slow, dx, dy, dz;
23#ifdef AVERAGE_SLOW_CELLS
24 : max_dti_slow{max_dti_slow}, dx{dx}, dy{dy}, dz{dz}
31 template <
bool verbose = false>
32 __device__
bool is_slow(Real total_energy, Real density, Real density_inv, Real velocity_x, Real velocity_y,
33 Real velocity_z, Real gamma)
const
35 return this->
max_dti_if_slow(total_energy, density, density_inv, velocity_x, velocity_y, velocity_z, gamma) > 0.0;
41 __device__ Real
max_dti_if_slow(Real total_energy, Real density, Real density_inv, Real velocity_x, Real velocity_y,
42 Real velocity_z, Real gamma)
const;
45#ifdef AVERAGE_SLOW_CELLS
47void Average_Slow_Cells(Real *dev_conserved,
int nx,
int ny,
int nz,
int n_ghost,
int n_fields, Real gamma,
49 int ny_offset,
int nz_offset);
51__global__
void Average_Slow_Cells_3D(Real *dev_conserved,
int nx,
int ny,
int nz,
int n_ghost,
int n_fields,
53 Real zbound,
int nx_offset,
int ny_offset,
int nz_offset);
Object that checks whether a given cell meets the conditions for slow-cell averaging....
Definition average_cells.h:15
__host__ __device__ SlowCellConditionChecker(Real max_dti_slow, Real dx, Real dy, Real dz)
Construct a new object.
Definition average_cells.h:22
__device__ Real max_dti_if_slow(Real total_energy, Real density, Real density_inv, Real velocity_x, Real velocity_y, Real velocity_z, Real gamma) const
Returns the max inverse timestep of the specified cell, if it meets the criteria for being a slow cel...
Definition hydro_cuda.cu:696
__device__ bool is_slow(Real total_energy, Real density, Real density_inv, Real velocity_x, Real velocity_y, Real velocity_z, Real gamma) const
Returns whether the cell meets the condition for being considered a slow cell that must be averaged.
Definition average_cells.h:32