ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
diag
diag_orb.h
Go to the documentation of this file.
1
7
#ifndef DIAG_ORB_H
8
#define DIAG_ORB_H
9
10
#include <stdio.h>
11
#include "
../particle.h
"
12
13
#define DIAG_ORB_POINCARE 0
14
#define DIAG_ORB_INTERVAL 1
15
#define DIAG_ORB_MAXPOINCARES 30
16
17
#define DIAG_ORB_FOFIELDS 16
18
#define DIAG_ORB_GCFIELDS 16
19
#define DIAG_ORB_MLFIELDS 11
20
#define DIAG_ORB_HYBRIDFIELDS 19
21
22
#define DIAG_ORB_FO 1
23
#define DIAG_ORB_GC 2
24
#define DIAG_ORB_ML 3
25
26
DECLARE_TARGET_SIMD_UNIFORM(ang0)
27
real
diag_orb_check_plane_crossing
(
real
fang,
real
iang,
real
ang0);
28
DECLARE_TARGET_SIMD_UNIFORM(r0)
29
real
diag_orb_check_radial_crossing
(
real
fr,
real
ir,
real
r0);
30
42
typedef
struct
{
43
real
*
id
;
44
real
*
mileage
;
45
real
*
r
;
46
real
*
phi
;
47
real
*
z
;
48
real
*
p_r
;
49
real
*
p_phi
;
50
real
*
p_z
;
51
real
*
ppar
;
52
real
*
mu
;
53
real
*
zeta
;
54
real
*
weight
;
55
real
*
charge
;
56
real
*
rho
;
57
real
*
theta
;
58
real
*
B_r
;
59
real
*
B_phi
;
60
real
*
B_z
;
61
real
*
simmode
;
62
real
*
pncrid
;
63
real
*
pncrdi
;
64
65
integer
*
mrk_pnt
;
66
real
*
mrk_recorded
;
67
68
int
mode
;
69
int
Npnt
;
70
int
Nmrk
;
71
int
Nfld
;
72
real
writeInterval
;
73
int
ntoroidalplots
;
74
int
npoloidalplots
;
75
int
nradialplots
;
76
int
record_mode
;
77
real
toroidalangles
[
DIAG_ORB_MAXPOINCARES
];
78
real
poloidalangles
[
DIAG_ORB_MAXPOINCARES
];
79
real
radialdistances
[
DIAG_ORB_MAXPOINCARES
];
80
}
diag_orb_data
;
81
82
void
diag_orb_init
(
diag_orb_data
* data);
83
84
void
diag_orb_free
(
diag_orb_data
* data);
85
86
void
diag_orb_update_fo
(
diag_orb_data
* data,
87
particle_simd_fo
* p_f,
particle_simd_fo
* p_i);
88
89
void
diag_orb_update_gc
(
diag_orb_data
* data,
90
particle_simd_gc
* p_f,
particle_simd_gc
* p_i);
91
92
void
diag_orb_update_ml
(
diag_orb_data
* data,
93
particle_simd_ml
* p_f,
particle_simd_ml
* p_i);
94
95
#endif
real
double real
Definition
ascot5.h:85
integer
long integer
Definition
ascot5.h:84
diag_orb_update_fo
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.
Definition
diag_orb.c:211
diag_orb_check_plane_crossing
real diag_orb_check_plane_crossing(real fang, real iang, real ang0)
Check if marker has crossed a plane.
Definition
diag_orb.c:810
diag_orb_update_ml
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.
Definition
diag_orb.c:626
diag_orb_update_gc
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.
Definition
diag_orb.c:418
diag_orb_free
void diag_orb_free(diag_orb_data *data)
Free allocated resources.
Definition
diag_orb.c:119
diag_orb_check_radial_crossing
real diag_orb_check_radial_crossing(real frho, real irho, real rho0)
Check if marker has crossed given rho.
Definition
diag_orb.c:844
diag_orb_init
void diag_orb_init(diag_orb_data *data)
Initializes orbit diagnostics data.
Definition
diag_orb.c:26
DIAG_ORB_MAXPOINCARES
#define DIAG_ORB_MAXPOINCARES
Definition
diag_orb.h:15
particle.h
Header file for particle.c.
diag_orb_data
Orbit diagnostics data struct.
Definition
diag_orb.h:42
diag_orb_data::mileage
real * mileage
Definition
diag_orb.h:44
diag_orb_data::poloidalangles
real poloidalangles[DIAG_ORB_MAXPOINCARES]
Definition
diag_orb.h:78
diag_orb_data::ppar
real * ppar
Definition
diag_orb.h:51
diag_orb_data::simmode
real * simmode
Definition
diag_orb.h:61
diag_orb_data::B_r
real * B_r
Definition
diag_orb.h:58
diag_orb_data::Nmrk
int Nmrk
Definition
diag_orb.h:70
diag_orb_data::ntoroidalplots
int ntoroidalplots
Definition
diag_orb.h:73
diag_orb_data::Npnt
int Npnt
Definition
diag_orb.h:69
diag_orb_data::toroidalangles
real toroidalangles[DIAG_ORB_MAXPOINCARES]
Definition
diag_orb.h:77
diag_orb_data::pncrdi
real * pncrdi
Definition
diag_orb.h:63
diag_orb_data::writeInterval
real writeInterval
Definition
diag_orb.h:72
diag_orb_data::r
real * r
Definition
diag_orb.h:45
diag_orb_data::zeta
real * zeta
Definition
diag_orb.h:53
diag_orb_data::p_phi
real * p_phi
Definition
diag_orb.h:49
diag_orb_data::theta
real * theta
Definition
diag_orb.h:57
diag_orb_data::z
real * z
Definition
diag_orb.h:47
diag_orb_data::radialdistances
real radialdistances[DIAG_ORB_MAXPOINCARES]
Definition
diag_orb.h:79
diag_orb_data::rho
real * rho
Definition
diag_orb.h:56
diag_orb_data::pncrid
real * pncrid
Definition
diag_orb.h:62
diag_orb_data::weight
real * weight
Definition
diag_orb.h:54
diag_orb_data::mrk_recorded
real * mrk_recorded
Definition
diag_orb.h:66
diag_orb_data::Nfld
int Nfld
Definition
diag_orb.h:71
diag_orb_data::B_z
real * B_z
Definition
diag_orb.h:60
diag_orb_data::phi
real * phi
Definition
diag_orb.h:46
diag_orb_data::mrk_pnt
integer * mrk_pnt
Definition
diag_orb.h:65
diag_orb_data::nradialplots
int nradialplots
Definition
diag_orb.h:75
diag_orb_data::mu
real * mu
Definition
diag_orb.h:52
diag_orb_data::p_z
real * p_z
Definition
diag_orb.h:50
diag_orb_data::mode
int mode
Definition
diag_orb.h:68
diag_orb_data::record_mode
int record_mode
Definition
diag_orb.h:76
diag_orb_data::charge
real * charge
Definition
diag_orb.h:55
diag_orb_data::id
real * id
Definition
diag_orb.h:43
diag_orb_data::p_r
real * p_r
Definition
diag_orb.h:48
diag_orb_data::npoloidalplots
int npoloidalplots
Definition
diag_orb.h:74
diag_orb_data::B_phi
real * B_phi
Definition
diag_orb.h:59
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
particle_simd_ml
Struct representing NSIMD field line markers.
Definition
particle.h:343
Generated on
for ASCOT5 by
1.18.0