ASCOT5
Loading...
Searching...
No Matches
asigma_loc.h
Go to the documentation of this file.
1
5#ifndef ASIGMALOCAL_H
6#define ASIGMALOCAL_H
7
8#include "../ascot5.h"
9#include "../error.h"
10#include "../spline/interp.h"
11
15typedef struct {
16 int N_reac;
17 int z_1[MAX_ATOMIC];
18 int a_1[MAX_ATOMIC];
19 int z_2[MAX_ATOMIC];
20 int a_2[MAX_ATOMIC];
21 int N_E[MAX_ATOMIC];
22 int N_n[MAX_ATOMIC];
23 int N_T[MAX_ATOMIC];
24 int reac_type[MAX_ATOMIC];
27
31typedef struct {
32 int N_reac;
33 int z_1[MAX_ATOMIC];
34 int a_1[MAX_ATOMIC];
35 int z_2[MAX_ATOMIC];
36 int a_2[MAX_ATOMIC];
37 int reac_type[MAX_ATOMIC];
42
44 real** offload_array);
46 real** offload_array);
47
48#pragma omp declare target
51 asigma_loc_offload_data* offload_data, real* offload_array);
52DECLARE_TARGET_SIMD_UNIFORM(asigma_data, reac_type, z_2, a_2,\
53 extrapolate)
55 real* sigma, int z_1, int a_1, int z_2, int a_2, real E_coll_per_amu,
56 int reac_type, int extrapolate, asigma_loc_data* asigma_data);
57DECLARE_TARGET_SIMD_UNIFORM(asigma_data, reac_type, z_2, a_2,\
58 extrapolate)
60 real* sigmav, int z_1, int a_1, real m_1, int z_2, int a_2,
61 real E, real T_e, real T_0, real n_i, int reac_type, int extrapolate,
63#pragma omp declare simd uniform(asigmadata, znum, anum, nspec, extrapolate)
65 real* ratecoeff, int z_1, int a_1, real E, real mass, int nspec,
66 const int* znum, const int* anum, real T_0, real* n_0, int extrapolate,
67 asigma_loc_data* asigmadata);
68#pragma omp declare simd uniform(asigma_data, znum, anum, nion, extrapolate)
70 real* sigmav, int z_1, int a_1, real E, real mass, int nion,
71 const int* znum, const int* anum, real T_e, real* n_i, int extrapolate,
73#pragma omp end declare target
74
75#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
#define MAX_ATOMIC
Maximum number of atomic reactions.
Definition ascot5.h:101
a5err asigma_loc_eval_sigma(real *sigma, int z_1, int a_1, int z_2, int a_2, real E_coll_per_amu, int reac_type, int extrapolate, asigma_loc_data *asigma_data)
Evaluate atomic reaction cross-section.
Definition asigma_loc.c:309
a5err asigma_loc_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, int reac_type, int extrapolate, asigma_loc_data *asigma_data)
Evaluate atomic reaction rate coefficient.
Definition asigma_loc.c:384
void asigma_loc_free_offload(asigma_loc_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
Definition asigma_loc.c:197
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.
Definition asigma_loc.c:477
void asigma_loc_init(asigma_loc_data *asigma_data, asigma_loc_offload_data *offload_data, real *offload_array)
Initialize atomic reaction data struct on target.
Definition asigma_loc.c:216
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.
Definition asigma_loc.c:549
int asigma_loc_init_offload(asigma_loc_offload_data *offload_data, real **offload_array)
Initialize local file atomic data and check inputs.
Definition asigma_loc.c:52
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
Spline interpolation library.
Atomic reaction simulation data.
Definition asigma.h:66
Local-files atomic reaction simulation data.
Definition asigma_loc.h:31
Local-files atomic reaction offload data.
Definition asigma_loc.h:15
Cubic interpolation struct.
Definition interp.h:56
Bicubic interpolation struct.
Definition interp.h:68
Tricubic interpolation struct.
Definition interp.h:85