23 template<
class Device, VarType VT, PhiInterpType PIT, TorType TT, KinType KT, ScatterType ST = ScatterType::Atomic>
27 template<
class Device, VarType VT, PhiInterpType PIT>
33 Kokkos::View<field_type*,Kokkos::LayoutRight,Device>
f;
36 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nnode) {}
37 GridField(std::string name,
int nnode) : f(name,nnode) {}
39 int size()
const {
return f.size();}
40 int nnode()
const {
return f.extent(0);}
42 int nphi()
const {
return 1;}
44 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
45 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int inode)
const {
return f(inode);}
49 f(node).scatter(phi_wts, i_simd, particle_weight);
54 for (
int j = 0; j<3; j++){
57 double wp=grid_wts.p[j][i_simd];
60 scatter(node, grid_wts.phi_wts, i_simd, wp*particle_weight);
69 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
70 if(grid_wts.is_invalid(i_simd))
continue;
73 for (
int ip = 0; ip<3; ip++){
75 double wp = grid_wts.p[ip][i_simd];
76 f(node).gather(fld,i_simd,wp);
86 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
87 if(grid_wts.is_invalid(i_simd))
continue;
90 for (
int ip = 0; ip<3; ip++){
92 double wp = grid_wts.p[ip][i_simd];
93 f(node).gather(fld,i_simd,wp,grid_wts.phi_wts);
99 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
100 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(data()), ndoubles_in_grid_field);
101 Kokkos::deep_copy(view_1d_double, 0.0);
109 View<double*,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode());
111 Kokkos::deep_copy(dest_view, f_unmanaged);
118 constexpr
int n_phi = field_type::NPHI();
121 View<double**,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode(), n_phi);
124 Kokkos::parallel_for(
"var_transpose_copy", Kokkos::RangePolicy<ExSpace>( 0, nnode()), KOKKOS_LAMBDA(
const int inode){
125 for(
int iphi=0; iphi<n_phi; iphi++){
126 dest_view(iphi, inode) = f_unmanaged(inode, iphi);
135 constexpr
int n_phi = field_type::NPHI();
138 View<double**,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> f_unmanaged((
double*)data(),nnode(), n_phi);
141 Kokkos::parallel_for(
"var_transpose_copy", Kokkos::RangePolicy<ExSpace>( 0, nnode()), KOKKOS_LAMBDA(
const int inode){
142 for(
int iphi=0; iphi<n_phi; iphi++){
143 f_unmanaged(inode, iphi) = src_view(iphi, inode);
151 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){
155 for (
int ip=0; ip<3; ip++){
157 val1 += view1(nd)*grid_wts.p[ip][i_simd];
158 val2 += view2(nd)*grid_wts.p[ip][i_simd];
159 val3 += view3(nd)*grid_wts.p[ip][i_simd];
165 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
166 if(grid_wts.itr[i_simd]<=0)
continue;
167 for (
int ip = 0; ip < 3; ip++){
169 val[i_simd] += grid_wts.p[ip][i_simd]*view(node);
177 val.
phi[i_simd] = 0.0;
178 for (
int ip = 0; ip<3; ip++){
180 double wp = grid_wts.p[ip][i_simd];
181 view(ind,node).gather(val, i_simd, wp);
185 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){
187 for (
int ip = 0; ip < 3; ip++){
189 Kokkos::atomic_add(&(view1(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val1);
190 Kokkos::atomic_add(&(view2(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val2);
191 Kokkos::atomic_add(&(view3(rho_wts.
i, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[0]*val3);
193 Kokkos::atomic_add(&(view1(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val1);
194 Kokkos::atomic_add(&(view2(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val2);
195 Kokkos::atomic_add(&(view3(rho_wts.
i+1, node)), grid_wts.p[ip][i_simd]*rho_wts.
w[1]*val3);
202 for (
int j = 0; j<3; j++){
204 double wp=grid_wts.p[j][i_simd];
206 Kokkos::atomic_add(&(view(ind,node)), wp*val);
211 for (
int j = 0; j<3; j++){
213 double wp=grid_wts.p[j][i_simd];
215 Kokkos::atomic_add(&(view(node)), wp*val);
220 for (
int j = 0; j<3; j++){
222 double wp=grid_wts.p[j][i_simd];
224 Kokkos::atomic_add(&(view(0,node)), wp*wphi*val);
225 Kokkos::atomic_add(&(view(1,node)), wp*(1.0-wphi)*val);
229 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){
230 for (
int j = 0; j<3; j++){
232 double wp=grid_wts.p[j][i_simd];
234 double tmp = view(ind,node) - wp*val;
235 Kokkos::atomic_add(&(variance(ind,node)), tmp*tmp);
239 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){
241 for (
int ip = 0; ip < 3; ip++){
243 double wp = grid_wts.p[ip][i_simd];
245 access_add(&(view(ithread,node,ind1)),wp*val1);
246 access_add(&(view(ithread,node,ind2)),wp*val2);
247 access_add(&(view(ithread,node,ind3)),wp*val3);
252 template<
class Device, VarType VT, PhiInterpType PIT>
258 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
261 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nnode, nrho+1) {}
262 GridField(std::string name,
int nrho,
int nnode) : f(name,nnode, nrho+1) {}
264 int size()
const {
return f.size();}
265 int nnode()
const {
return f.extent(0);}
268 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
269 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int inode,
int irho)
const {
return f(inode, irho);}
273 int irho = rho_wts.
irho(i_simd);
274 f(node,irho).scatter(rho_wts, phi_wts, i_simd, particle_weight, f(node,irho+1));
279 for (
int j = 0; j<3; j++){
282 double wp=grid_wts.p[j][i_simd];
285 scatter(node, grid_wts.phi_wts, rho_wts, i_simd, wp*particle_weight);
290 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
291 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
292 Kokkos::deep_copy(view_1d_double, 0.0);
297 template<
class Device, VarType VT, PhiInterpType PIT>
303 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
309 int size()
const {
return f.size();}
310 int nnode()
const {
return f.extent(1);}
313 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
314 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int ithread,
int inode)
const {
return f(ithread, inode);}
318 f(ithread,node).scatter(phi_wts, i_simd, particle_weight);
323 for (
int j = 0; j<3; j++){
326 double wp=grid_wts.p[j][i_simd];
329 scatter(ithread, node, grid_wts.phi_wts, i_simd, wp*particle_weight);
334 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
335 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
336 Kokkos::deep_copy(view_1d_double, 0.0);
340 template<
class Device, VarType VT, PhiInterpType PIT>
346 Kokkos::View<field_type***,Kokkos::LayoutRight,Device>
f;
352 int size()
const {
return f.size();}
353 int nnode()
const {
return f.extent(1);}
356 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
357 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int ithread,
int inode,
int irho)
const {
return f(ithread,inode, irho);}
361 int irho = rho_wts.
irho(i_simd);
362 f(ithread,node,irho).scatter(rho_wts, phi_wts, i_simd, particle_weight, f(ithread,node,irho+1));
367 for (
int j = 0; j<3; j++){
370 double wp=grid_wts.p[j][i_simd];
373 scatter(ithread, node, grid_wts.phi_wts, rho_wts, i_simd, wp*particle_weight);
378 int ndoubles_in_grid_field = f.size()*field_type::SIZE();
379 Kokkos::View<double*,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>> view_1d_double((
double*)(f.data()), ndoubles_in_grid_field);
380 Kokkos::deep_copy(view_1d_double, 0.0);
385 template<
class Device, VarType VT, PhiInterpType PIT>
391 Kokkos::View<field_type**,Kokkos::LayoutRight,Device>
f;
394 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nphi, nnode) {}
395 GridField(std::string name,
int nphi,
int nnode) : f(name,nphi, nnode) {}
397 int size()
const {
return f.size();}
398 int nnode()
const {
return f.extent(1);}
400 int nphi()
const {
return f.extent(0);}
401 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
402 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int iphi,
int inode)
const {
return f(iphi, inode);}
410 Kokkos::View<double**,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>
unmanaged()
const{
411 return Kokkos::View<double**,Kokkos::LayoutRight,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>((
double*)(f.data()), f.layout());
415 template<
class Device, VarType VT, PhiInterpType PIT>
421 Kokkos::View<field_type***,Kokkos::LayoutRight,Device>
f;
424 GridField(std::string name,
int nphi,
int nrho,
int nnode) : f(name,nphi, nnode, nrho+1) {}
426 int size()
const {
return f.size();}
427 int nnode()
const {
return f.extent(1);}
429 int nphi()
const {
return f.extent(0);}
430 KOKKOS_INLINE_FUNCTION
bool is_allocated()
const {
return f.is_allocated();}
431 KOKKOS_INLINE_FUNCTION
field_type& operator ()(
int iphi,
int inode,
int irho)
const {
return f(iphi, inode, irho);}
455 template<
typename T1,
typename T2>
458 dest = T1(
"grid_field",src.nphi(), src.nrhop1()-1, src.nnode());
460 Kokkos::deep_copy(dest.f, src.f);
Definition: field.hpp:280
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:201
GridField< DeviceType, VarType::Vector2D, PhiInterpType::None, TorType::OnePlane, KinType::GyroKin > Efield2DGyroType
Definition: grid_field.hpp:443
Simd< double > r
Definition: simd.hpp:150
int size() const
Definition: grid_field.hpp:397
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:36
Device device_type
Definition: grid_field.hpp:343
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:151
Device device_type
Definition: grid_field.hpp:388
int nnode() const
Definition: grid_field.hpp:353
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const SimdGyroWeights< DriftKin > &rho_wts, double particle_weight) const
Definition: grid_field.hpp:322
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:394
int nphi() const
Definition: grid_field.hpp:355
GridField< DeviceType, VarType::Scalar, PIT_GLOBAL, TorType::MultiplePlanes, KinType::DriftKin > PotType
Definition: grid_field.hpp:440
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:44
int size() const
Definition: grid_field.hpp:39
GridField(std::string name, int nrho, int nnode)
Definition: grid_field.hpp:262
void transpose_copy_to_double_view(const View< double **, CLayout, Device > &dest_view) const
Definition: grid_field.hpp:116
KOKKOS_INLINE_FUNCTION int irho(int i_simd) const
Definition: gyro_radius.hpp:107
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:268
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:185
GridField(std::string name, int nrho, int nnode)
Definition: grid_field.hpp:350
void copy_to_double_view(const View< double *, CLayout, Device > &dest_view) const
Definition: grid_field.hpp:107
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:219
Definition: linear_weights.hpp:8
int size() const
Definition: grid_field.hpp:309
int size() const
Definition: grid_field.hpp:264
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:258
Definition: globals.hpp:89
Definition: grid_weights.hpp:47
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:401
GridField(std::string name, int nphi, int nnode)
Definition: grid_field.hpp:395
GridField(std::string name, int nnode)
Definition: grid_field.hpp:37
field_type * data() const
Definition: grid_field.hpp:308
Kokkos::View< double **, Kokkos::LayoutRight, Device, Kokkos::MemoryTraits< Kokkos::Unmanaged > > unmanaged() const
Definition: grid_field.hpp:410
int nphi() const
Definition: grid_field.hpp:42
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:234
GridField< DeviceType, VarType::Vector2D, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > Efield2DType
Definition: grid_field.hpp:439
int nrhop1() const
Definition: grid_field.hpp:428
GridField()
Definition: grid_field.hpp:423
GridField< DeviceType, VarType::Vector, PhiInterpType::Planes, TorType::MultiplePlanes, KinType::DriftKin > EfieldType
Definition: grid_field.hpp:438
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:313
int nrhop1() const
Definition: grid_field.hpp:399
Kokkos::LayoutRight CLayout
Definition: space_settings.hpp:67
GridField< DeviceType, VarType::Vector2D, PIT_GLOBAL, TorType::OnePlane, KinType::DriftKin > E00Type
Definition: grid_field.hpp:441
void reset_to_zero()
Definition: grid_field.hpp:377
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:430
int size() const
Definition: grid_field.hpp:426
constexpr KOKKOS_INLINE_FUNCTION PhiWtUsage get_phi_wt_usage(PhiInterpType PIT)
Definition: grid_weights.hpp:15
field_type * data() const
Definition: grid_field.hpp:396
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:306
Definition: grid_field.hpp:24
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:82
GridField< DeviceType, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KinType::DriftKin > AxisymPotType
Definition: grid_field.hpp:437
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const SimdGyroWeights< DriftKin > &rho_wts, double particle_weight) const
Definition: grid_field.hpp:53
field_type * data() const
Definition: grid_field.hpp:38
Definition: grid_weights.hpp:18
void reset_to_zero()
Definition: grid_field.hpp:98
TorType
Definition: grid_field.hpp:16
int nphi() const
Definition: grid_field.hpp:267
Definition: gyro_radius.hpp:114
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const SimdGyroWeights< GyroKin > &rho_wts, double particle_weight) const
Definition: grid_field.hpp:278
int size() const
Definition: grid_field.hpp:352
GridField()
Definition: grid_field.hpp:35
Definition: gyro_radius.hpp:84
int nrhop1() const
Definition: grid_field.hpp:266
Kokkos::View< field_type *, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:33
Device device_type
Definition: grid_field.hpp:255
KOKKOS_INLINE_FUNCTION void scatter(int ithread, int node, const SimdPhiWeights< get_phi_wt_usage(PIT)> &phi_wts, const SimdGyroWeights< GyroKin > &rho_wts, int i_simd, double particle_weight) const
Definition: grid_field.hpp:360
KOKKOS_INLINE_FUNCTION void access_add(T *addr, T val)
Definition: access_add.hpp:30
KOKKOS_INLINE_FUNCTION void scatter(int node, const SimdPhiWeights< get_phi_wt_usage(PIT)> &phi_wts, int i_simd, double particle_weight) const
Definition: grid_field.hpp:48
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:229
void grid_field_copy(T &dest, const T &src)
Definition: grid_field.hpp:450
void transpose_copy_from_double_view(const View< double **, CLayout, Device > &src_view) const
Definition: grid_field.hpp:133
KOKKOS_INLINE_FUNCTION int get_node_index(int triangle_index, int tri_vertex_index) const
Definition: grid.tpp:146
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:261
KOKKOS_INLINE_FUNCTION void scatter(int ithread, int node, const SimdPhiWeights< get_phi_wt_usage(PIT)> &phi_wts, int i_simd, double particle_weight) const
Definition: grid_field.hpp:317
double w[2]
Definition: linear_weights.hpp:10
Device device_type
Definition: grid_field.hpp:300
Definition: globals.hpp:90
GridField< DeviceType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > ScalarGridField
Definition: grid_field.hpp:435
GridField< Device, VT, PIT, TorType::OnePlane, KinType::DriftKin > subfield(int subfield_idx) const
Definition: grid_field.hpp:404
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:174
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:210
GridField()
Definition: grid_field.hpp:393
Simd< double > phi
Definition: simd.hpp:152
field_type * data() const
Definition: grid_field.hpp:263
int nrhop1() const
Definition: grid_field.hpp:41
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:65
Simd< double > z
Definition: simd.hpp:151
int i
Definition: linear_weights.hpp:9
KinType
Definition: globals.hpp:88
Kokkos::View< field_type ***, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:421
Device device_type
Definition: grid_field.hpp:30
GridField< DeviceType, VarType::Vector2D, PIT_GLOBAL, TorType::OnePlane, KinType::GyroKin > E00GyroType
Definition: grid_field.hpp:445
field_type * data() const
Definition: grid_field.hpp:425
int nphi() const
Definition: grid_field.hpp:312
int nphi() const
Definition: grid_field.hpp:400
field_type * data() const
Definition: grid_field.hpp:351
int nnode() const
Definition: grid_field.hpp:265
GridField()
Definition: grid_field.hpp:305
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:303
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
GridField< DeviceType, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KinType::GyroKin > PotGyroType
Definition: grid_field.hpp:444
KOKKOS_INLINE_FUNCTION void scatter(int node, const SimdPhiWeights< get_phi_wt_usage(PIT)> &phi_wts, const SimdGyroWeights< GyroKin > &rho_wts, int i_simd, double particle_weight) const
Definition: grid_field.hpp:272
Device device_type
Definition: grid_field.hpp:418
int nrhop1() const
Definition: grid_field.hpp:354
int nnode() const
Definition: grid_field.hpp:398
KOKKOS_INLINE_FUNCTION bool is_allocated() const
Definition: grid_field.hpp:356
int get_num_cpu_threads()
Definition: globals.hpp:17
Kokkos::View< field_type ***, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:346
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:424
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:163
int nnode() const
Definition: grid_field.hpp:310
GridField()
Definition: grid_field.hpp:260
void reset_to_zero()
Definition: grid_field.hpp:333
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
int nnode() const
Definition: grid_field.hpp:40
GridField< DeviceType, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KinType::DriftKin > OnePlanePotType
Definition: grid_field.hpp:436
KOKKOS_INLINE_FUNCTION void scatter(const Grid< DeviceType > &grid, int ithread, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, int i_simd, const SimdGyroWeights< GyroKin > &rho_wts, double particle_weight) const
Definition: grid_field.hpp:366
GridField< DeviceType, VarType::Vector, PhiInterpType::Planes, TorType::OnePlane, KinType::GyroKin > EfieldGyroType
Definition: grid_field.hpp:442
Kokkos::View< field_type **, Kokkos::LayoutRight, Device > f
Definition: grid_field.hpp:391
int nrhop1() const
Definition: grid_field.hpp:311
GridField()
Definition: grid_field.hpp:348
GridField(std::string name, int nphi, int nrho, int nnode)
Definition: grid_field.hpp:349
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:239
int nnode() const
Definition: grid_field.hpp:427
void reset_to_zero()
Definition: grid_field.hpp:289
int nphi() const
Definition: grid_field.hpp:429
GridField(std::string name, int nnode)
Definition: grid_field.hpp:307