XGC1
Public Member Functions | Public Attributes | List of all members
HeatDiagnostics< Device > Class Template Reference

#include <heat_diagnostics.hpp>

Inheritance diagram for HeatDiagnostics< Device >:
Inheritance graph
[legend]
Collaboration diagram for HeatDiagnostics< Device >:
Collaboration graph
[legend]

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, HostTypepsi2
 
View< double *, CLayout, HostTypeds2
 
View< double *, CLayout, HostTypestrike_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
 

Constructor & Destructor Documentation

◆ HeatDiagnostics() [1/2]

template<class Device >
HeatDiagnostics< Device >::HeatDiagnostics ( )
inline

◆ HeatDiagnostics() [2/2]

template<class Device >
HeatDiagnostics< Device >::HeatDiagnostics ( NLReader::NamelistReader nlr,
const MagneticField< Device > &  magnetic_field,
const Grid< Device > &  grid,
int  nspecies 
)

Member Function Documentation

◆ get_nspecies()

template<class Device >
int HeatDiagnostics< Device >::get_nspecies ( ) const

◆ init()

template<class Device >
void HeatDiagnostics< Device >::init ( NLReader::NamelistReader nlr,
const MagneticField< Device > &  magnetic_field,
const Grid< Device > &  grid,
int  nspecies 
)
Here is the caller graph for this function:

◆ port()

template<class Device >
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

Parameters
[in]just_left_the_gridVector boolean of particles that left
[in]wVector of w1 changes
[in]potVector of local sheath potentials
[in]eparaVector of parallel energy
[in]eperpVector of perpendicular energy
[in]ctVector of particle constants
[in]old_phVector of particles' previous phase
[in]xff_oldVector of particles' previous field following coordinates
[in]new_phVector of particles' new phase
[in]sp_typeType of species (only electrons now)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wall_cross2()

template<class Device >
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.

Parameters
[in]r1old r coordinate
[in]z1old z coordinate
[in]r2new r coordinate
[in]z2new z coordinate
Returns
Wall segment

◆ write()

template<class Device >
void HeatDiagnostics< Device >::write ( Plasma plasma,
double  time,
int  gstep 
)
Here is the caller graph for this function:

Member Data Documentation

◆ delta_phi

template<class Device >
double HeatDiagnostics< Device >::delta_phi

dphi

◆ dp

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::dp

dpsi

◆ dr

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::dr

dr

◆ ds2

template<class Device >
View<double*,CLayout,HostType> HeatDiagnostics< Device >::ds2

◆ dz

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::dz

dz

◆ mode

template<class Device >
int HeatDiagnostics< Device >::mode

Using mode 1 or mode 2.

◆ nphi

template<class Device >
int HeatDiagnostics< Device >::nphi

Number of phi bins.

◆ npsi

template<class Device >
int HeatDiagnostics< Device >::npsi

Number of psi bins.

◆ nr

template<class Device >
int HeatDiagnostics< Device >::nr

Number of r bins.

◆ nsection

template<class Device >
int HeatDiagnostics< Device >::nsection

Number of sections.

◆ nseg

template<class Device >
int HeatDiagnostics< Device >::nseg

Number of segments.

◆ nz

template<class Device >
int HeatDiagnostics< Device >::nz

Number of z bins.

◆ pmin

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::pmin

First psi min.

◆ psi2

template<class Device >
View<double*,CLayout,HostType> HeatDiagnostics< Device >::psi2

◆ pv

template<class Device >
View<double******,CLayout,Device> HeatDiagnostics< Device >::pv

Array for the heat diagnostic in (r,z)

◆ pv_psi

template<class Device >
View<double*****,CLayout,Device> HeatDiagnostics< Device >::pv_psi

Array for the heat diagnostic in (psi)

◆ pv_psi2

template<class Device >
View<double*****,CLayout,Device> HeatDiagnostics< Device >::pv_psi2

Array for the heat diagnostic in (psi^2)

◆ rmax

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::rmax

End of last r bin.

◆ rmin

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::rmin

First r bin.

◆ strike_angle2

template<class Device >
View<double*,CLayout,HostType> HeatDiagnostics< Device >::strike_angle2

◆ x

template<class Device >
View<RZPair*,CLayout,Device> HeatDiagnostics< Device >::x

◆ zmax

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::zmax

End of last z bin.

◆ zmin

template<class Device >
View<double*,CLayout,Device> HeatDiagnostics< Device >::zmin

First z bin.


The documentation for this class was generated from the following files: