ASCOT5
Loading...
Searching...
No Matches
asigma.h
Go to the documentation of this file.
1
8#ifndef ASIGMA_H
9#define ASIGMA_H
10
11#include "ascot5.h"
12#include "error.h"
13#include "asigma/asigma_loc.h"
14
26
34typedef enum asigma_reac_type {
35 sigma_ioniz = 1, /* sigma(E), ionization (charge-increasing) */
36 sigma_recomb = 2, /* sigma(E), recombination (charge-decreasing) */
37 sigma_CX = 3, /* sigma(E), charge exchange */
38 sigmav_ioniz = 4, /* sigmav(E,T), ionization (charge-increasing) */
39 sigmav_recomb = 5, /* sigmav(E,T), recombination (charge-decr.) */
40 sigmav_CX = 6, /* sigmav(E,T), charge exchange */
41 sigmav_BMS = 7, /* sigmav(E,Te,ne), beam-stopping coefficient */
42 sigmaveff_ioniz = 8, /* sigmav(n,T), eff. ioniz. (charge-incr.) */
43 sigmaveff_recomb = 9, /* sigmav(n,T), eff. recomb. (charge-decr.) */
44 sigmaveff_CX = 10 /* sigmav(n,T), effective charge exchange */
46
59
70
72 real** offload_array);
74 real** offload_array);
75
76void asigma_extrapolate(int extrapolate);
78 real* offload_array);
79DECLARE_TARGET_SIMD_UNIFORM(asigmadata)
81 real* sigma, int z_1, int a_1, int z_2, int a_2, real E_coll_per_amu,
82 asigma_reac_type reac_type, asigma_data* asigmadata);
83DECLARE_TARGET_SIMD_UNIFORM(asigmadata)
85 real* sigmav, int z_1, int a_1, real m_1, int z_2, int a_2,
86 real E, real T_e, real T_0, real n_i, asigma_reac_type reac_type,
87 asigma_data* asigmadata);
88DECLARE_TARGET_SIMD_UNIFORM(asigmadata)
90 real* ratecoeff, int z_1, int a_1, real E, real mass, int nspec,
91 const int* znum, const int* anum, real T_0, real* n_0,
92 asigma_data* asigmadata);
93DECLARE_TARGET_SIMD_UNIFORM(asigmadata)
95 real* ratecoeff, int z_1, int a_1, real E, real mass, int nion,
96 const int* znum, const int* anum, real T_e, real* n_i,
97 asigma_data* asigmadata);
98
99#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
void asigma_extrapolate(int extrapolate)
Toggle extrapolation when evaluating cross sections.
Definition asigma.c:45
a5err asigma_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, asigma_data *asigmadata)
Evaluate beam stopping rate coefficient.
Definition asigma.c:308
void asigma_free_offload(asigma_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
Definition asigma.c:104
int asigma_init(asigma_data *asigma_data, asigma_offload_data *offload_data, real *offload_array)
Initializes atomic reaction data struct on target.
Definition asigma.c:126
a5err asigma_eval_sigmav(real *sigmav, int z_1, int a_1, real m_1, int z_2, int a_2, real E, real T_e, real T_0, real n_i, asigma_reac_type reac_type, asigma_data *asigmadata)
Evaluate atomic reaction rate coefficient.
Definition asigma.c:216
a5err asigma_eval_sigma(real *sigma, int z_1, int a_1, int z_2, int a_2, real E_coll_per_amu, asigma_reac_type reac_type, asigma_data *asigmadata)
Evaluate atomic reaction cross-section.
Definition asigma.c:166
a5err asigma_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, asigma_data *asigmadata)
Evaluate charge exchange rate coefficient.
Definition asigma.c:262
asigma_reac_type
Reaction types for atomic reaction data.
Definition asigma.h:34
asigma_type
Atomic reaction data types.
Definition asigma.h:23
@ asigma_type_loc
Definition asigma.h:24
int asigma_init_offload(asigma_offload_data *offload_data, real **offload_array)
Load atomic reaction data and prepare parameters.
Definition asigma.c:66
Header file for asigma_loc.c.
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
Atomic reaction simulation data.
Definition asigma.h:66
asigma_type type
Definition asigma.h:67
asigma_loc_data asigma_loc
Definition asigma.h:68
Local-files atomic reaction simulation data.
Definition asigma_loc.h:31
Local-files atomic reaction offload data.
Definition asigma_loc.h:15
Atomic reaction offload data.
Definition asigma.h:53
asigma_type type
Definition asigma.h:54
asigma_loc_offload_data asigma_loc
Definition asigma.h:55
int offload_array_length
Definition asigma.h:57