|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|
Declaration/implementation of functions used in dual-energy formalism. More...
#include "../global/global.h"#include "../grid/grid_enum.h"#include "../hydro/hydro_cuda.h"#include "../utils/basic_structs.h"

Go to the source code of this file.
Functions | |
| template<int NDim> | |
| __global__ void | dual_energy::Select_Internal_Energy (Real *dev_conserved, hydro_utilities::VectorXYZ< int > grid_shape, int n_ghost, int n_fields) |
| template<int NDim> | |
| __global__ void | dual_energy::Sync_Energies (Real *dev_conserved, hydro_utilities::VectorXYZ< int > grid_shape, int n_ghost, int n_fields) |
Declaration/implementation of functions used in dual-energy formalism.
| __global__ void dual_energy::Select_Internal_Energy | ( | Real * | dev_conserved, |
| hydro_utilities::VectorXYZ< int > | grid_shape, | ||
| int | n_ghost, | ||
| int | n_fields | ||
| ) |
Overwrites the total energy with the sum of the internal energy and the kinetic energy
| NDim | The number of dimensions |
| [in] | grid_shape | Specifies the shape of the grid (including ghost zones). Values along unused dimensions aren't used. |
| [in] | n_ghost | The number of ghost zones (along each used dimension) |
| [in] | gamma | The adiabatic index |
| [in] | n_fields | The number of fields used in the current simulation. |
Sync_Energies_3D kernel, we then override the E field with KE + U_advected| __global__ void dual_energy::Sync_Energies | ( | Real * | dev_conserved, |
| hydro_utilities::VectorXYZ< int > | grid_shape, | ||
| int | n_ghost, | ||
| int | n_fields | ||
| ) |
Overwrites the total energy with the sum of the internal energy and the kinetic energy
This functionality MUST be invoke in a separate kernel from the functionality implemented by Select_Internal_Energy in order to avoid race-conditions (the race-conditions would interfere with the energy selection in the other function).
| NDim | The number of dimensions |
| [in] | grid_shape | Specifies the shape of the grid (including ghost zones). Values along unused dimensions aren't used. |
| [in] | n_ghost | The number of ghost zones (along each used dimension) |
| [in] | n_fields | The number of fields used in the current simulation. |