ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
nbi.h
Go to the documentation of this file.
1
5
#ifndef NBI_H
6
#define NBI_H
7
8
#include "
ascot5.h
"
9
#include "
particle.h
"
10
#include "
random.h
"
11
15
typedef
struct
{
16
int
id
;
17
int
n_beamlet
;
18
real
*
beamlet_x
;
19
real
*
beamlet_y
;
20
real
*
beamlet_z
;
21
real
*
beamlet_dx
;
22
real
*
beamlet_dy
;
23
real
*
beamlet_dz
;
24
real
power
;
25
real
energy
;
26
real
efrac
[3];
27
real
div_h
;
28
real
div_v
;
29
real
div_halo_frac
;
30
real
div_halo_h
;
31
real
div_halo_v
;
32
int
anum
;
33
int
znum
;
34
real
mass
;
35
}
nbi_injector
;
36
40
typedef
struct
{
41
int
ninj
;
42
nbi_injector
*
inj
;
43
}
nbi_data
;
44
45
int
nbi_init
(
nbi_data
* data,
int
ninj,
int
*
id
,
int
* anum,
int
* znum,
46
real
* mass,
real
* power,
real
* efrac,
real
* energy,
47
real
* div_h,
real
* div_v,
real
* div_halo_v,
real
* div_halo_h,
48
real
* div_halo_frac,
int
* nbeamlet,
real
* beamlet_xyz);
49
void
nbi_free
(
nbi_data
* nbi);
50
void
nbi_inject
(
real
* xyz,
real
* vxyz,
nbi_injector
* inj,
random_data
* rng);
51
52
#endif
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
nbi_init
int nbi_init(nbi_data *data, int ninj, int *id, int *anum, int *znum, real *mass, real *power, real *efrac, real *energy, real *div_h, real *div_v, real *div_halo_v, real *div_halo_h, real *div_halo_frac, int *nbeamlet, real *beamlet_xyz)
Initialize NBI data struct on target.
Definition
nbi.c:22
nbi_free
void nbi_free(nbi_data *data)
Free allocated resources.
Definition
nbi.c:96
nbi_inject
void nbi_inject(real *xyz, real *vxyz, nbi_injector *inj, random_data *rng)
Sample injected marker's coordinates.
Definition
nbi.c:118
particle.h
Header file for particle.c.
random.h
Header file for random.c.
random_data
void * random_data
Definition
random.h:100
nbi_data
NBI data consisting of ninj injectors.
Definition
nbi.h:40
nbi_data::ninj
int ninj
Definition
nbi.h:41
nbi_data::inj
nbi_injector * inj
Definition
nbi.h:42
nbi_injector
Structure for describing an NBI injector.
Definition
nbi.h:15
nbi_injector::mass
real mass
Definition
nbi.h:34
nbi_injector::id
int id
Definition
nbi.h:16
nbi_injector::efrac
real efrac[3]
Definition
nbi.h:26
nbi_injector::beamlet_x
real * beamlet_x
Definition
nbi.h:18
nbi_injector::anum
int anum
Definition
nbi.h:32
nbi_injector::beamlet_dy
real * beamlet_dy
Definition
nbi.h:22
nbi_injector::energy
real energy
Definition
nbi.h:25
nbi_injector::div_halo_h
real div_halo_h
Definition
nbi.h:30
nbi_injector::power
real power
Definition
nbi.h:24
nbi_injector::beamlet_y
real * beamlet_y
Definition
nbi.h:19
nbi_injector::znum
int znum
Definition
nbi.h:33
nbi_injector::beamlet_dz
real * beamlet_dz
Definition
nbi.h:23
nbi_injector::div_halo_frac
real div_halo_frac
Definition
nbi.h:29
nbi_injector::beamlet_dx
real * beamlet_dx
Definition
nbi.h:21
nbi_injector::beamlet_z
real * beamlet_z
Definition
nbi.h:20
nbi_injector::n_beamlet
int n_beamlet
Definition
nbi.h:17
nbi_injector::div_halo_v
real div_halo_v
Definition
nbi.h:31
nbi_injector::div_v
real div_v
Definition
nbi.h:28
nbi_injector::div_h
real div_h
Definition
nbi.h:27
Generated on
for ASCOT5 by
1.18.0