ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
diag
dist_5D.h
Go to the documentation of this file.
1
5
#ifndef DIST_5D_H
6
#define DIST_5D_H
7
8
#include <stdlib.h>
9
#include "
../ascot5.h
"
10
#include "
../particle.h
"
11
15
typedef
struct
{
16
int
n_r
;
17
real
min_r
;
18
real
max_r
;
19
20
int
n_phi
;
21
real
min_phi
;
22
real
max_phi
;
23
24
int
n_z
;
25
real
min_z
;
26
real
max_z
;
27
28
int
n_ppara
;
29
real
min_ppara
;
30
real
max_ppara
;
31
32
int
n_pperp
;
33
real
min_pperp
;
34
real
max_pperp
;
35
36
int
n_time
;
37
real
min_time
;
38
real
max_time
;
39
40
int
n_q
;
41
real
min_q
;
42
real
max_q
;
43
44
size_t
step_1
;
45
size_t
step_2
;
46
size_t
step_3
;
47
size_t
step_4
;
48
size_t
step_5
;
49
size_t
step_6
;
50
51
real
*
histogram
;
52
}
dist_5D_data
;
53
54
size_t
dist_5D_index
(
int
i_r,
int
i_phi,
int
i_z,
int
i_ppara,
int
i_pperp,
55
int
i_time,
int
i_q,
size_t
step_6,
size_t
step_5,
56
size_t
step_4,
size_t
step_3,
size_t
step_2,
57
size_t
step_1);
58
int
dist_5D_init
(
dist_5D_data
* data);
59
void
dist_5D_free
(
dist_5D_data
* data);
60
void
dist_5D_offload
(
dist_5D_data
* data);
61
void
dist_5D_onload
(
dist_5D_data
* data);
62
void
dist_5D_update_fo
(
dist_5D_data
* dist,
particle_simd_fo
* p_f,
63
particle_simd_fo
* p_i);
64
void
dist_5D_update_gc
(
dist_5D_data
* dist,
particle_simd_gc
* p_f,
65
particle_simd_gc
* p_i);
66
67
#endif
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
dist_5D_update_gc
void dist_5D_update_gc(dist_5D_data *dist, particle_simd_gc *p_f, particle_simd_gc *p_i)
Update the histogram from guiding center markers.
Definition
dist_5D.c:195
dist_5D_onload
void dist_5D_onload(dist_5D_data *data)
Onload data back to the host.
Definition
dist_5D.c:79
dist_5D_index
size_t dist_5D_index(int i_r, int i_phi, int i_z, int i_ppara, int i_pperp, int i_time, int i_q, size_t step_6, size_t step_5, size_t step_4, size_t step_3, size_t step_2, size_t step_1)
Function for calculating the index in the histogram array.
Definition
dist_5D.c:17
dist_5D_update_fo
void dist_5D_update_fo(dist_5D_data *dist, particle_simd_fo *p_f, particle_simd_fo *p_i)
Update the histogram from full-orbit particles.
Definition
dist_5D.c:96
dist_5D_free
void dist_5D_free(dist_5D_data *data)
Free allocated resources.
Definition
dist_5D.c:59
dist_5D_init
int dist_5D_init(dist_5D_data *data)
Initializes distribution from offload data.
Definition
dist_5D.c:35
dist_5D_offload
void dist_5D_offload(dist_5D_data *data)
Offload data to the accelerator.
Definition
dist_5D.c:68
particle.h
Header file for particle.c.
dist_5D_data
Histogram parameters.
Definition
dist_5D.h:15
dist_5D_data::n_z
int n_z
Definition
dist_5D.h:24
dist_5D_data::min_time
real min_time
Definition
dist_5D.h:37
dist_5D_data::max_r
real max_r
Definition
dist_5D.h:18
dist_5D_data::max_pperp
real max_pperp
Definition
dist_5D.h:34
dist_5D_data::step_5
size_t step_5
Definition
dist_5D.h:48
dist_5D_data::min_phi
real min_phi
Definition
dist_5D.h:21
dist_5D_data::step_3
size_t step_3
Definition
dist_5D.h:46
dist_5D_data::max_phi
real max_phi
Definition
dist_5D.h:22
dist_5D_data::min_ppara
real min_ppara
Definition
dist_5D.h:29
dist_5D_data::step_1
size_t step_1
Definition
dist_5D.h:44
dist_5D_data::n_q
int n_q
Definition
dist_5D.h:40
dist_5D_data::max_z
real max_z
Definition
dist_5D.h:26
dist_5D_data::n_phi
int n_phi
Definition
dist_5D.h:20
dist_5D_data::max_time
real max_time
Definition
dist_5D.h:38
dist_5D_data::n_time
int n_time
Definition
dist_5D.h:36
dist_5D_data::step_2
size_t step_2
Definition
dist_5D.h:45
dist_5D_data::n_ppara
int n_ppara
Definition
dist_5D.h:28
dist_5D_data::step_6
size_t step_6
Definition
dist_5D.h:49
dist_5D_data::n_pperp
int n_pperp
Definition
dist_5D.h:32
dist_5D_data::min_z
real min_z
Definition
dist_5D.h:25
dist_5D_data::n_r
int n_r
Definition
dist_5D.h:16
dist_5D_data::max_ppara
real max_ppara
Definition
dist_5D.h:30
dist_5D_data::min_r
real min_r
Definition
dist_5D.h:17
dist_5D_data::max_q
real max_q
Definition
dist_5D.h:42
dist_5D_data::histogram
real * histogram
Definition
dist_5D.h:51
dist_5D_data::min_pperp
real min_pperp
Definition
dist_5D.h:33
dist_5D_data::step_4
size_t step_4
Definition
dist_5D.h:47
dist_5D_data::min_q
real min_q
Definition
dist_5D.h:41
particle_simd_fo
Struct representing NSIMD particle markers.
Definition
particle.h:210
particle_simd_gc
Struct representing NSIMD guiding center markers.
Definition
particle.h:275
Generated on
for ASCOT5 by
1.18.0