Header file for diag.c.
More...
Go to the source code of this file.
|
int | diag_init (diag_data *data, int Nmrk) |
| Initializes diagnostics data.
|
|
void | diag_free (diag_data *data) |
| Free allocated resources.
|
|
void | diag_offload (diag_data *data) |
| Offload data to the accelerator.
|
|
void | diag_sum (diag_data *data1, diag_data *data2) |
| Sum offload data arrays as one.
|
|
void | diag_update_fo (diag_data *data, B_field_data *Bdata, particle_simd_fo *p_f, particle_simd_fo *p_i) |
| Collects diagnostics when marker represents a particle.
|
|
void | diag_update_gc (diag_data *data, B_field_data *Bdata, particle_simd_gc *p_f, particle_simd_gc *p_i) |
| Collects diagnostics when marker represents a guiding center.
|
|
void | diag_update_ml (diag_data *data, particle_simd_ml *p_f, particle_simd_ml *p_i) |
| Collects diagnostics when marker represents a magnetic field line.
|
|
Header file for diag.c.
Definition in file diag.h.
◆ diag_init()
Initializes diagnostics data.
- Parameters
-
data | diagnostics data |
Nmrk | number of markers in the simulation |
Definition at line 37 of file diag.c.
◆ diag_free()
Free allocated resources.
- Parameters
-
Definition at line 102 of file diag.c.
◆ diag_offload()
Offload data to the accelerator.
- Parameters
-
data | pointer to the data struct |
Definition at line 116 of file diag.c.
◆ diag_sum()
Sum offload data arrays as one.
The data in both arrays have identical order so distributions can be summed trivially. For orbits and transport coefficients the first array already have space for appending the orbit data from the second array, so we only need to move those elements.
- Parameters
-
data | pointer to diagnostics data struct |
array1 | the array to which array2 is summed |
array2 | the array which is to be summed |
Definition at line 244 of file diag.c.
◆ diag_update_fo()
Collects diagnostics when marker represents a particle.
- Parameters
-
data | diagnostics data struct |
Bdata | pointer to magnetic field data |
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 144 of file diag.c.
◆ diag_update_gc()
Collects diagnostics when marker represents a guiding center.
- Parameters
-
data | pointer to diagnostics data struct |
Bdata | pointer to magnetic field data |
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 179 of file diag.c.
◆ diag_update_ml()
Collects diagnostics when marker represents a magnetic field line.
Distributions are not updated for magnetic field lines.
- Parameters
-
data | pointer to 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 221 of file diag.c.