ASCOT5
Loading...
Searching...
No Matches
Data Structures | Functions
nbi.h File Reference

Header file for nbi.c. More...

#include "ascot5.h"
#include "particle.h"
#include "random.h"

Go to the source code of this file.

Data Structures

struct  nbi_injector
 Structure for describing an NBI injector. More...
 
struct  nbi_offload_data
 NBI parameters consisting of a bundle of injectors. More...
 
struct  nbi_data
 NBI data on target. More...
 

Functions

int nbi_init_offload (nbi_offload_data *offload_data, real **offload_array)
 Load NBI data and prepare parameters for offload.
 
void nbi_init (nbi_data *nbi, nbi_offload_data *offload_data, real *offload_array)
 Initialize NBI data struct on target.
 
void nbi_free_offload (nbi_offload_data *offload_data, real **offload_array)
 Free offload array.
 
void nbi_inject (real *xyz, real *vxyz, nbi_injector *inj, random_data *rng)
 Sample injected marker's coordinates.
 

Detailed Description

Header file for nbi.c.

Definition in file nbi.h.

Function Documentation

◆ nbi_init_offload()

int nbi_init_offload ( nbi_offload_data * offload_data,
real ** offload_array )

Load NBI data and prepare parameters for offload.

Parameters
offload_datapointer to offload data struct
offload_arraypointer to pointer to offload array
Returns
zero if initialization succeeded.

Definition at line 23 of file nbi.c.

◆ nbi_init()

void nbi_init ( nbi_data * nbi,
nbi_offload_data * offload_data,
real * offload_array )

Initialize NBI data struct on target.

Parameters
nbipointer to data struct on target
offload_datapointer to offload data struct
offload_arraypointer to offload array

Definition at line 59 of file nbi.c.

◆ nbi_free_offload()

void nbi_free_offload ( nbi_offload_data * offload_data,
real ** offload_array )

Free offload array.

Parameters
offload_datapointer to offload data struct
offload_arraypointer to pointer to offload array

Definition at line 97 of file nbi.c.

◆ nbi_inject()

void nbi_inject ( real * xyz,
real * vxyz,
nbi_injector * inj,
random_data * rng )

Sample injected marker's coordinates.

Parameters
injpointer to injector data
xyzinitialized marker's position in cartesian coordinates [m]
vxyzinitialized marker's velocity in cartesian coordinates [m/s]
rngpointer to random number generator data

Definition at line 114 of file nbi.c.