24 template<
class Device, VarType VT, PhiInterpType PIT, TorType TT, KinType KT, ScatterType ST = ScatterType::Atomic>
28 template<
class Device, VarType VT, PhiInterpType PIT>
34 Kokkos::View<field_type*,Kokkos::LayoutRight,Device>
f;
37 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nnode) {}
38 GridField(std::string name,
int nnode) : f(name,nnode) {}
40 int size()
const {
return f.size();}
41 int nnode()
const {
return f.extent(0);}
43 int nphi()
const {
return 1;}
45 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
46 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int inode)
const {
return f(inode);}
50 f(node).scatter(wts, particle_weight);
55 for (
int j = 0; j<3; j++){
58 double wp=grid_wts.p[j][i_simd];
61 scatter(node, wts, wp*particle_weight);
70 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
71 if(grid_wts.is_invalid(i_simd))
continue;
74 for (
int ip = 0; ip<3; ip++){
76 double wp = grid_wts.p[ip][i_simd];
77 f(node).gather(fld,i_simd,wp);
87 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
88 if(grid_wts.is_invalid(i_simd))
continue;
92 for (
int ip = 0; ip<3; ip++){
94 double wp = grid_wts.p[ip][i_simd];
95 f(node).gather(fld,i_simd,wp,phi_wts.
w);
101 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
102 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(data()), ndoubles_in_grid_field);
103 Kokkos::deep_copy(view_1d_double, 0.0);
111 View<double*,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode());
113 Kokkos::deep_copy(dest_view, f_unmanaged);
120 constexpr
int n_phi = field_type::NPHI();
123 View<double**,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode(), n_phi);
126 Kokkos::parallel_for(
"var_transpose_copy", Kokkos::RangePolicy<ExSpace>( 0, nnode()), KOKKOS_LAMBDA(
const int inode){
127 for(
int iphi=0; iphi<n_phi; iphi++){
128 dest_view(iphi, inode) = f_unmanaged(inode, iphi);
137 constexpr
int n_phi = field_type::NPHI();
140 View<double**,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode(), n_phi);
143 Kokkos::parallel_for(
"var_transpose_copy", Kokkos::RangePolicy<ExSpace>( 0, nnode()), KOKKOS_LAMBDA(
const int inode){
144 for(
int iphi=0; iphi<n_phi; iphi++){
145 f_unmanaged(inode, iphi) = src_view(iphi, inode);
153 static KOKKOS_INLINE_FUNCTION
void view_gather3(
const Grid<DeviceType>& grid,
const View<double*,CLayout,Device>& view1,
const View<double*,CLayout,Device>& view2,
const View<double*,CLayout,Device>& view3,
const SimdGridWeights<Order::One, PIT_GLOBAL>& grid_wts,
double& val1,
double& val2,
double& val3,
int i_simd){
157 for (
int ip=0; ip<3; ip++){
159 val1 += view1(nd)*grid_wts.p[ip][i_simd];
160 val2 += view2(nd)*grid_wts.p[ip][i_simd];
161 val3 += view3(nd)*grid_wts.p[ip][i_simd];
167 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
168 if(grid_wts.itr[i_simd]<=0)
continue;
169 for (
int ip = 0; ip < 3; ip++){
171 val[i_simd] += grid_wts.p[ip][i_simd]*view(node);
179 val.
phi[i_simd] = 0.0;
180 for (
int ip = 0; ip<3; ip++){
182 double wp = grid_wts.p[ip][i_simd];
183 view(ind,node).gather(val, i_simd, wp);
187 static KOKKOS_INLINE_FUNCTION
void view_gyro_scatter3(
const Grid<DeviceType>& grid,
const View<double**,CLayout,Device>& view1,
const View<double**,CLayout,Device>& view2,
const View<double**,CLayout,Device>& view3,
const SimdGridWeights<Order::One, PIT_GLOBAL>& grid_wts,
double val1,
double val2,
double val3,
int i_simd,
const LinearWeights& rho_wts,
bool is_gyro){
189 for (
int ip = 0; ip < 3; ip++){
191 Kokkos::atomic_add(&(view1(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val1);
192 Kokkos::atomic_add(&(view2(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val2);
193 Kokkos::atomic_add(&(view3(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val3);
195 Kokkos::atomic_add(&(view1(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val1);
196 Kokkos::atomic_add(&(view2(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val2);
197 Kokkos::atomic_add(&(view3(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val3);
204 for (
int j = 0; j<3; j++){
206 double wp=grid_wts.p[j][i_simd];
208 Kokkos::atomic_add(&(view(ind,node)), wp*val);
213 for (
int j = 0; j<3; j++){
215 double wp=grid_wts.p[j][i_simd];
217 Kokkos::atomic_add(&(view(node)), wp*val);
222 for (
int j = 0; j<3; j++){
224 double wp=grid_wts.p[j][i_simd];
226 Kokkos::atomic_add(&(view(0,node)), wp*wphi*val);
227 Kokkos::atomic_add(&(view(1,node)), wp*(1.0-wphi)*val);
231 static KOKKOS_INLINE_FUNCTION
void view_odim_variance(
const Grid<DeviceType>& grid,
const View<double**,CLayout,Device>& view,
const View<double**,CLayout,Device>& variance,
int ind,
const SimdGridWeights<Order::One, PIT_GLOBAL>& grid_wts,
double val,
int i_simd){
232 for (
int j = 0; j<3; j++){
234 double wp=grid_wts.p[j][i_simd];
236 double tmp = view(ind,node) - wp*val;
237 Kokkos::atomic_add(&(variance(ind,node)), tmp*tmp);
241 static KOKKOS_INLINE_FUNCTION
void view_rep_scatter3(
const Grid<DeviceType>& grid,
const View<double***,CLayout,Device>& view,
int ind1,
int ind2,
int ind3,
const SimdGridWeights<Order::One, PIT_GLOBAL>& grid_wts,
double val1,
double val2,
double val3,
int ithread,
int i_simd){
243 for (
int ip = 0; ip < 3; ip++){
245 double wp = grid_wts.p[ip][i_simd];
247 access_add(&(view(ithread,node,ind1)),wp*val1);
248 access_add(&(view(ithread,node,ind2)),wp*val2);
249 access_add(&(view(ithread,node,ind3)),wp*val3);
254 template<
class Device, VarType VT, PhiInterpType PIT>
260 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
263 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nnode, nrho+1) {}
264 GridField(std::string name,
int nrho,
int nnode) : f(name,nnode, nrho+1) {}
266 int size()
const {
return f.size();}
267 int nnode()
const {
return f.extent(0);}
270 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
271 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int inode,
int irho)
const {
return f(inode, irho);}
277 int irho = wts.rho[0].i;
279 int irho = wts.rho.i;
281 f(node,irho).scatter(wts, particle_weight, f(node,irho+1));
286 for (
int j = 0; j<3; j++){
289 double wp=grid_wts.p[j][i_simd];
292 scatter(node, wts, wp*particle_weight);
297 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
298 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
299 Kokkos::deep_copy(view_1d_double, 0.0);
304 template<
class Device, VarType VT, PhiInterpType PIT>
310 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
316 int size()
const {
return f.size();}
317 int nnode()
const {
return f.extent(1);}
320 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
321 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int ithread,
int inode)
const {
return f(ithread, inode);}
325 f(ithread,node).scatter(wts, particle_weight);
330 for (
int j = 0; j<3; j++){
333 double wp=grid_wts.p[j][i_simd];
336 scatter(ithread, node, wts, wp*particle_weight);
341 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
342 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
343 Kokkos::deep_copy(view_1d_double, 0.0);
347 template<
class Device, VarType VT, PhiInterpType PIT>
353 Kokkos::View<field_type***,Kokkos::LayoutRight,Device>
f;
359 int size()
const {
return f.size();}
360 int nnode()
const {
return f.extent(1);}
363 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
364 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int ithread,
int inode,
int irho)
const {
return f(ithread,inode, irho);}
370 int irho = wts.rho[0].i;
372 int irho = wts.rho.i;
374 f(ithread,node,irho).scatter(wts, particle_weight, f(ithread,node,irho+1));
379 for (
int j = 0; j<3; j++){
382 double wp=grid_wts.p[j][i_simd];
385 scatter(ithread, node, wts, wp*particle_weight);
390 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
391 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
392 Kokkos::deep_copy(view_1d_double, 0.0);
397 template<
class Device, VarType VT, PhiInterpType PIT>
403 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
406 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nphi, nnode) {}
407 GridField(std::string name,
int nphi,
int nnode) : f(name,nphi, nnode) {}
409 int size()
const {
return f.size();}
410 int nnode()
const {
return f.extent(1);}
412 int nphi()
const {
return f.extent(0);}
413 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
414 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int iphi,
int inode)
const {
return f(iphi, inode);}
422 Kokkos::View<double**,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>
unmanaged()
const{
423 return Kokkos::View<double**,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>((
double*)(f.data()), f.layout());
427 template<
class Device, VarType VT, PhiInterpType PIT>
433 Kokkos::View<field_type***,Kokkos::LayoutRight,Device>
f;
436 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nphi, nnode, nrho+1) {}
438 int size()
const {
return f.size();}
439 int nnode()
const {
return f.extent(1);}
441 int nphi()
const {
return f.extent(0);}
442 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
443 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int iphi,
int inode,
int irho)
const {
return f(iphi, inode, irho);}
457 template<
typename T1,
typename T2>
460 dest = T1(
"grid_field",src.nphi(), src.nrhop1()-1, src.nnode());
462 Kokkos::deep_copy(dest.f, src.f);
Definition: field.hpp:256
static KOKKOS_INLINE_FUNCTION void view_odim_scatter(const Grid< DeviceType > &grid, const View< double **, CLayout, Device > &view, int ind, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, double val, int i_simd)
Definition: grid_field.hpp:203
double inv_delta_phi
1/delta_phi
Definition: grid.hpp:275
Simd< double > r
Definition: simd.hpp:150
int size() const
Definition: grid_field.hpp:409
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:37
Device device_type
Definition: grid_field.hpp:350
static KOKKOS_INLINE_FUNCTION void view_gather3(const Grid< DeviceType > &grid, const View< double *, CLayout, Device > &view1, const View< double *, CLayout, Device > &view2, const View< double *, CLayout, Device > &view3, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, double &val1, double &val2, double &val3, int i_simd)
Definition: grid_field.hpp:153
Device device_type
Definition: grid_field.hpp:400
int nnode() const
Definition: grid_field.hpp:360
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:406
int nphi() const
Definition: grid_field.hpp:362
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:45
int size() const
Definition: grid_field.hpp:40
GridField(std::string name, int nrho, int nnode)
Definition: grid_field.hpp:264
void transpose_copy_to_double_view(const View< double **, CLayout, Device > &dest_view) const
Definition: grid_field.hpp:118
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:270
static KOKKOS_INLINE_FUNCTION void view_gyro_scatter3(const Grid< DeviceType > &grid, const View< double **, CLayout, Device > &view1, const View< double **, CLayout, Device > &view2, const View< double **, CLayout, Device > &view3, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, double val1, double val2, double val3, int i_simd, const LinearWeights &rho_wts, bool is_gyro)
Definition: grid_field.hpp:187
GridField(std::string name, int nrho, int nnode)
Definition: grid_field.hpp:357
KOKKOS_INLINE_FUNCTION void scatter(int node, const FieldWeights< GyroKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:274
void copy_to_double_view(const View< double *, CLayout, Device > &dest_view) const
Definition: grid_field.hpp:109
static KOKKOS_INLINE_FUNCTION void view_ff_scatter(const Grid< DeviceType > &grid, const View< double **, CLayout, Device > &view, const SimdGridWeights< Order::One, PhiInterpType::Planes > &grid_wts, double wphi, double val, int i_simd)
Definition: grid_field.hpp:221
Definition: linear_weights.hpp:7
int size() const
Definition: grid_field.hpp:316
int size() const
Definition: grid_field.hpp:266
Definition: field_weights.hpp:13
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:260
Definition: globals.hpp:89
Definition: grid_weights.hpp:51
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:413
GridField(std::string name, int nphi, int nnode)
Definition: grid_field.hpp:407
GridField(std::string name, int nnode)
Definition: grid_field.hpp:38
field_type * data() const
Definition: grid_field.hpp:315
Kokkos::View< double **, Kokkos::LayoutRight, Device, Kokkos::MemoryTraits< Kokkos::Unmanaged > > unmanaged() const
Definition: grid_field.hpp:422
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const FieldWeights< GyroKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:378
int nphi() const
Definition: grid_field.hpp:43
void scatter(const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const GridFieldPack< DeviceType, PIT > &gfpack, const Species< DeviceType > &species, const Charge< DeviceType, KT > &charge)
Definition: scatter.cpp:239
int nrhop1() const
Definition: grid_field.hpp:440
GridField()
Definition: grid_field.hpp:435
int nplanes
Number of planes.
Definition: grid.hpp:272
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:320
int nrhop1() const
Definition: grid_field.hpp:411
KOKKOS_INLINE_FUNCTION void scatter(int node, const FieldWeights< DriftKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:49
Kokkos::LayoutRight CLayout
Definition: space_settings.hpp:67
void reset_to_zero()
Definition: grid_field.hpp:389
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:442
int size() const
Definition: grid_field.hpp:438
field_type * data() const
Definition: grid_field.hpp:408
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:313
Definition: grid_field.hpp:25
KOKKOS_INLINE_FUNCTION void gather(const Grid< Device > &grid, const SimdGridWeights< Order::One, PhiInterpType::Planes > &grid_wts, const Simd< double > &phi, Simd< double > &fld) const
Definition: grid_field.hpp:83
field_type * data() const
Definition: grid_field.hpp:39
void reset_to_zero()
Definition: grid_field.hpp:100
TorType
Definition: grid_field.hpp:17
int nphi() const
Definition: grid_field.hpp:269
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const FieldWeights< DriftKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:329
int size() const
Definition: grid_field.hpp:359
GridField()
Definition: grid_field.hpp:36
int nrhop1() const
Definition: grid_field.hpp:268
Kokkos::View< field_type *, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:34
Device device_type
Definition: grid_field.hpp:257
KOKKOS_INLINE_FUNCTION void access_add(T *addr, T val)
Definition: access_add.hpp:30
static KOKKOS_INLINE_FUNCTION void view_odim_variance(const Grid< DeviceType > &grid, const View< double **, CLayout, Device > &view, const View< double **, CLayout, Device > &variance, int ind, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, double val, int i_simd)
Definition: grid_field.hpp:231
void grid_field_copy(T &dest, const T &src)
Definition: grid_field.hpp:452
void transpose_copy_from_double_view(const View< double **, CLayout, Device > &src_view) const
Definition: grid_field.hpp:135
KOKKOS_INLINE_FUNCTION int get_node_index(int triangle_index, int tri_vertex_index) const
Definition: grid.tpp:891
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:263
double w[2]
Definition: linear_weights.hpp:9
Device device_type
Definition: grid_field.hpp:307
Definition: globals.hpp:90
GridField< DeviceType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > ScalarGridField
Definition: grid_field.hpp:447
GridField< Device, VT, PIT, TorType::OnePlane, KinType::DriftKin > subfield(int subfield_idx) const
Definition: grid_field.hpp:416
static KOKKOS_INLINE_FUNCTION void view_vec_odim_gather(const Grid< DeviceType > &grid, const View< Field< VarType::Vector, PhiInterpType::None > **, CLayout, Device > &view, int ind, const SimdGridWeights< Order::One, PhiInterpType::None > &grid_wts, SimdVector &val, int i_simd)
Definition: grid_field.hpp:176
static KOKKOS_INLINE_FUNCTION void view_scatter(const Grid< DeviceType > &grid, const View< double *, CLayout, Device > &view, const SimdGridWeights< Order::One, PhiInterpType::None > &grid_wts, double val, int i_simd)
Definition: grid_field.hpp:212
GridField()
Definition: grid_field.hpp:405
Simd< double > phi
Definition: simd.hpp:152
field_type * data() const
Definition: grid_field.hpp:265
int nrhop1() const
Definition: grid_field.hpp:42
KOKKOS_INLINE_FUNCTION void gather(const Grid< Device > &grid, const SimdGridWeights< Order::One, PhiInterpType::None > &grid_wts, const Simd< double > &phi, Simd< double > &fld) const
Definition: grid_field.hpp:66
Simd< double > z
Definition: simd.hpp:151
int i
Definition: linear_weights.hpp:8
KinType
Definition: globals.hpp:88
Kokkos::View< field_type ***, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:433
Device device_type
Definition: grid_field.hpp:31
field_type * data() const
Definition: grid_field.hpp:437
int nphi() const
Definition: grid_field.hpp:319
int nphi() const
Definition: grid_field.hpp:412
field_type * data() const
Definition: grid_field.hpp:358
int nnode() const
Definition: grid_field.hpp:267
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const FieldWeights< GyroKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:285
GridField()
Definition: grid_field.hpp:312
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:310
Kokkos::View< T *, Kokkos::LayoutRight, Device > my_subview(const Kokkos::View< T ****, Kokkos::LayoutRight, Device > &view, int i, int j, int k)
Definition: my_subview.hpp:8
Device device_type
Definition: grid_field.hpp:430
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const FieldWeights< DriftKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:54
int nrhop1() const
Definition: grid_field.hpp:361
int nnode() const
Definition: grid_field.hpp:410
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:363
int get_num_cpu_threads()
Definition: globals.hpp:17
Kokkos::View< field_type ***, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:353
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:436
static KOKKOS_INLINE_FUNCTION void view_gather(const Grid< DeviceType > &grid, const View< double *, CLayout, Device > &view, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, Simd< double > &val)
Definition: grid_field.hpp:165
int nnode() const
Definition: grid_field.hpp:317
GridField()
Definition: grid_field.hpp:262
void reset_to_zero()
Definition: grid_field.hpp:340
void parallel_for(const std::string name, int n_ptl, Function func, Option option, HostAoSoA aosoa_h, DeviceAoSoA aosoa_d)
Definition: streamed_parallel_for.hpp:252
KOKKOS_INLINE_FUNCTION void scatter(int ithread, int node, const FieldWeights< DriftKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:324
int nnode() const
Definition: grid_field.hpp:41
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:403
int nrhop1() const
Definition: grid_field.hpp:318
GridField()
Definition: grid_field.hpp:355
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:356
static KOKKOS_INLINE_FUNCTION void view_rep_scatter3(const Grid< DeviceType > &grid, const View< double ***, CLayout, Device > &view, int ind1, int ind2, int ind3, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, double val1, double val2, double val3, int ithread, int i_simd)
Definition: grid_field.hpp:241
int nnode() const
Definition: grid_field.hpp:439
void reset_to_zero()
Definition: grid_field.hpp:296
int nphi() const
Definition: grid_field.hpp:441
GridField(std::string name, int nnode)
Definition: grid_field.hpp:314
KOKKOS_INLINE_FUNCTION void scatter(int ithread, int node, const FieldWeights< GyroKin, PIT > &wts, double particle_weight) const
Definition: grid_field.hpp:367