Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Namespaces | Functions
hydro_utilities.h File Reference

Contains the declaration of various utility functions for CUDA. More...

#include <iostream>
#include <string>
#include "../global/global.h"
#include "../global/global_cuda.h"
#include "../utils/basic_structs.h"
#include "../utils/gpu.hpp"
#include "../utils/math_utilities.h"
#include "../utils/mhd_utilities.h"
Include dependency graph for hydro_utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  hydro_utilities
 

Functions

__host__ __device__ Real hydro_utilities::Calc_Pressure_Primitive (Real const &E, Real const &d, Real const &vx, Real const &vy, Real const &vz, Real const &gamma, Real const &magnetic_x=0.0, Real const &magnetic_y=0.0, Real const &magnetic_z=0.0)
 
__host__ __device__ Real hydro_utilities::Calc_Pressure_Conserved (Real const &E, Real const &d, Real const &mx, Real const &my, Real const &mz, Real const &gamma, Real const &magnetic_x=0.0, Real const &magnetic_y=0.0, Real const &magnetic_z=0.0)
 
__host__ __device__ Real hydro_utilities::Calc_Temp (Real const &P, Real const &n)
 
__host__ __device__ Real hydro_utilities::Calc_Temp_Conserved (Real const E, Real const d, Real const mx, Real const my, Real const mz, Real const gamma, Real const n, Real const magnetic_x=0.0, Real const magnetic_y=0.0, Real const magnetic_z=0.0)
 Compute the temperature from the conserved variables.
 
__host__ __device__ Real hydro_utilities::Calc_Energy_Primitive (Real const &P, Real const &d, Real const &vx, Real const &vy, Real const &vz, Real const &gamma, Real const &magnetic_x=0.0, Real const &magnetic_y=0.0, Real const &magnetic_z=0.0)
 
__host__ __device__ Real hydro_utilities::Calc_Energy_Conserved (Real const &P, Real const &d, Real const &momentum_x, Real const &momentum_y, Real const &momentum_z, Real const &gamma, Real const &magnetic_x=0.0, Real const &magnetic_y=0.0, Real const &magnetic_z=0.0)
 
__host__ __device__ Real hydro_utilities::Get_Pressure_From_DE (Real const &E, Real const &U_total, Real const &U_advected, Real const &gamma)
 
__host__ __device__ Real hydro_utilities::Calc_Kinetic_Energy_From_Velocity (Real const &d, Real const &vx, Real const &vy, Real const &vz)
 Compute the kinetic energy from the density and velocities.
 
__host__ __device__ Real hydro_utilities::Calc_Kinetic_Energy_From_Momentum (Real const &d, Real const &mx, Real const &my, Real const &mz)
 Compute the kinetic energy from the density and momenta.
 
__host__ __device__ Real hydro_utilities::Calc_Sound_Speed (Real const &E, Real const &d, Real const &mx, Real const &my, Real const &mz, Real const &gamma)
 Compute the sound speed in the cell from conserved variables.
 
__host__ __device__ Real hydro_utilities::Calc_Sound_Speed (Real const &P, Real const &d, Real const &gamma)
 Compute the sound in the cell from primitive variables.
 
template<uint dir = 0>
__host__ __device__ Conserved hydro_utilities::Load_Cell_Conserved (Real const *dev_conserved, size_t const xid, size_t const yid, size_t const zid, size_t const nx, size_t const ny, size_t const n_cells)
 Load the conserved variables from a single cell. Note that with MHD this returns cell-centered magnetic fields, not face centered fields.
 
__host__ __device__ Primitive hydro_utilities::Conserved_2_Primitive (Conserved const &conserved_in, Real const gamma)
 Convert Conserved cell centered variables to primitive variables.
 
__host__ __device__ Conserved hydro_utilities::Primitive_2_Conserved (Primitive const &primitive_in, Real const gamma)
 Convert primitive cell centered variables to conserved variables.
 
template<uint dir = 0>
__host__ __device__ Primitive hydro_utilities::Load_Cell_Primitive (Real const *dev_conserved, size_t const xid, size_t const yid, size_t const zid, size_t const nx, size_t const ny, size_t const n_cells, Real const gamma)
 Load the primitive variables from a single cell. Note that with MHD this returns cell-centered magnetic fields, not face centered fields.
 

Detailed Description

Contains the declaration of various utility functions for CUDA.

Contains the declaration of various utility functions for hydro.

Author
Helena Richie (helen.nosp@m.aric.nosp@m.hie@p.nosp@m.itt..nosp@m.edu)