ASCOT5
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
36
40typedef struct {
41 int ninj;
43} nbi_data;
44
45int 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);
49void nbi_free(nbi_data* nbi);
50void nbi_inject(real* xyz, real* vxyz, nbi_injector* inj, random_data* rng);
51
52#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
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
void nbi_free(nbi_data *nbi)
Free allocated resources.
Definition nbi.c:96
void nbi_inject(real *xyz, real *vxyz, nbi_injector *inj, random_data *rng)
Sample injected marker's coordinates.
Definition nbi.c:118
Header file for particle.c.
Header file for random.c.
void * random_data
Definition random.h:87
NBI data consisting of ninj injectors.
Definition nbi.h:40
int ninj
Definition nbi.h:41
nbi_injector * inj
Definition nbi.h:42
Structure for describing an NBI injector.
Definition nbi.h:15
real mass
Definition nbi.h:34
int id
Definition nbi.h:16
real * beamlet_x
Definition nbi.h:18
int anum
Definition nbi.h:32
real * beamlet_dy
Definition nbi.h:22
real energy
Definition nbi.h:25
real div_halo_h
Definition nbi.h:30
real power
Definition nbi.h:24
real * beamlet_y
Definition nbi.h:19
int znum
Definition nbi.h:33
real * beamlet_dz
Definition nbi.h:23
real div_halo_frac
Definition nbi.h:29
real * beamlet_dx
Definition nbi.h:21
real * beamlet_z
Definition nbi.h:20
int n_beamlet
Definition nbi.h:17
real div_halo_v
Definition nbi.h:31
real div_v
Definition nbi.h:28
real div_h
Definition nbi.h:27