ASCOT5
Loading...
Searching...
No Matches
asigma_loc.h File Reference

Header file for asigma_loc.c. More...

#include "../ascot5.h"
#include "../error.h"
#include "../spline/interp.h"

Go to the source code of this file.

Data Structures

struct  asigma_loc_data
 Local-files atomic reaction simulation data. More...
 

Functions

int asigma_loc_init (asigma_loc_data *data, int nreac, int *z1, int *a1, int *z2, int *a2, int *reactype, int *ne, real *emin, real *emax, int *nn, real *nmin, real *nmax, int *nT, real *Tmin, real *Tmax, real *sigma)
 Initialize local file atomic data and check inputs.
 
void asigma_loc_free (asigma_loc_data *data)
 Free allocated resources.
 
void asigma_loc_offload (asigma_loc_data *data)
 Offload data to the accelerator.
 
 DECLARE_TARGET_SIMD_UNIFORM (asigma_data, reac_type, z_2, a_2, extrapolate) a5err asigma_loc_eval_sigma(real *sigma
 
a5err asigma_loc_eval_cx (real *ratecoeff, int z_1, int a_1, real E, real mass, int nspec, const int *znum, const int *anum, real T_0, real *n_0, int extrapolate, asigma_loc_data *asigmadata)
 Evaluate atomic reaction rate coefficient.
 
a5err asigma_loc_eval_bms (real *sigmav, int z_1, int a_1, real E, real mass, int nion, const int *znum, const int *anum, real T_e, real *n_i, int extrapolate, asigma_loc_data *asigma_data)
 Evaluate beam stopping rate coefficient.
 

Variables

int z_1
 
int int a_1
 
int int int z_2
 
int int int int a_2
 
int int int int real E_coll_per_amu
 
int int int int real int reac_type
 
int int int int real int int extrapolate
 
int int int int real int int asigma_loc_dataasigma_data
 
int int real m_1
 
int int real int int real E
 
int int real int int real real T_e
 
int int real int int real real real T_0
 
int int real int int real real real real n_i
 

Detailed Description

Header file for asigma_loc.c.

Definition in file asigma_loc.h.

Function Documentation

◆ asigma_loc_init()

int asigma_loc_init ( asigma_loc_data * data,
int nreac,
int * z1,
int * a1,
int * z2,
int * a2,
int * reactype,
int * ne,
real * emin,
real * emax,
int * nn,
real * nmin,
real * nmax,
int * nT,
real * Tmin,
real * Tmax,
real * sigma )

Initialize local file atomic data and check inputs.

Parameters
datapointer to the data struct
Returns
zero if initialization success

Definition at line 29 of file asigma_loc.c.

◆ asigma_loc_free()

void asigma_loc_free ( asigma_loc_data * data)

Free allocated resources.

Parameters
offload_datapointer to the data struct

Definition at line 114 of file asigma_loc.c.

◆ asigma_loc_offload()

void asigma_loc_offload ( asigma_loc_data * data)

Offload data to the accelerator.

Parameters
datapointer to the data struct

Definition at line 141 of file asigma_loc.c.

◆ asigma_loc_eval_cx()

a5err asigma_loc_eval_cx ( real * ratecoeff,
int z_1,
int a_1,
real E,
real mass,
int nspec,
const int * znum,
const int * anum,
real T_0,
real * n_0,
int extrapolate,
asigma_loc_data * asigma_data )

Evaluate atomic reaction rate coefficient.

This function evaluates the rate coefficient (<sigma*v>) for the atomic reaction corresponding to the reaction identifiers given as parameters at the given fast particle energy and bulk plasma conditions.

This is a SIMD function.

Parameters
ratecoeffpointer to evaluated rate coefficient
z_1atomic number of fast particle
a_1atomic mass number of fast particle
Eenergy of fast particle
massmass of fast particle
znumatomic numbers of bulk neutrals
anumatomic mass numbers of bulk neutrals
T_0temperature of bulk neutrals
n_0neutral densities
extrapolatedon't raise error but set values outside abscissae to zero
asigma_datapointer to atomic data struct
Returns
zero if evaluation succeeded

Definition at line 334 of file asigma_loc.c.

◆ asigma_loc_eval_bms()

a5err asigma_loc_eval_bms ( real * ratecoeff,
int z_1,
int a_1,
real E,
real mass,
int nion,
const int * znum,
const int * anum,
real T_e,
real * n_i,
int extrapolate,
asigma_loc_data * asigma_data )

Evaluate beam stopping rate coefficient.

This function first tries to evaluate BMS with ADAS data. If not present, the Suzuki model is used instead.

This is a SIMD function.

Parameters
ratecoeffpointer to evaluated rate coefficient
z_1atomic number of fast particle
a_1atomic mass number of fast particle
Eenergy of fast particle
massmass of fast particle
nionnumber of bulk ion species
znumatomic numbers of bulk particles
anumatomic mass numbers of bulk particles
T_eelectron temperature of bulk plasma
n_idensities of bulk ions
extrapolatedon't raise error but set values outside abscissae to zero
asigma_datapointer to atomic data struct
Returns
zero if evaluation succeeded

Definition at line 406 of file asigma_loc.c.

Variable Documentation

◆ z_1

int z_1

Definition at line 39 of file asigma_loc.h.

◆ a_1

int int a_1

Definition at line 39 of file asigma_loc.h.

◆ z_2

int int real int z_2

Definition at line 39 of file asigma_loc.h.

◆ a_2

int int real int int a_2

Definition at line 39 of file asigma_loc.h.

◆ E_coll_per_amu

int int int int real E_coll_per_amu

Definition at line 39 of file asigma_loc.h.

◆ reac_type

int int real int int real real real real int reac_type

Definition at line 40 of file asigma_loc.h.

◆ extrapolate

int int real int int real real real real int int extrapolate

Definition at line 40 of file asigma_loc.h.

◆ asigma_data

int int real int int real real real real int int asigma_loc_data * asigma_data

Definition at line 40 of file asigma_loc.h.

◆ m_1

int int real m_1

Definition at line 44 of file asigma_loc.h.

◆ E

int int real int int real E

Definition at line 45 of file asigma_loc.h.

◆ T_e

int int real int int real real T_e

Definition at line 45 of file asigma_loc.h.

◆ T_0

int int real int int real real real T_0

Definition at line 45 of file asigma_loc.h.

◆ n_i

int int real int int real real real real n_i

Definition at line 45 of file asigma_loc.h.