ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
diag
hist.h
Go to the documentation of this file.
1
5
#ifndef HIST_H
6
#define HIST_H
7
8
#include <stdlib.h>
9
#include "
../ascot5.h
"
10
#include "
../particle.h
"
11
12
#define HIST_ALLDIM 16
13
17
typedef
enum
{
18
R
,
19
PHI
,
20
Z
,
21
RHO
,
22
THETA
,
23
PPAR
,
24
PPERP
,
25
PR
,
26
PPHI
,
27
PZ
,
28
EKIN
,
29
XI
,
30
MU
,
31
PTOR
,
32
TIME
,
33
CHARGE
,
34
}
hist_coordinate
;
35
39
typedef
struct
{
40
hist_coordinate
name
;
41
real
min
;
42
real
max
;
43
size_t
n
;
44
}
hist_axis
;
45
52
typedef
struct
{
53
hist_axis
axes
[HIST_ALLDIM];
54
size_t
strides
[HIST_ALLDIM-1];
55
size_t
nbin
;
56
real
*
bins
;
57
}
histogram
;
58
59
int
hist_init
(
histogram
* data,
int
dimensions,
hist_coordinate
* coordinates,
60
real
* binmin,
real
* binmax,
size_t
* nbin);
61
void
hist_free
(
histogram
* data);
62
void
hist_offload
(
histogram
* data);
63
void
hist_update_fo
(
histogram
* hist,
particle_simd_fo
* p_f,
64
particle_simd_fo
* p_i);
65
void
hist_update_gc
(
histogram
* hist,
particle_simd_gc
* p_f,
66
particle_simd_gc
* p_i);
67
#endif
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
hist_update_fo
void hist_update_fo(histogram *hist, particle_simd_fo *p_f, particle_simd_fo *p_i)
Update the histogram in the particle picture.
Definition
hist.c:83
hist_offload
void hist_offload(histogram *data)
Offload the data to the accelerator.
Definition
hist.c:74
hist_init
int hist_init(histogram *data, int dimensions, hist_coordinate *coordinates, real *binmin, real *binmax, size_t *nbin)
Initialize the histogram object.
Definition
hist.c:20
hist_free
void hist_free(histogram *data)
Free allocated resources.
Definition
hist.c:66
hist_update_gc
void hist_update_gc(histogram *hist, particle_simd_gc *p_f, particle_simd_gc *p_i)
Update the histogram in the GC picture.
Definition
hist.c:201
hist_coordinate
hist_coordinate
Quantities that can be used as histogram axis coordinates.
Definition
hist.h:17
R
@ R
Definition
hist.h:18
XI
@ XI
Definition
hist.h:29
THETA
@ THETA
Definition
hist.h:22
PZ
@ PZ
Definition
hist.h:27
PPHI
@ PPHI
Definition
hist.h:26
RHO
@ RHO
Definition
hist.h:21
PHI
@ PHI
Definition
hist.h:19
PPERP
@ PPERP
Definition
hist.h:24
PR
@ PR
Definition
hist.h:25
MU
@ MU
Definition
hist.h:30
PPAR
@ PPAR
Definition
hist.h:23
Z
@ Z
Definition
hist.h:20
EKIN
@ EKIN
Definition
hist.h:28
PTOR
@ PTOR
Definition
hist.h:31
TIME
@ TIME
Definition
hist.h:32
CHARGE
@ CHARGE
Definition
hist.h:33
particle.h
Header file for particle.c.
hist_axis
Coordinate axis for the histogram.
Definition
hist.h:39
hist_axis::min
real min
Definition
hist.h:41
hist_axis::max
real max
Definition
hist.h:42
hist_axis::name
hist_coordinate name
Definition
hist.h:40
hist_axis::n
size_t n
Definition
hist.h:43
histogram
Histogram parameters.
Definition
hist.h:52
histogram::axes
hist_axis axes[HIST_ALLDIM]
Definition
hist.h:53
histogram::nbin
size_t nbin
Definition
hist.h:55
histogram::strides
size_t strides[HIST_ALLDIM-1]
Definition
hist.h:54
histogram::bins
real * bins
Definition
hist.h:56
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