28 Kokkos::deep_copy(
widx, -1);
29 Kokkos::deep_copy(
iphi, -1);
30 Kokkos::deep_copy(
en_para, -1.0);
31 Kokkos::deep_copy(
en_perp, -1.0);
38 View<int*,CLayout,Device>
widx;
39 View<int*,CLayout,Device>
iphi;
43 View<SheathVec*,CLayout,Device>
ph_out;
48 template<
class Device>
59 View<double**,CLayout,Device>
pot;
60 View<double***,CLayout,Device>
lost;
61 View<double***,CLayout,Device>
ilost;
64 View<double***,CLayout,Device>
en_max;
70 KOKKOS_INLINE_FUNCTION
void deposition_diagnostics_and_w1(
const Species<Device> &species,
const Grid<Device> &grid,
const MagneticField<Device> &
magnetic_field,
const Neutrals<Device> &neutrals,
const HeatDiagnostics<Device> &heat_diag,
const SimdParticles &old_part,
SimdParticles &part,
const SimdVector2D& xff,
const Simd<int>& iphi,
const Simd<double>& en_para,
const Simd<double>& en_perp,
SimdPhase& new_phase,
const Simd<int>& widx,
const Simd<bool>& just_left_the_grid,
bool update_lost,
bool update_ilost,
bool update_neutrals,
bool update_heat_diag,
Simd<double>& dw)
const;
72 KOKKOS_INLINE_FUNCTION
void save_sheath_ptl_info(
const PushControls &push_controls,
const Species<Device> &species,
const Grid<Device> &grid,
int i_item,
const SimdParticles &old_part,
SimdParticles &part,
const Simd<int>& iphi,
const Simd<double>& en_para,
const Simd<double>& en_perp,
const SimdPhase& new_phase,
const Simd<int>& widx,
const Simd<bool>& just_left_the_grid)
const;
74 KOKKOS_INLINE_FUNCTION
void sheath_calculation(
const PushControls &push_controls,
const Species<Device> &species,
const Grid<Device> &grid,
const MagneticField<Device> &
magnetic_field,
const Neutrals<Device> &neutrals,
const HeatDiagnostics<Device> &heat_diag,
int i_item,
const SimdParticles &old_part,
const Simd<bool>& not_in_triangle,
SimdParticles &part,
SimdGridWeights<Order::One, PIT_GLOBAL>& grid_wts_new,
Simd<double>& dw)
const;
SheathParticles(int n_ptl)
Definition: sheath.hpp:19
Definition: heat_diagnostics.hpp:21
SheathParticles< Device > particles
Definition: sheath.hpp:68
Sheath()
Definition: sheath.hpp:56
void mode_2_copy_to_host() const
KOKKOS_INLINE_FUNCTION void save_sheath_ptl_info(const PushControls &push_controls, const Species< Device > &species, const Grid< Device > &grid, int i_item, const SimdParticles &old_part, SimdParticles &part, const Simd< int > &iphi, const Simd< double > &en_para, const Simd< double > &en_perp, const SimdPhase &new_phase, const Simd< int > &widx, const Simd< bool > &just_left_the_grid) const
Definition: sheath.tpp:69
View< int *, CLayout, Device > iphi
Track which phi segment the particle hit.
Definition: sheath.hpp:39
View< double *, CLayout, Device > en_para
Track parallel energy of sheath hit.
Definition: sheath.hpp:40
double phi
Definition: sheath.hpp:15
View< double *, CLayout, Device > en_perp
Track perpendicular energy of sheath hit.
Definition: sheath.hpp:41
View< double ***, CLayout, Device > ilost
Tracker of ions lost to the sheath.
Definition: sheath.hpp:61
void reorder_sheath_pot(const Grid< DeviceType > &grid) const
Definition: grid_weights.hpp:47
View< double ***, CLayout, Device > lost
Tracker of particles lost to the sheath.
Definition: sheath.hpp:60
Definition: push_controls.hpp:9
bool adjust
Whether to adjust the sheath.
Definition: sheath.hpp:66
Definition: magnetic_field.hpp:12
void write_checkpoint_files(const XGC_IO_Stream &stream) const
double r
Definition: sheath.hpp:13
void deallocate_particles()
Definition: sheath.hpp:10
void read_checkpoint_files(const Grid< DeviceType > &grid, const XGC_IO_Stream &stream, int version)
KOKKOS_INLINE_FUNCTION void deposition_diagnostics_and_w1(const Species< Device > &species, const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const Neutrals< Device > &neutrals, const HeatDiagnostics< Device > &heat_diag, const SimdParticles &old_part, SimdParticles &part, const SimdVector2D &xff, const Simd< int > &iphi, const Simd< double > &en_para, const Simd< double > &en_perp, SimdPhase &new_phase, const Simd< int > &widx, const Simd< bool > &just_left_the_grid, bool update_lost, bool update_ilost, bool update_neutrals, bool update_heat_diag, Simd< double > &dw) const
Definition: sheath.tpp:13
Definition: neutrals.hpp:9
View< int *, CLayout, Device > widx
Track which wall index the particle hit.
Definition: sheath.hpp:38
Definition: sheath.hpp:12
Definition: particles.hpp:61
Definition: xgc_io.hpp:24
void setup_mode_2(int n_tmp)
double z
Definition: sheath.hpp:14
void mode_1_copy_to_host() const
Definition: magnetic_field.F90:1
Definition: particles.hpp:17
View< double **, CLayout, Device > pot
Sheath potential.
Definition: sheath.hpp:59
void copy_lost_to_host() const
void copy_pot_to_device() const
Definition: sheath.hpp:49
Definition: species.hpp:75
SheathParticles()
Definition: sheath.hpp:35
View< double ***, CLayout, Device > en_max
The most energetic particle that hit the wall in a given section.
Definition: sheath.hpp:64
void clear_device_views() const
View< SheathVec *, CLayout, Device > ph_out
Track location outside the grid.
Definition: sheath.hpp:43
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:69
KOKKOS_INLINE_FUNCTION void sheath_calculation(const PushControls &push_controls, const Species< Device > &species, const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const Neutrals< Device > &neutrals, const HeatDiagnostics< Device > &heat_diag, int i_item, const SimdParticles &old_part, const Simd< bool > ¬_in_triangle, SimdParticles &part, SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts_new, Simd< double > &dw) const
Definition: sheath.tpp:114
View< SheathVec *, CLayout, Device > ph_back
Track location where particle was returned to.
Definition: sheath.hpp:42