7#include "../utils/basic_structs.h"
8#include "../utils/hydro_utilities.h"
10__global__
void PCM_Reconstruction_1D(Real *dev_conserved, Real *dev_bounds_L, Real *dev_bounds_R,
int n_cells,
11 int n_ghost, Real gamma,
int n_fields);
13__global__
void PCM_Reconstruction_2D(Real *dev_conserved, Real *dev_bounds_Lx, Real *dev_bounds_Rx,
14 Real *dev_bounds_Ly, Real *dev_bounds_Ry,
int nx,
int ny,
int n_ghost, Real gamma,
17__global__
void PCM_Reconstruction_3D(Real *dev_conserved, Real *dev_bounds_Lx, Real *dev_bounds_Rx,
18 Real *dev_bounds_Ly, Real *dev_bounds_Ry, Real *dev_bounds_Lz,
19 Real *dev_bounds_Rz,
int nx,
int ny,
int nz,
int n_ghost, Real gamma,
38template <u
int direction>
40 size_t const xid,
size_t const yid,
41 size_t const zid,
size_t const nx,
42 size_t const ny,
size_t const n_cells,
47 hydro_utilities::Load_Cell_Conserved<direction>(dev_conserved, xid, yid, zid, nx, ny, n_cells);
55 interface_state.density = conserved_data.density;
56 interface_state.velocity = primitive_data.velocity;
57 interface_state.momentum = conserved_data.momentum;
58 interface_state.
pressure = primitive_data.pressure;
59 interface_state.energy = conserved_data.energy;
62 interface_state.total_pressure = mhd::utils::computeTotalPressure(primitive_data.pressure, conserved_data.magnetic);
63 interface_state.magnetic = conserved_data.magnetic;
66 interface_state.gas_energy = primitive_data.gas_energy;
69 for (
size_t i = 0; i < grid_enum::nscalars; i++) {
70 interface_state.scalar[i] = primitive_data.scalar[i];
74 return interface_state;
__host__ __device__ Primitive Conserved_2_Primitive(Conserved const &conserved_in, Real const gamma)
Convert Conserved cell centered variables to primitive variables.
Definition hydro_utilities.h:294
Namespace to contain various utilities for the interface reconstruction kernels.
Definition pcm_cuda.h:23
reconstruction::InterfaceState __device__ __host__ PCM_Reconstruction(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)
Perform PCM reconstruction for a given cell.
Definition pcm_cuda.h:39
A data only struct for the conserved variables.
Definition basic_structs.h:83
A data only struct for the primitive variables.
Definition basic_structs.h:124
Definition basic_structs.h:165
Real pressure
Note that pressure here is the gas pressure not the total pressure which would include the magnetic c...
Definition basic_structs.h:169