1 #ifndef DISTRIBUTION_HPP
2 #define DISTRIBUTION_HPP
4 #include <Kokkos_Core.hpp>
14 template<
class Device>
18 Kokkos::View<double***,Kokkos::LayoutRight, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>
f0g_h;
19 Kokkos::View<double*,Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>
temp_ev_h;
21 View<double*,CLayout, HostType, Kokkos::MemoryTraits<Kokkos::Unmanaged>>
den_global_h;
22 View<double*,CLayout, HostType, Kokkos::MemoryTraits<Kokkos::Unmanaged>>
temp_global_h;
25 Kokkos::View<double***,Kokkos::LayoutRight,Device>
f0g;
26 Kokkos::View<double*,Kokkos::LayoutRight,Device>
temp_ev;
29 Kokkos::View<double*,Kokkos::LayoutRight,Device>
delta_n;
30 Kokkos::View<double*,Kokkos::LayoutRight,Device>
delta_u;
31 Kokkos::View<double*,Kokkos::LayoutRight,Device>
delta_t;
34 Kokkos::View<double*,Kokkos::LayoutRight,Device>
grid_vol;
38 Kokkos::View<double***,Kokkos::LayoutRight,Device>
n;
39 Kokkos::View<double***,Kokkos::LayoutRight, Device>
f_d;
40 Kokkos::View<double*,Kokkos::LayoutRight,Device>
temp_ev_d;
61 Kokkos::resize(
f0g, vgrid.
nvr, nnode, vgrid.
nvz);
63 Kokkos::resize(
delta_n, nnode_entire_plane);
64 Kokkos::resize(
delta_u, nnode_entire_plane);
65 Kokkos::resize(
delta_t, nnode_entire_plane);
70 Kokkos::resize(
f0g, 0,0,0);
78 void send_to_device(
double* delta_n_array,
double* delta_u_array,
double* delta_t_array,
int isp)
106 Kokkos::resize(
f0g, vgrid.
nvr, nnode, vgrid.
nvz);
108 Kokkos::resize(
f_d, vgrid.
nvr, nnode, vgrid.
nvz);
109 Kokkos::resize(
n, vgrid.
nvr, nnode, vgrid.
nvz);
115 Kokkos::resize(
f0g, 0,0,0);
117 Kokkos::resize(
f_d, 0,0,0);
118 Kokkos::resize(
n, 0,0,0);
Kokkos::View< double *, Kokkos::LayoutRight, Device > temp_ev
Definition: distribution.hpp:26
Kokkos::View< double *, Kokkos::LayoutRight, Device > temp_ev_d
Definition: distribution.hpp:40
Definition: velocity_grid.hpp:7
Distribution()
Definition: distribution.hpp:43
Kokkos::View< double *, Kokkos::LayoutRight, Device > delta_n
Definition: distribution.hpp:29
int nvr
full grid size (including zero)
Definition: velocity_grid.hpp:18
Kokkos::View< double ***, Kokkos::LayoutRight, Device > n
Definition: distribution.hpp:38
void subarray_deep_copy(T *array, const Kokkos::View< T *, Kokkos::LayoutRight, DeviceType > &view, int isp)
Definition: array_deep_copy.hpp:102
Kokkos::View< double *, Kokkos::LayoutRight, Device > delta_u
Definition: distribution.hpp:30
void resize_on_device(const VelocityGrid &vgrid, int nnode, int nnode_entire_plane)
Definition: distribution.hpp:60
View< double *, CLayout, HostType, Kokkos::MemoryTraits< Kokkos::Unmanaged > > temp_global_h
Definition: distribution.hpp:22
Kokkos::View< double ***, Kokkos::LayoutRight, Device > f_d
Definition: distribution.hpp:39
View< double *, CLayout, HostType, Kokkos::MemoryTraits< Kokkos::Unmanaged > > den_global_h
Definition: distribution.hpp:21
double * get_delta_t_loc()
void resize_for_update_f0_on_device(const VelocityGrid &vgrid, int nnode)
Definition: distribution.hpp:105
void resize_for_distribute_f0g_to_zero()
Definition: distribution.hpp:97
Kokkos::View< double *, Kokkos::HostSpace, Kokkos::MemoryTraits< Kokkos::Unmanaged > > temp_ev_h
Definition: distribution.hpp:19
Kokkos::View< double *, Kokkos::LayoutRight, Device > delta_t
Definition: distribution.hpp:31
double * get_delta_u_loc()
Kokkos::View< double *, Kokkos::LayoutRight, Device > grid_vol
Definition: distribution.hpp:34
Kokkos::View< double *, Kokkos::LayoutRight, Device > inv_grid_vol
Definition: distribution.hpp:37
void resize_for_update_f0_to_zero()
Definition: distribution.hpp:114
int nvz
full grid size (including negative and zero)
Definition: velocity_grid.hpp:19
void resize_to_zero()
Definition: distribution.hpp:69
Kokkos::View< double ***, Kokkos::LayoutRight, Device > f0g
Definition: distribution.hpp:25
double * get_delta_n_loc()
Definition: distribution.hpp:15
Kokkos::View< double ***, Kokkos::LayoutRight, Kokkos::HostSpace, Kokkos::MemoryTraits< Kokkos::Unmanaged > > f0g_h
Definition: distribution.hpp:18
void resize_for_distribute_f0g_on_device(const VelocityGrid &vgrid, int nnode)
Definition: distribution.hpp:91
void send_to_device(double *delta_n_array, double *delta_u_array, double *delta_t_array, int isp)
Definition: distribution.hpp:78