Header file for nbi.c.
More...
#include "ascot5.h"
#include "particle.h"
#include "random.h"
Go to the source code of this file.
|
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.
|
|
void | nbi_free (nbi_data *nbi) |
| Free allocated resources.
|
|
void | nbi_inject (real *xyz, real *vxyz, nbi_injector *inj, random_data *rng) |
| Sample injected marker's coordinates.
|
|
Header file for nbi.c.
Definition in file nbi.h.
◆ 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.
- Parameters
-
nbi | pointer to data struct on target |
offload_data | pointer to offload data struct |
offload_array | pointer to offload array |
Definition at line 22 of file nbi.c.
◆ nbi_free()
Free allocated resources.
- Parameters
-
data | pointer to the data struct |
Definition at line 96 of file nbi.c.
◆ nbi_inject()
Sample injected marker's coordinates.
- Parameters
-
inj | pointer to injector data |
xyz | initialized marker's position in cartesian coordinates [m] |
vxyz | initialized marker's velocity in cartesian coordinates [m/s] |
rng | pointer to random number generator data |
Definition at line 118 of file nbi.c.