|
ASCOT5
|
Header file for diag_orb.c. More...
Go to the source code of this file.
Data Structures | |
| struct | diag_orb_data |
| Orbit diagnostics data struct. More... | |
Macros | |
| #define | DIAG_ORB_POINCARE 0 |
| #define | DIAG_ORB_INTERVAL 1 |
| #define | DIAG_ORB_MAXPOINCARES 30 |
| #define | DIAG_ORB_FOFIELDS 16 |
| #define | DIAG_ORB_GCFIELDS 16 |
| #define | DIAG_ORB_MLFIELDS 11 |
| #define | DIAG_ORB_HYBRIDFIELDS 19 |
| #define | DIAG_ORB_FO 1 |
| #define | DIAG_ORB_GC 2 |
| #define | DIAG_ORB_ML 3 |
Functions | |
| real | diag_orb_check_plane_crossing (real fang, real iang, real ang0) |
| Check if marker has crossed a plane. | |
| real | diag_orb_check_radial_crossing (real fr, real ir, real r0) |
| Check if marker has crossed given rho. | |
| void | diag_orb_init (diag_orb_data *data) |
| Initializes orbit diagnostics data. | |
| void | diag_orb_free (diag_orb_data *data) |
| Free allocated resources. | |
| void | diag_orb_update_fo (diag_orb_data *data, particle_simd_fo *p_f, particle_simd_fo *p_i) |
| Collects orbit diagnostics when marker represents a particle. | |
| void | diag_orb_update_gc (diag_orb_data *data, particle_simd_gc *p_f, particle_simd_gc *p_i) |
| Collects orbit diagnostics when marker represents a guiding center. | |
| void | diag_orb_update_ml (diag_orb_data *data, particle_simd_ml *p_f, particle_simd_ml *p_i) |
| Collects orbit diagnostics when marker represents a field line. | |
Header file for diag_orb.c.
This file also contains definitions for orbit diagnostics data structures.
Definition in file diag_orb.h.
| #define DIAG_ORB_POINCARE 0 |
Poincare mode flag
Definition at line 13 of file diag_orb.h.
| #define DIAG_ORB_INTERVAL 1 |
Interval mode flag
Definition at line 14 of file diag_orb.h.
| #define DIAG_ORB_MAXPOINCARES 30 |
Maximum number of Poincare planes
Definition at line 15 of file diag_orb.h.
| #define DIAG_ORB_FOFIELDS 16 |
Number of coordinates in FO output
Definition at line 17 of file diag_orb.h.
| #define DIAG_ORB_GCFIELDS 16 |
Number of coordinates in GC output
Definition at line 18 of file diag_orb.h.
| #define DIAG_ORB_MLFIELDS 11 |
Number of coordinates in ML output
Definition at line 19 of file diag_orb.h.
| #define DIAG_ORB_HYBRIDFIELDS 19 |
Number of coordinates in hybrid output
Definition at line 20 of file diag_orb.h.
| #define DIAG_ORB_FO 1 |
Data stored in FO mode
Definition at line 22 of file diag_orb.h.
| #define DIAG_ORB_GC 2 |
Data stored in GC mode
Definition at line 23 of file diag_orb.h.
| #define DIAG_ORB_ML 3 |
Data stored in ML mode
Definition at line 24 of file diag_orb.h.
Check if marker has crossed a plane.
This helper function checks whether the angle, either toroidal or poloidal, that defines a Poincare plane is between marker's initial and final angles (of single timestep).
| fang | marker final angle in radians. |
| iang | marker initial angle in radians. |
| ang0 | Poincare plane angle. |
Definition at line 808 of file diag_orb.c.
Check if marker has crossed given rho.
This helper function checks whether given rho that defines a Poincare plane is between marker's initial and final rhos (of single timestep).
| frho | marker final rho in metres. |
| irho | marker initial rho in metres. |
| rho0 | Poincare plane rho. |
Definition at line 842 of file diag_orb.c.
| void diag_orb_init | ( | diag_orb_data * | data | ) |
Initializes orbit diagnostics data.
The offload array should have a length of Nfld * Nmrk * Npnt and elements initialized to zero. The orbit data will be stored in this field as arr[i_field*N_markers*N_points + i_marker*N_points + i_point].
Note that not all markers fill all space assigned to them before their simulation is terminated.
| data | orbit diagnostics data struct |
Definition at line 26 of file diag_orb.c.
| void diag_orb_free | ( | diag_orb_data * | data | ) |
Free allocated resources.
| data | orbit diagnostics data struct |
Definition at line 119 of file diag_orb.c.
| void diag_orb_update_fo | ( | diag_orb_data * | data, |
| particle_simd_fo * | p_f, | ||
| particle_simd_fo * | p_i ) |
Collects orbit diagnostics when marker represents a particle.
| data | orbit diagnostics data struct |
| p_f | pointer to SIMD struct storing marker states at the end of current time-step |
| p_i | pointer to SIMD struct storing marker states at the beginning of current time-step |
Definition at line 211 of file diag_orb.c.
| void diag_orb_update_gc | ( | diag_orb_data * | data, |
| particle_simd_gc * | p_f, | ||
| particle_simd_gc * | p_i ) |
Collects orbit diagnostics when marker represents a guiding center.
| data | orbit diagnostics data struct |
| p_f | pointer to SIMD struct storing marker states at the end of current time-step |
| p_i | pointer to SIMD struct storing marker states at the beginning of current time-step |
Definition at line 417 of file diag_orb.c.
| void diag_orb_update_ml | ( | diag_orb_data * | data, |
| particle_simd_ml * | p_f, | ||
| particle_simd_ml * | p_i ) |
Collects orbit diagnostics when marker represents a field line.
| data | orbit diagnostics data struct |
| p_f | pointer to SIMD struct storing marker states at the end of current time-step |
| p_i | pointer to SIMD struct storing marker states at the beginning of current time-step |
Definition at line 624 of file diag_orb.c.