XGCa
|
#include <heat_diagnostics.hpp>
Public Member Functions | |
HeatDiagnostics () | |
void | init (NLReader::NamelistReader &nlr, const MagneticField< Device > &magnetic_field, const Grid< Device > &grid, int nspecies) |
HeatDiagnostics (NLReader::NamelistReader &nlr, const MagneticField< Device > &magnetic_field, const Grid< Device > &grid, int nspecies) | |
int | get_nspecies () const |
void | write (Plasma &plasma, double time, int gstep) |
KOKKOS_INLINE_FUNCTION void | port (const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const Simd< bool > &just_left_the_grid, const Simd< double > &w, const Simd< double > &pot, const Simd< double > &epara, const Simd< double > &eperp, const SimdConstants &ct, const SimdPhase &old_ph, const SimdVector2D &xff_old, const SimdPhase &new_ph, int stype) const |
KOKKOS_INLINE_FUNCTION int | wall_cross2 (double r1, double z1, double r2, double z2) const |
Public Member Functions inherited from Diagnostic | |
bool | is_triggered (int step) |
bool | has_been_triggered (int step) |
int | get_period () const |
Diagnostic () | |
void | init (const std::string &name, int period, int first_step=-1) |
void | open_stream (const std::string &filename, const XGC_IO_Mode &mode) |
void | close_stream () |
void | write (const XGC_IO &xgc_io) |
void | start_write_step () |
bool | is_first_step () |
void | end_write_step () |
Public Attributes | |
int | mode |
Using mode 1 or mode 2. More... | |
int | nsection |
Number of sections. More... | |
int | npsi |
Number of psi bins. More... | |
int | nr |
Number of r bins. More... | |
int | nz |
Number of z bins. More... | |
View< double *, CLayout, Device > | rmin |
First r bin. More... | |
View< double *, CLayout, Device > | rmax |
End of last r bin. More... | |
View< double *, CLayout, Device > | dr |
dr More... | |
View< double *, CLayout, Device > | zmin |
First z bin. More... | |
View< double *, CLayout, Device > | zmax |
End of last z bin. More... | |
View< double *, CLayout, Device > | dz |
dz More... | |
View< double *, CLayout, Device > | pmin |
First psi min. More... | |
View< double *, CLayout, Device > | dp |
dpsi More... | |
View< double ******, CLayout, Device > | pv |
Array for the heat diagnostic in (r,z) More... | |
View< double *****, CLayout, Device > | pv_psi |
Array for the heat diagnostic in (psi) More... | |
int | nseg |
Number of segments. More... | |
int | nphi |
Number of phi bins. More... | |
double | delta_phi |
dphi More... | |
View< RZPair *, CLayout, Device > | x |
View< double *, CLayout, HostType > | psi2 |
View< double *, CLayout, HostType > | ds2 |
View< double *, CLayout, HostType > | strike_angle2 |
View< double *****, CLayout, Device > | pv_psi2 |
Array for the heat diagnostic in (psi^2) More... | |
Public Attributes inherited from Diagnostic | |
bool | is_on |
Additional Inherited Members | |
Protected Attributes inherited from Diagnostic | |
StepTrigger | step_trigger |
|
inline |
HeatDiagnostics< Device >::HeatDiagnostics | ( | NLReader::NamelistReader & | nlr, |
const MagneticField< Device > & | magnetic_field, | ||
const Grid< Device > & | grid, | ||
int | nspecies | ||
) |
int HeatDiagnostics< Device >::get_nspecies | ( | ) | const |
void HeatDiagnostics< Device >::init | ( | NLReader::NamelistReader & | nlr, |
const MagneticField< Device > & | magnetic_field, | ||
const Grid< Device > & | grid, | ||
int | nspecies | ||
) |
KOKKOS_INLINE_FUNCTION void HeatDiagnostics< Device >::port | ( | const Grid< Device > & | grid, |
const MagneticField< Device > & | magnetic_field, | ||
const Simd< bool > & | just_left_the_grid, | ||
const Simd< double > & | w, | ||
const Simd< double > & | pot, | ||
const Simd< double > & | epara, | ||
const Simd< double > & | eperp, | ||
const SimdConstants & | ct, | ||
const SimdPhase & | old_ph, | ||
const SimdVector2D & | xff_old, | ||
const SimdPhase & | new_ph, | ||
int | sp_type | ||
) | const |
Write heat diagnostics to an array
[in] | just_left_the_grid | Vector boolean of particles that left |
[in] | w | Vector of w1 changes |
[in] | pot | Vector of local sheath potentials |
[in] | epara | Vector of parallel energy |
[in] | eperp | Vector of perpendicular energy |
[in] | ct | Vector of particle constants |
[in] | old_ph | Vector of particles' previous phase |
[in] | xff_old | Vector of particles' previous field following coordinates |
[in] | new_ph | Vector of particles' new phase |
[in] | sp_type | Type of species (only electrons now) |
KOKKOS_INLINE_FUNCTION int HeatDiagnostics< Device >::wall_cross2 | ( | double | r1, |
double | z1, | ||
double | r2, | ||
double | z2 | ||
) | const |
This is a general routine for identifying the segment of a closed polygon intersected by the input segment. If no intersection is found, the routine returns 0.
The particular application in this code is to determine which segment of the boundary was crossed by a particle, with the crossing have been previously flagged by subroutine wall_check. The first point of the segment is the previous location of the particle. The second is its current location, which should be outside the boundary. Should this segment not intersect the boundary for some reason, the routine will return 0.
[in] | r1 | old r coordinate |
[in] | z1 | old z coordinate |
[in] | r2 | new r coordinate |
[in] | z2 | new z coordinate |
void HeatDiagnostics< Device >::write | ( | Plasma & | plasma, |
double | time, | ||
int | gstep | ||
) |
double HeatDiagnostics< Device >::delta_phi |
dphi
View<double*,CLayout,Device> HeatDiagnostics< Device >::dp |
dpsi
View<double*,CLayout,Device> HeatDiagnostics< Device >::dr |
dr
View<double*,CLayout,HostType> HeatDiagnostics< Device >::ds2 |
View<double*,CLayout,Device> HeatDiagnostics< Device >::dz |
dz
int HeatDiagnostics< Device >::mode |
Using mode 1 or mode 2.
int HeatDiagnostics< Device >::nphi |
Number of phi bins.
int HeatDiagnostics< Device >::npsi |
Number of psi bins.
int HeatDiagnostics< Device >::nr |
Number of r bins.
int HeatDiagnostics< Device >::nsection |
Number of sections.
int HeatDiagnostics< Device >::nseg |
Number of segments.
int HeatDiagnostics< Device >::nz |
Number of z bins.
View<double*,CLayout,Device> HeatDiagnostics< Device >::pmin |
First psi min.
View<double*,CLayout,HostType> HeatDiagnostics< Device >::psi2 |
View<double******,CLayout,Device> HeatDiagnostics< Device >::pv |
Array for the heat diagnostic in (r,z)
View<double*****,CLayout,Device> HeatDiagnostics< Device >::pv_psi |
Array for the heat diagnostic in (psi)
View<double*****,CLayout,Device> HeatDiagnostics< Device >::pv_psi2 |
Array for the heat diagnostic in (psi^2)
View<double*,CLayout,Device> HeatDiagnostics< Device >::rmax |
End of last r bin.
View<double*,CLayout,Device> HeatDiagnostics< Device >::rmin |
First r bin.
View<double*,CLayout,HostType> HeatDiagnostics< Device >::strike_angle2 |
View<RZPair*,CLayout,Device> HeatDiagnostics< Device >::x |
View<double*,CLayout,Device> HeatDiagnostics< Device >::zmax |
End of last z bin.
View<double*,CLayout,Device> HeatDiagnostics< Device >::zmin |
First z bin.